diff --git a/.github/workflows/samples-kotlin.yaml b/.github/workflows/samples-kotlin.yaml index 46c944fd74e..ddc46f801cb 100644 --- a/.github/workflows/samples-kotlin.yaml +++ b/.github/workflows/samples-kotlin.yaml @@ -56,7 +56,7 @@ jobs: ~/.gradle key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }} - name: Install Gradle wrapper - uses: eskatos/gradle-command-action@v1 + uses: eskatos/gradle-command-action@v2 with: gradle-version: ${{ env.GRADLE_VERSION }} build-root-directory: ${{ matrix.sample }} diff --git a/.travis.yml b/.travis.yml index 5761227d0a7..92ac1baaeae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,28 +21,11 @@ cache: - $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor - $HOME/samples/client/petstore/ruby/vendor/bundle - $HOME/samples/client/petstore/python/.venv/ - - $HOME/samples/openapi3/client/petstore/typescript/tests/default/node_modules - - $HOME/samples/openapi3/client/petstore/typescript/tests/jquery/node_modules - - $HOME/samples/openapi3/client/petstore/typescript/tests/object_params/node_modules - - $HOME/samples/openapi3/client/petstore/typescript/tests/inversify/node_modules - - $HOME/samples/client/petstore/typescript-node/npm/node_modules - - $HOME/samples/client/petstore/typescript-node/npm/typings/ - - $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules - - $HOME/samples/client/petstore/typescript-fetch/tests/default/typings - - $HOME/samples/client/petstore/typescript-fetch/builds/default/node_modules - - $HOME/samples/client/petstore/typescript-fetch/builds/default/typings - - $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/node_modules - - $HOME/samples/client/petstore/typescript-fetch/builds/es6-target/typings - - $HOME/samples/client/petstore/typescript-fetch/builds/with-npm-version/node_modules - - $HOME/samples/client/petstore/typescript-fetch/npm/with-npm-version/typings - - $HOME/samples/client/petstore/typescript-angular/node_modules - - $HOME/samples/client/petstore/typescript-angular/typings - $HOME/samples/server/petstore/rust-server/target - $HOME/perl5 - $HOME/.cargo - $HOME/.pub-cache - $HOME/samples/server/petstore/cpp-pistache/pistache - - $HOME/.npm - $HOME/.rvm/gems/ruby-2.4.1 - $HOME/website/node_modules/ - $HOME/.cache/deno @@ -75,23 +58,19 @@ before_install: - docker pull swaggerapi/petstore - docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore - docker ps -a + # comment out crystal installation as the tests will run on circleci or github action instead # install crystal - - echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list - - curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null - - sudo apt update - - sudo apt install crystal - - crystal --version + #- echo 'deb http://download.opensuse.org/repositories/devel:/languages:/crystal/xUbuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/devel:languages:crystal.list + #- curl -fsSL https://download.opensuse.org/repositories/devel:languages:crystal/xUbuntu_16.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_languages_crystal.gpg > /dev/null + #- sudo apt update + #- sudo apt install crystal + #- crystal --version - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.22.0 - export PATH="$HOME/.yarn/bin:$PATH" # install rust - curl https://sh.rustup.rs -sSf | sh -s -- -y -v # required when sudo: required for the Ruby petstore tests - gem install bundler - - nvm install 12.20.0 - - nvm use 12.20.0 - - npm install -g typescript - - npm install -g npm - - npm config set registry http://registry.npmjs.org/ # set python 3.6.3 as default - source ~/virtualenv/python3.6/bin/activate # -- skip bash test to shorten build time diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index e8a80f93789..6e231909d61 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -7,6 +7,8 @@ NODE_INDEX=${CIRCLE_NODE_INDEX:-0} set -e +export NODE_ENV=test + function cleanup { # Show logs of 'petstore.swagger' container to troubleshoot Unit Test failures, if any. docker logs petstore.swagger # container name specified in circle.yml @@ -20,15 +22,12 @@ if [ "$NODE_INDEX" = "1" ]; then mvn --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error - echo "show ivy2 cache" - ls -l /home/circleci/.ivy2/cache - elif [ "$NODE_INDEX" = "2" ]; then echo "Running node $NODE_INDEX to test haskell" # install haskell - curl -sSL https://get.haskellstack.org/ | sh - stack upgrade - stack --version + #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 diff --git a/README.md b/README.md index 5739a689ac3..9327133b55d 100644 --- a/README.md +++ b/README.md @@ -571,6 +571,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Agoda](https://www.agoda.com/) - [Allianz](https://www.allianz.com) - [Angular.Schule](https://angular.schule/) +- [Aqovia](https://aqovia.com/) - [Australia and New Zealand Banking Group (ANZ)](http://www.anz.com/) - [ASKUL](https://www.askul.co.jp) - [Arduino](https://www.arduino.cc/) @@ -611,6 +612,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Here](https://developer.here.com/) - [IBM](https://www.ibm.com/) - [Instana](https://www.instana.com) +- [Interxion](https://www.interxion.com) - [Inquisico](https://inquisico.com) - [JustStar](https://www.juststarinfo.com) - [k6.io](https://k6.io/) @@ -628,6 +630,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - [Myworkout](https://myworkout.com) - [NamSor](https://www.namsor.com/) - [Neverfail](https://www.neverfail.com/) +- [NeuerEnergy](https://neuerenergy.com) - [Nokia](https://www.nokia.com/) - [Options Clearing Corporation (OCC)](https://www.theocc.com/) - [Openet](https://www.openet.com/) @@ -825,6 +828,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 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) - 2021-08-21 - [Generating Client APIs using Swagger Part 1](https://medium.com/@flowsquad/generating-client-apis-using-swagger-part-1-2d46f13f5e92) by [FlowSquad.io](https://medium.com/@flowsquad) - 2021-09-11 - [Invoking AWS ParallelCluster API](https://docs.aws.amazon.com/parallelcluster/latest/ug/api-reference-v3.html) at [AWS ParallelCluster API official documentation](https://docs.aws.amazon.com/parallelcluster/latest/ug/api-reference-v3.html) +- 2021-10-02 - [How to Write Fewer Lines of Code with the OpenAPI Generator](https://hackernoon.com/how-to-write-fewer-lines-of-code-with-the-openapi-generator) by [Mikhail Alfa](https://hackernoon.com/u/alphamikle) ## [6 - About Us](#table-of-contents) diff --git a/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml new file mode 100644 index 00000000000..eb33c1a7f2f --- /dev/null +++ b/bin/configs/dart-dio-next-dio-http-petstore-client-lib-fake.yaml @@ -0,0 +1,11 @@ +generatorName: dart-dio-next +outputDir: samples/openapi3/client/petstore/dart-dio-next/dio_http_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/libraries/dio +typeMappings: + Client: "ModelClient" + File: "ModelFile" + EnumClass: "ModelEnumClass" +additionalProperties: + hideGenerationTimestamp: "true" + dioLibrary: "dio_http" diff --git a/bin/configs/swift5-asyncAwaitLibrary.yaml b/bin/configs/swift5-asyncAwaitLibrary.yaml new file mode 100644 index 00000000000..fed714a2d68 --- /dev/null +++ b/bin/configs/swift5-asyncAwaitLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/asyncAwaitLibrary +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + responseAs: AsyncAwait + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/typescript-axios-test-petstore.yaml b/bin/configs/typescript-axios-test-petstore.yaml new file mode 100644 index 00000000000..7873b2854fe --- /dev/null +++ b/bin/configs/typescript-axios-test-petstore.yaml @@ -0,0 +1,4 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/test-petstore +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/typescript-axios \ No newline at end of file diff --git a/docs/generators.md b/docs/generators.md index b008000a275..ed80e860e49 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -24,7 +24,7 @@ The following generators are available: * [dart](generators/dart.md) * [dart-dio](generators/dart-dio.md) * [dart-dio-next (experimental)](generators/dart-dio-next.md) -* [dart-jaguar](generators/dart-jaguar.md) +* [dart-jaguar (deprecated)](generators/dart-jaguar.md) * [eiffel](generators/eiffel.md) * [elixir](generators/elixir.md) * [elm](generators/elm.md) diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index d644e35b04a..ac9d15dc069 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -9,6 +9,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl | ------ | ----------- | ------ | ------- | |allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| |dateLibrary|Specify Date library|
**core**
[DEFAULT] 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| +|dioLibrary|Specify Dio library|
**dio_http**
dio_http 5.x
**dio**
[DEFAULT] dio 4.x
|dio| |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| |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| diff --git a/docs/generators/php-dt.md b/docs/generators/php-dt.md index a61f3cd351c..6f9dae63804 100644 --- a/docs/generators/php-dt.md +++ b/docs/generators/php-dt.md @@ -40,7 +40,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## LANGUAGE PRIMITIVES