mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 08:46:55 +00:00
Compare commits
1 Commits
v5.0.0
...
document-e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e52cd1a51e |
@@ -1,118 +0,0 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
# docker:
|
||||
# #- image: openapitools/openapi-generator
|
||||
# - image: swaggerapi/petstore
|
||||
# environment:
|
||||
# SWAGGER_HOST=http://petstore.swagger.io
|
||||
# SWAGGER_BASE_PATH=/v2
|
||||
machine:
|
||||
image: circleci/classic:latest
|
||||
working_directory: ~/OpenAPITools/openapi-generator
|
||||
parallelism: 3
|
||||
shell: /bin/bash --login
|
||||
environment:
|
||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
||||
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
|
||||
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
|
||||
steps:
|
||||
# Restore the dependency cache
|
||||
- restore_cache:
|
||||
keys:
|
||||
# Default branch if not
|
||||
- source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
- source-v2-{{ .Branch }}-
|
||||
- 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
|
||||
# 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.
|
||||
# In many cases you can simplify this from what is generated here.
|
||||
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
|
||||
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run:
|
||||
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
|
||||
- run:
|
||||
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
|
||||
- run:
|
||||
command: |-
|
||||
printf '127.0.0.1 petstore.swagger.io
|
||||
' | sudo tee -a /etc/hosts
|
||||
# Dependencies
|
||||
# Install latest stable node for angular 6
|
||||
- run:
|
||||
name: Install node@stable (for angular 6)
|
||||
command: |
|
||||
set +e
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
|
||||
export NVM_DIR="/opt/circleci/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install stable
|
||||
nvm alias default stable
|
||||
|
||||
# Each step uses the same `$BASH_ENV`, so need to modify it
|
||||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
|
||||
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
|
||||
- run: node --version
|
||||
# - run: docker pull openapitools/openapi-petstore
|
||||
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
|
||||
- run: docker pull swaggerapi/petstore
|
||||
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||
- run: docker ps -a
|
||||
- run: sleep 30
|
||||
- run: cat /etc/hosts
|
||||
# Test
|
||||
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- run: ./CI/circle_parallel.sh
|
||||
# Save dependency cache
|
||||
- save_cache:
|
||||
key: source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
paths:
|
||||
# This is a broad list of cache paths to include many possible development environments
|
||||
# You can probably delete some of these entries
|
||||
- vendor/bundle
|
||||
- ~/virtualenvs
|
||||
- ~/.m2
|
||||
- ~/.ivy2
|
||||
- ~/.sbt
|
||||
- ~/.bundle
|
||||
- ~/.go_workspace
|
||||
- ~/.gradle
|
||||
- ~/.cache/bower
|
||||
- ".git"
|
||||
- ~/.stack
|
||||
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
|
||||
- ~/R
|
||||
# save "default" cache using the key "source-v2-"
|
||||
- save_cache:
|
||||
key: source-v2-
|
||||
paths:
|
||||
# This is a broad list of cache paths to include many possible development environments
|
||||
# You can probably delete some of these entries
|
||||
- vendor/bundle
|
||||
- ~/virtualenvs
|
||||
- ~/.m2
|
||||
- ~/.ivy2
|
||||
- ~/.sbt
|
||||
- ~/.bundle
|
||||
- ~/.go_workspace
|
||||
- ~/.gradle
|
||||
- ~/.cache/bower
|
||||
- ".git"
|
||||
- ~/.stack
|
||||
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
|
||||
- ~/R
|
||||
# Teardown
|
||||
# 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
|
||||
# Save test results
|
||||
- store_test_results:
|
||||
path: /tmp/circleci-test-results
|
||||
# Save artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-test-results
|
||||
2
.github/.test/samples.json
vendored
2
.github/.test/samples.json
vendored
@@ -807,7 +807,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"input": "php-mezzio-ph-petstore-server.sh",
|
||||
"input": "php-ze-ph-petstore-server.sh",
|
||||
"matches": [
|
||||
"Server: PHP"
|
||||
]
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -11,10 +11,10 @@ assignees: ''
|
||||
|
||||
- [ ] Have you provided a full/minimal spec to reproduce the issue?
|
||||
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
|
||||
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issue still exists?
|
||||
- [ ] Have you searched for related issues/PRs?
|
||||
- [ ] What's the version of OpenAPI Generator used?
|
||||
- [ ] Have you search for related issues/PRs?
|
||||
- [ ] What's the actual output vs expected output?
|
||||
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))
|
||||
- [ ] [Optional] Bounty to sponsor the fix ([example](https://www.bountysource.com/issues/66123212-javascript-client-produces-a-wrong-object-for-a-string-enum-type-that-is-used-with-ref))
|
||||
|
||||
<!--
|
||||
Please follow the issue template below for bug reports.
|
||||
|
||||
19
.github/workflows/check-supported-versions.yaml
vendored
19
.github/workflows/check-supported-versions.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 'Build: JDK ${{ matrix.java }} (${{ matrix.os }})'
|
||||
name: Build on JDK ${{ matrix.java }} and ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -48,6 +48,10 @@ jobs:
|
||||
shell: bash
|
||||
run: mvn -nsu -B --quiet -Djacoco.skip=true -Dorg.slf4j.simpleLogger.defaultLogLevel=error --no-transfer-progress clean install --file pom.xml ${{ matrix.flags }}
|
||||
|
||||
- name: Test gradle
|
||||
shell: bash
|
||||
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
|
||||
|
||||
- name: Upload Maven build artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
|
||||
@@ -55,19 +59,8 @@ jobs:
|
||||
name: artifact
|
||||
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
|
||||
|
||||
- name: Test Gradle plugin usage
|
||||
shell: bash
|
||||
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace
|
||||
|
||||
- name: Test Maven plugin integration
|
||||
if: matrix.java == '8'
|
||||
shell: bash
|
||||
run: |
|
||||
cd modules/openapi-generator-maven-plugin
|
||||
mvn verify -Pintegration
|
||||
|
||||
verify:
|
||||
name: Verify outputs on ${{ matrix.os }}
|
||||
name: Verifies integrity of the commit on ${{ matrix.os }}
|
||||
needs: build
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
||||
9
.github/workflows/sonar.yml
vendored
9
.github/workflows/sonar.yml
vendored
@@ -4,7 +4,6 @@ on:
|
||||
branches:
|
||||
- master
|
||||
- '[4-9]+.[0-9]+.x'
|
||||
- sonar
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -13,13 +12,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 11
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
java-version: 1.8
|
||||
- name: Compile with Maven
|
||||
run: mvn -B -q clean install jacoco:report
|
||||
run: mvn clean package jacoco:report
|
||||
- name: Jacoco Aggregate
|
||||
run: mvn jacoco:report-aggregate
|
||||
- name: Publish to Sonar
|
||||
run: mvn -B -q -nsu sonar:sonar -Dsonar.projectKey=OpenAPITools_openapi-generator -Dsonar.organization=openapitools -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_LOGIN }} -Dsonar.branch.name=${GITHUB_REF##*/}
|
||||
run: mvn -B -q sonar:sonar -Dsonar.projectKey=OpenAPITools_openapi-generator -Dsonar.organization=openapitools -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_LOGIN }} -Dsonar.branch.name=${GITHUB_REF##*/}
|
||||
|
||||
18
.gitignore
vendored
18
.gitignore
vendored
@@ -176,12 +176,12 @@ samples/client/petstore/python-tornado/.venv/
|
||||
# PHP
|
||||
samples/client/petstore/php/OpenAPIClient-php/composer.lock
|
||||
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
|
||||
samples/openapi3/server/petstore/php-mezzio-ph/composer.lock
|
||||
samples/openapi3/server/petstore/php-ze-ph/composer.lock
|
||||
samples/server/petstore/php-laravel/lib/composer.lock
|
||||
samples/server/petstore/php-lumen/lib/composer.lock
|
||||
samples/server/petstore/php-slim4/composer.lock
|
||||
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
|
||||
samples/server/petstore/php-mezzio-ph/composer.lock
|
||||
samples/server/petstore/php-ze-ph/composer.lock
|
||||
|
||||
# ts
|
||||
samples/client/petstore/typescript-angular2/npm/npm-debug.log
|
||||
@@ -234,15 +234,11 @@ samples/client/petstore/erlang-proper/rebar.lock
|
||||
samples/server/petstore/erlang-server/_build/
|
||||
samples/server/petstore/erlang-server/rebar.lock
|
||||
|
||||
# Dart
|
||||
**/dart*/**/.dart_tool
|
||||
**/dart*/**/.packages
|
||||
**/dart*/**/pubspec.lock
|
||||
# Dart dio
|
||||
**/dart*/**/*.g.dart
|
||||
# Dart jaguar
|
||||
**/dart*/**/*.jser.dart
|
||||
**/dart*/**/*.jretro.dart
|
||||
# dart
|
||||
samples/client/petstore/dart/petstore/packages
|
||||
samples/client/petstore/dart/flutter_petstore/test/packages
|
||||
samples/client/petstore/dart/petstore/test/packages
|
||||
**/.dart_tool
|
||||
|
||||
# JS
|
||||
samples/client/petstore/javascript-es6/package-lock.json
|
||||
|
||||
10
.travis.yml
10
.travis.yml
@@ -68,8 +68,6 @@ before_install:
|
||||
- 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/
|
||||
@@ -124,7 +122,7 @@ before_install:
|
||||
fi;
|
||||
- pushd .; cd website; yarn install; popd
|
||||
# install Deno
|
||||
- sh -s v1.1.2 < ./CI/deno_install.sh
|
||||
- curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.1.2
|
||||
- export PATH="$HOME/.deno/bin:$PATH"
|
||||
|
||||
install:
|
||||
@@ -142,8 +140,6 @@ install:
|
||||
script:
|
||||
# fail fast
|
||||
- set -e
|
||||
# fail if the test files have changes
|
||||
- bin/utils/detect_test_file_changes.rb bin/utils/test_file_list.yaml
|
||||
# fail if templates/generators contain carriage return '\r'
|
||||
- /bin/bash ./bin/utils/detect_carriage_return.sh
|
||||
# fail if generators contain merge conflicts
|
||||
@@ -152,8 +148,8 @@ script:
|
||||
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
|
||||
# run integration tests defined in maven pom.xml
|
||||
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
|
||||
- mvn -e --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- mvn -e --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- mvn --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- mvn --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
after_success:
|
||||
# push to maven repo
|
||||
- if [ $SONATYPE_USERNAME ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
|
||||
@@ -2,15 +2,6 @@ kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
# test protobuf schema generator
|
||||
- name: protobuf-schema-test
|
||||
image: nanoservice/protobuf-go
|
||||
commands:
|
||||
- protoc --version
|
||||
- mkdir /var/tmp/go/
|
||||
- cd samples/config/petstore/protobuf-schema
|
||||
- protoc --go_out=/var/tmp/go/ services/*
|
||||
- protoc --go_out=/var/tmp/go/ models/*
|
||||
# test aspnetcore 3.x
|
||||
- name: aspnetcore-test
|
||||
image: mcr.microsoft.com/dotnet/core/sdk:3.1
|
||||
@@ -37,12 +28,11 @@ steps:
|
||||
- name: java11-test
|
||||
image: openjdk:11.0
|
||||
commands:
|
||||
- ./mvnw --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- ./mvnw -quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- ./mvnw --quiet verify -Psamples.droneio -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
# test java native client
|
||||
- ./mvnw clean test -f samples/client/petstore/java/native/pom.xml
|
||||
- ./mvnw clean test -f samples/client/petstore/java/native-async/pom.xml
|
||||
- ./mvnw clean test -f samples/openapi3/client/petstore/java/native/pom.xml
|
||||
# test all generators with fake petstore spec (2.0, 3.0)
|
||||
- /bin/bash bin/utils/test-fake-petstore-for-all.sh
|
||||
# generate test scripts
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2019 the Deno authors. All rights reserved. MIT license.
|
||||
# TODO(everyone): Keep this script simple and easily auditable.
|
||||
|
||||
set -e
|
||||
|
||||
if ! command -v unzip >/dev/null; then
|
||||
echo "Error: unzip is required to install Deno (see: https://github.com/denoland/deno_install#unzip-is-required)." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$OS" = "Windows_NT" ]; then
|
||||
target="x86_64-pc-windows-msvc"
|
||||
else
|
||||
case $(uname -s) in
|
||||
Darwin) target="x86_64-apple-darwin" ;;
|
||||
*) target="x86_64-unknown-linux-gnu" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
deno_uri="https://github.com/denoland/deno/releases/latest/download/deno-${target}.zip"
|
||||
else
|
||||
deno_uri="https://github.com/denoland/deno/releases/download/${1}/deno-${target}.zip"
|
||||
fi
|
||||
|
||||
deno_install="${DENO_INSTALL:-$HOME/.deno}"
|
||||
bin_dir="$deno_install/bin"
|
||||
exe="$bin_dir/deno"
|
||||
|
||||
if [ ! -d "$bin_dir" ]; then
|
||||
mkdir -p "$bin_dir"
|
||||
fi
|
||||
|
||||
curl --fail --location --progress-bar --output "$exe.zip" "$deno_uri"
|
||||
unzip -d "$bin_dir" -o "$exe.zip"
|
||||
chmod +x "$exe"
|
||||
rm "$exe.zip"
|
||||
|
||||
echo "Deno was installed successfully to $exe"
|
||||
if command -v deno >/dev/null; then
|
||||
echo "Run 'deno --help' to get started"
|
||||
else
|
||||
case $SHELL in
|
||||
/bin/zsh) shell_profile=".zshrc" ;;
|
||||
*) shell_profile=".bash_profile" ;;
|
||||
esac
|
||||
echo "Manually add the directory to your \$HOME/$shell_profile (or similar)"
|
||||
echo " export DENO_INSTALL=\"$deno_install\""
|
||||
echo " export PATH=\"\$DENO_INSTALL/bin:\$PATH\""
|
||||
echo "Run '$exe --help' to get started"
|
||||
fi
|
||||
@@ -87,7 +87,9 @@ To add test cases (optional) covering the change in the code generator, please r
|
||||
To test the templates, please perform the following:
|
||||
|
||||
- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh .
|
||||
/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files g
|
||||
enerated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec fro
|
||||
m time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
- During development it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
|
||||
- Run the tests in the sample folder using maven `mvn integration-test -f /path/to/pom.xml`, e.g. `mvn integration-test -f samples/client/petstore/python/pom.xml`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
|
||||
- Finally, git commit the updated samples files: `git commit -a`
|
||||
|
||||
80
README.md
80
README.md
@@ -3,13 +3,13 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [](./LICENSE)  [](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [](https://twitter.com/oas_generator)
|
||||
[](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [](./LICENSE)  [](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [](https://twitter.com/oas_generator)
|
||||
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.0.0`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.0.0`):
|
||||
[](https://travis-ci.org/OpenAPITools/openapi-generator)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
:notebook_with_decorative_cover: The eBook [A Beginner's Guide to Code Generation for REST APIs](https://gum.co/openapi_generator_ebook) is a good starting point for beginners :notebook_with_decorative_cover:
|
||||
|
||||
:warning: If the OpenAPI spec, templates or any input (e.g. options, environment variables) is obtained from an untrusted source or environment, please make sure you've reviewed these inputs before using OpenAPI Generator to generate the API client, server stub or documentation to avoid potential security issues (e.g. [code injection](https://en.wikipedia.org/wiki/Code_injection)). For security vulnerabilities, please contact [team@openapitools.org](mailto:team@openapitools.org). :warning:
|
||||
:warning: If the OpenAPI spec, templates or any input (e.g. options, environment variables) is obtained from an untrusted source or environment, please make sure you've reviewed these inputs before using OpenAPI Generator to generate the API client, server stub or documentation to avoid potential security issues (e.g. [code injection](https://en.wikipedia.org/wiki/Code_injection)) :warning:
|
||||
|
||||
:bangbang: Both "OpenAPI Tools" (https://OpenAPITools.org - the parent organization of OpenAPI Generator) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI) :bangbang:
|
||||
|
||||
@@ -60,7 +60,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.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, 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** (rust, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) |
|
||||
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.0, .NET Core 2.0), **C++** (cpp-restsdk, Qt5, Tizen), **Clojure**, **Dart (1.x, 2.x)**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, 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** (rust, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 8.x), Aurelia, Axios, Fetch, Inversify, jQuery, Node, Rxjs) |
|
||||
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, NancyFx), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin), **Haskell** (Servant), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, Slim, Silex, [Symfony](https://symfony.com/), [Zend Expressive](https://github.com/zendframework/zend-expressive)), **Python** (Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (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** |
|
||||
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
|
||||
@@ -102,9 +102,10 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
| OpenAPI Generator Version | Release Date | Notes |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| 5.0.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.1-SNAPSHOT/) | TBD | Patch release with enhancements, bug fixes, etc |
|
||||
| [5.0.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0) (latest stable release) | 21.12.2020 | Major release with breaking changes (no fallback) |
|
||||
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
|
||||
| 5.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/) | TBD | Major release with breaking changes (no fallback) |
|
||||
| 5.0.0-beta2 (upcoming beta release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.0.0-SNAPSHOT/) | 30.07.2020 | Major beta release with breaking changes (no fallback) |
|
||||
| [5.0.0-beta](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.0.0-beta) (latest beta release) | 30.06.2020 | Major beta release with breaking changes (no fallback) |
|
||||
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) (latest stable release) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
|
||||
|
||||
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
|
||||
|
||||
@@ -160,16 +161,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
|
||||
<!-- RELEASE_VERSION -->
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
|
||||
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0-beta/openapi-generator-cli-5.0.0-beta.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0-beta/openapi-generator-cli-5.0.0-beta.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0-beta/openapi-generator-cli-5.0.0-beta.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -253,7 +254,7 @@ To install, run `brew install openapi-generator`
|
||||
|
||||
Here is an example usage to generate a Ruby client:
|
||||
```sh
|
||||
openapi-generator generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ruby -o /tmp/test/
|
||||
openapi-generator generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g ruby -o /tmp/test/
|
||||
```
|
||||
|
||||
To reinstall with the latest master, run `brew uninstall openapi-generator && brew install --HEAD openapi-generator`
|
||||
@@ -288,7 +289,7 @@ Example:
|
||||
|
||||
```sh
|
||||
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-g go \
|
||||
-o /local/out/go
|
||||
```
|
||||
@@ -313,12 +314,12 @@ GEN_IP=$(docker inspect --format '{{.NetworkSettings.IPAddress}}' $CID)
|
||||
|
||||
# Execute an HTTP request to generate a Ruby client
|
||||
> curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' \
|
||||
-d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"}' \
|
||||
-d '{"openAPIUrl": "https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' \
|
||||
'http://localhost:8888/api/gen/clients/ruby'
|
||||
|
||||
{"code":"c2d483.3.4672-40e9-91df-b9ffd18d22b8","link":"http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8"}
|
||||
|
||||
# Download the generated zip file
|
||||
# Download the generated zip file
|
||||
> wget http://localhost:8888/api/gen/download/c2d483.3.4672-40e9-91df-b9ffd18d22b8
|
||||
|
||||
# Unzip the file
|
||||
@@ -349,7 +350,7 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c
|
||||
./run-in-docker.sh help # Executes 'help' command for openapi-generator-cli
|
||||
./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 \
|
||||
./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-g go -o /gen/out/go-petstore --package-name=petstore # generates go client, outputs locally to ./out/go-petstore
|
||||
```
|
||||
|
||||
@@ -387,14 +388,14 @@ Install it globally to get the CLI available on the command line:
|
||||
|
||||
```sh
|
||||
npm install @openapitools/openapi-generator-cli -g
|
||||
openapi-generator-cli version
|
||||
openapi-generator version
|
||||
```
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
To use a specific version of "openapi-generator-cli"
|
||||
Or install a particular OpenAPI Generator version (e.g. v5.0.0-beta):
|
||||
|
||||
```sh
|
||||
openapi-generator-cli version-manager set 5.0.0
|
||||
npm install @openapitools/openapi-generator-cli@cli-5.0.0-beta -g
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -405,20 +406,20 @@ npm install @openapitools/openapi-generator-cli -D
|
||||
<!-- /RELEASE_VERSION -->
|
||||
## [2 - Getting Started](#table-of-contents)
|
||||
|
||||
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml), please run the following
|
||||
To generate a PHP client for [petstore.yaml](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml), please run the following
|
||||
```sh
|
||||
git clone https://github.com/openapitools/openapi-generator
|
||||
cd openapi-generator
|
||||
mvn clean package
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-g php \
|
||||
-o /var/tmp/php_api_client
|
||||
```
|
||||
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
|
||||
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php -o c:\temp\php_api_client`)
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0/openapi-generator-cli-5.0.0.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.0.0-beta/openapi-generator-cli-5.0.0-beta.jar)
|
||||
<!-- /RELEASE_VERSION -->
|
||||
|
||||
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
|
||||
@@ -428,7 +429,7 @@ To get a list of PHP specified options (which can be passed to the generator wit
|
||||
## [3 - Usage](#table-of-contents)
|
||||
|
||||
### To generate a sample client library
|
||||
You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml) as follows:
|
||||
You can build a client against the [Petstore API](https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml) as follows:
|
||||
|
||||
```sh
|
||||
./bin/java-petstore-okhttp-gson.sh
|
||||
@@ -440,7 +441,7 @@ This script uses the default library, which is `okhttp-gson`. It will run the ge
|
||||
|
||||
```sh
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-g java \
|
||||
-o samples/client/petstore/java/okhttp-gson
|
||||
```
|
||||
@@ -561,7 +562,6 @@ Here is a list of community-conitributed IDE plug-ins that integrate with OpenAP
|
||||
Here are some companies/projects (alphabetical order) using OpenAPI Generator in production. To add your company/project to the list, please visit [README.md](README.md) and click on the icon to edit the page.
|
||||
|
||||
- [Adaptant Solutions AG](https://www.adaptant.io/)
|
||||
- [adesso SE](https://www.adesso.de/)
|
||||
- [Agoda](https://www.agoda.com/)
|
||||
- [Allianz](https://www.allianz.com)
|
||||
- [Angular.Schule](https://angular.schule/)
|
||||
@@ -610,7 +610,6 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [Kubernetes](https://kubernetes.io)
|
||||
- [Linode](https://www.linode.com/)
|
||||
- [Logicdrop](https://www.logicdrop.com)
|
||||
- [LVM Versicherungen](https://www.lvm.de)
|
||||
- [MailSlurp](https://www.mailslurp.com)
|
||||
- [Médiavision](https://www.mediavision.fr/)
|
||||
- [Metaswitch](https://www.metaswitch.com/)
|
||||
@@ -623,7 +622,6 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [openVALIDATION](https://openvalidation.io/)
|
||||
- [Oracle](https://www.oracle.com/)
|
||||
- [Paxos](https://www.paxos.com)
|
||||
- [PLAID, Inc.](https://plaid.co.jp/)
|
||||
- [Ponicode](https://ponicode.dev/)
|
||||
- [Pricefx](https://www.pricefx.com/)
|
||||
- [Prometheus/Alertmanager](https://github.com/prometheus/alertmanager)
|
||||
@@ -635,16 +633,13 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
|
||||
- [REST United](https://restunited.com)
|
||||
- [Robotinfra](https://www.robotinfra.com)
|
||||
- [SmartHR](https://smarthr.co.jp/)
|
||||
- [Sony Interactive Entertainment](https://www.sie.com/en/index.html)
|
||||
- [Splitit](https://www.splitit.com/)
|
||||
- [Stingray](http://www.stingray.com)
|
||||
- [Suva](https://www.suva.ch/)
|
||||
- [Telstra](https://dev.telstra.com)
|
||||
- [TravelTime platform](https://www.traveltimeplatform.com/)
|
||||
- [TribalScale](https://www.tribalscale.com)
|
||||
- [TUI InfoTec GmbH](http://www.tui-infotec.com/)
|
||||
- [Twitter](https://twitter.com)
|
||||
- [unblu inc.](https://www.unblu.com/)
|
||||
- [Veamly](https://www.veamly.com/)
|
||||
- [wbt-solutions](https://www.wbt-solutions.de/)
|
||||
@@ -679,7 +674,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2019/01/03 - [Calling a Swagger service from Apex using openapi-generator](https://lekkimworld.com/2019/01/03/calling-a-swagger-service-from-apex-using-openapi-generator/) by [Mikkel Flindt Heisterberg](https://lekkimworld.com)
|
||||
- 2019/01/13 - [OpenAPI GeneratorでRESTful APIの定義書から色々自動生成する](https://ky-yk-d.hatenablog.com/entry/2019/01/13/234108) by [@ky_yk_d](https://twitter.com/ky_yk_d)
|
||||
- 2019/01/20 - [Contract-First API Development with OpenAPI Generator and Connexion](https://medium.com/commencis/contract-first-api-development-with-openapi-generator-and-connexion-b21bbf2f9244) by [Anil Can Aydin](https://github.com/anlcnydn)
|
||||
- 2019/01/30 - [Rapid Application Development With API First Approach Using Open-API Generator](https://dzone.com/articles/rapid-api-development-using-open-api-generator) by [Milan Sonkar](https://dzone.com/users/828329/milan_sonkar.html)
|
||||
- 2019/01/30 - [Rapid Application Development With API First Approach Using Open-API Generator](https://dzone.com/articles/rapid-api-development-using-open-api-generator) by [Milan Sonkar](https://dzone.com/users/828329/milan_sonkar.html)
|
||||
- 2019/02/02 - [平静を保ち、コードを生成せよ 〜 OpenAPI Generator誕生の背景と軌跡 〜](https://speakerdeck.com/akihito_nakano/gunmaweb34) by [中野暁人](https://github.com/ackintosh) at [Gunma.web #34 スキーマ駆動開発](https://gunmaweb.connpass.com/event/113974/)
|
||||
- 2019/02/20 - [An adventure in OpenAPI V3 code generation](https://mux.com/blog/an-adventure-in-openapi-v3-api-code-generation/) by [Phil Cluff](https://mux.com/blog/author/philc/)
|
||||
- 2019/02/26 - [Building API Services: A Beginner’s Guide](https://medium.com/google-cloud/building-api-services-a-beginners-guide-7274ae4c547f) by [Ratros Y.](https://medium.com/@ratrosy) in [Google Cloud Platofrm Blog](https://medium.com/google-cloud)
|
||||
@@ -768,7 +763,6 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2020-05-22 - [TypeScript REST API Client](https://dev.to/unhurried/typescript-rest-api-client-4in3) by ["unhurried"](https://dev.to/unhurried)
|
||||
- 2020-05-28 - [【使用 lotify + Swagger 建置可共用的 LINE Notify bot】 - #NiJia @ Chatbot Developer Taiwan 第 #19 小聚](https://www.youtube.com/watch?v=agYVz6dzh1I) by [Chatbot Developer Taiwan](https://www.youtube.com/channel/UCxeYUyZNnHmpX23YNF-ewvw)
|
||||
- 2020-05-28 - [Building APIs with Laravel using OpenAPI](https://www.youtube.com/watch?v=xexLvQqAhiA) by [Chris Tankersley](https://github.com/dragonmantank) at [Laracon EU](https://laracon.eu/)
|
||||
- 2020-06-12 - [Interoperability by construction: code generation for Arrowhead Clients](https://ieeexplore.ieee.org/document/9274746) by Michele Albano, Brian Nielsen at [2020 IEEE Conference on Industrial Cyberphysical Systems (ICPS)](https://ieeexplore.ieee.org/xpl/conhome/9274544/proceeding)
|
||||
- 2020-06-23 - [新規サーバーアプリケーションにTypeScriptを採用してみた](https://www.cam-inc.co.jp/news/20200623) at [CAM Tech Blog](https://www.cam-inc.co.jp/news/tech-blog/)
|
||||
- 2020-06-29 - [Artifact Abstract: Deployment of APIs on Android Mobile Devices and Microcontrollers](https://ieeexplore.ieee.org/document/9127353) by [Sergio Laso ; Marino Linaje ; Jose Garcia-Alonso ; Juan M. Murillo ; Javier Berrocal](https://ieeexplore.ieee.org/document/9127353/authors#authors) at [2020 IEEE International Conference on Pervasive Computing and Communications (PerCom)](https://ieeexplore.ieee.org/xpl/conhome/9125449/proceeding)
|
||||
- 2020-07-07 - [5 Best API Documentation Tools](https://blog.dreamfactory.com/5-best-api-documentation-tools/) by Susanna Bouse at [DreamFactory Blog](https://blog.dreamfactory.com/)
|
||||
@@ -776,20 +770,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2020-07-20 - [Datadog API client libraries now available for Java and Go](https://www.datadoghq.com/blog/java-go-libraries/) by Jordan Obey at [Datadog Blog](https://www.datadoghq.com/blog)
|
||||
- 2020-07-23 - [Generate Client SDK for .NET Core using Open Api](https://dev.to/no0law1/generate-client-sdk-for-net-core-using-open-api-2dgh) by [Nuno Reis](https://dev.to/no0law1)
|
||||
- 2020-07-26 - [Dartのhttp_interceptorライブラリを使うと配列のクエリパラメータが消えてしまう件の応急処置](https://qiita.com/gyamoto/items/eeeff81b6770487319ed) by [@gyamoto](https://qiita.com/gyamoto)
|
||||
- 2020-08-01 - [Generate Angular ReactiveForms from Swagger/OpenAPI](https://dev.to/martinmcwhorter/generate-angular-reactiveforms-from-swagger-openapi-35h9) by [Martin McWhorter](https://dev.to/martinmcwhorter)
|
||||
- 2020-08-03 - [Criando Bibliotecas para APIs RESTful com OpenAPI, Swagger Editor e OpenAPI Generator](https://medium.com/@everisBrasil/criando-bibliotecas-para-apis-restful-com-openapi-swagger-editor-e-openapi-generator-75349a6420fd) by [everis Brasil (an NTT DATA Company)](https://medium.com/@everisBrasil)
|
||||
- 2020-08-19 - [マイクロサービスを連携してみよう](https://thinkit.co.jp/article/17704) by [岡井 裕矢(おかい ゆうや)](https://thinkit.co.jp/author/17588), [泉 勝(いずみ まさる)](https://thinkit.co.jp/author/17705) at [Think IT(シンクイット)](https://thinkit.co.jp/)
|
||||
- 2020-08-25 - [OpenAPI Generator と TypeScript で型安全にフロントエンド開発をしている話](https://tech.smarthr.jp/entry/2020/08/25/135631) at [SmartHR Tech Blog](https://tech.smarthr.jp/)
|
||||
- 2020-09-10 - [Introduction to OpenAPI with Instana](https://www.instana.com/blog/introduction-to-openapi-with-instana/) by [Cedric Ziel](https://www.instana.com/blog/author/cedricziel/) at [Instana Blog](https://www.instana.com/blog/)
|
||||
- 2020-09-17 - [Generate PowerShellSDK using openapi-generator](https://medium.com/@ghufz.learn/generate-powershellsdk-using-openapi-generator-33b700891e33) by [Ghufran Zahidi](https://medium.com/@ghufz.learn)
|
||||
- 2020-09-24 - [How to automate API code generation (OpenAPI/Swagger) and boost productivity - Tutorial with React Native featuring TypeScript](https://medium.com/@sceleski/how-to-automate-api-code-generation-openapi-swagger-and-boost-productivity-1176a0056d8a) by [Sanjin Celeski](https://medium.com/@sceleski)
|
||||
- 2020-09-25 - [Generate OpenAPI Angular Client](https://medium.com/@pguso/generate-openapi-angular-client-8c9288e8bbd4) by [Patric](https://medium.com/@pguso)
|
||||
- 2020-10-24 - [Working with Microsoft Identity - React Native Client](https://www.josephguadagno.net/2020/10/24/working-with-microsoft-identity-react-native-client) by [Joseph Guadagno](https://www.josephguadagno.net/)
|
||||
- 2020-10-31 - [[B2] OpenAPI Specification으로 타입-세이프하게 API 개발하기: 희망편 VS 절망편](https://www.youtube.com/watch?v=J4JHLESAiFk) by 최태건 at [FEConf 2020](https://2020.feconf.kr/)
|
||||
- 2020-11-05 - [Automated REST-Api Code Generation: Wie IT-Systeme miteinander sprechen](https://www.massiveart.com/blog/automated-rest-api-code-generation-wie-it-systeme-miteinander-sprechen) by Stefan Rottensteiner at [MASSIVE ART Blog](https://www.massiveart.com/blog)
|
||||
- 2020-12-01 - [OpenAPI GeneratorでGoのAPIサーバー/クライアントコードを自動生成する](https://qiita.com/saki-engineering/items/b20d8b6074c4da9664a5) by [@saki-engineering](https://qiita.com/saki-engineering)
|
||||
- 2020-12-09 - [プロジェクトにOpenAPI Generatorで自動生成された型付きAPI Clientを導入した話](https://qiita.com/yoshifujiT/items/905c18700ede23f40840) by [@yoshifujiT](https://github.com/yoshifujiT)
|
||||
- 2020-12-15 - [Next.js + NestJS + GraphQLで変化に追従するフロントエンドへ 〜 ショッピングクーポンの事例紹介](https://techblog.yahoo.co.jp/entry/2020121530052952/) by [小倉 陸](https://github.com/ogugu9) at [Yahoo! JAPAN Tech Blog](https://techblog.yahoo.co.jp/)
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
|
||||
@@ -828,7 +810,7 @@ Here is a list of template creators:
|
||||
* Dart (refactor): @joernahrens
|
||||
* Dart 2: @swipesight
|
||||
* Dart (Jaguar): @jaumard
|
||||
* Dart (Dio): @josh-burton
|
||||
* Dart (Dio): @athornz
|
||||
* Elixir: @niku
|
||||
* Elm: @eriktim
|
||||
* Eiffel: @jvelilla
|
||||
@@ -864,7 +846,7 @@ Here is a list of template creators:
|
||||
* PHP (Guzzle): @baartosz
|
||||
* PowerShell: @beatcracker
|
||||
* PowerShell (refactored in 5.0.0): @wing328
|
||||
* Python: @spacether
|
||||
* Python-experimental: @spacether
|
||||
* R: @ramnov
|
||||
* Ruby (Faraday): @meganemura @dkliban
|
||||
* Rust: @farcaller
|
||||
@@ -984,7 +966,7 @@ If you want to join the committee, please kindly apply by sending an email to te
|
||||
| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) @muttleyxd (2019/08) |
|
||||
| C# | @mandrean (2017/08) @frankyjuang (2019/09) @shibayan (2020/02) |
|
||||
| Clojure | |
|
||||
| Dart | @swipesight (2018/09) @jaumard (2018/09) @josh-burton (2019/12) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) |
|
||||
| Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) @athornz (2019/12) @amondnet (2019/12) |
|
||||
| Eiffel | @jvelilla (2017/09) |
|
||||
| Elixir | @mrmstn (2018/12) |
|
||||
| Elm | @eriktim (2018/09) |
|
||||
@@ -1032,7 +1014,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/
|
||||
- [Daniel](https://github.com/Danielku15)
|
||||
- [Emiliano Bonassi](https://github.com/emilianobonassi)
|
||||
- [Erik Timmers](https://github.com/eriktim)
|
||||
- [Esteban Gehring](https://github.com/macjohnny)
|
||||
- [Esteban Marin](https://github.com/macjohnny)
|
||||
- [Gustavo Paz](https://github.com/gustavoapaz)
|
||||
- [Javier Velilla](https://github.com/jvelilla)
|
||||
- [Jean-François Côté](https://github.com/JFCote)
|
||||
@@ -1075,7 +1057,7 @@ OpenAPI Generator is a fork of [Swagger Codegen](https://github.com/swagger-api/
|
||||
## [7 - License](#table-of-contents)
|
||||
-------
|
||||
|
||||
Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
Copyright 2018 SmartBear Software
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
||||
14
appveyor.yml
14
appveyor.yml
@@ -35,17 +35,9 @@ install:
|
||||
- ps: Install-Module Pester -Force -Scope CurrentUser
|
||||
build_script:
|
||||
- dotnet --info
|
||||
# build C# aspnetcore 3.1 server
|
||||
- dotnet build samples\server\petstore\aspnetcore-3.1\Org.OpenAPITools.sln
|
||||
# build C# aspnetcore 3.0 server
|
||||
- dotnet build samples\server\petstore\aspnetcore-3.0\Org.OpenAPITools.sln
|
||||
# build C# aspnetcore 2.2 server
|
||||
- dotnet build samples\server\petstore\aspnetcore\Org.OpenAPITools.sln
|
||||
# build C# API client (netcore)
|
||||
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient\Org.OpenAPITools.sln
|
||||
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClientCore\Org.OpenAPITools.sln
|
||||
# build C# API client (.net framework 4.7)
|
||||
- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-net47\Org.OpenAPITools.sln
|
||||
# build C# API client
|
||||
- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln
|
||||
- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
@@ -53,8 +45,8 @@ build_script:
|
||||
- nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln
|
||||
- msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
# build C# .net standard 1.3+ API client
|
||||
#- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln
|
||||
#- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln
|
||||
- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
|
||||
# install openapi-generator locally
|
||||
- mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
# run the locally installed openapi-generator-gradle-plugin
|
||||
@@ -63,8 +55,6 @@ test_script:
|
||||
# test c# API client (netcore)
|
||||
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
# test C# API client (.net framework 4.7)
|
||||
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-net47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
# test c# API client
|
||||
- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
|
||||
# test c# API client (with PropertyChanged)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: aspnetcore
|
||||
outputDir: samples/server/petstore/aspnetcore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/2.1
|
||||
additionalProperties:
|
||||
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
|
||||
aspnetCoreVersion: "2.2"
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: aspnetcore
|
||||
outputDir: samples/server/petstore/aspnetcore-3.1
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
|
||||
additionalProperties:
|
||||
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
|
||||
# comment out below as 3.1 the default
|
||||
#aspnetCoreVersion: "3.1"
|
||||
userSecretsGuid: "76e9e993-9159-441c-9c5b-fe95e7f4f020"
|
||||
@@ -1,11 +0,0 @@
|
||||
# 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
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
useCompareNetObjects: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
useOneOfDiscriminatorLookup: true
|
||||
targetFramework: net47
|
||||
@@ -1,10 +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/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
useCompareNetObjects: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
useOneOfDiscriminatorLookup: true
|
||||
useCompareNetObjects: "true"
|
||||
|
||||
@@ -1,6 +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
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: dart-dio
|
||||
outputDir: samples/client/petstore/dart-dio/petstore_client_lib
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart-dio
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -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"
|
||||
8
bin/configs/dart-openapi-browser-client.yaml
Normal file
8
bin/configs/dart-openapi-browser-client.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: dart
|
||||
outputDir: samples/client/petstore/dart/openapi-browser-client
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart
|
||||
additionalProperties:
|
||||
supportDart2: "false"
|
||||
hideGenerationTimestamp: "true"
|
||||
browserClient: "true"
|
||||
8
bin/configs/dart-openapi-flutter.yaml
Normal file
8
bin/configs/dart-openapi-flutter.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: dart
|
||||
outputDir: samples/client/petstore/dart/flutter_petstore/openapi
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart
|
||||
additionalProperties:
|
||||
supportDart2: "false"
|
||||
hideGenerationTimestamp: "true"
|
||||
browserClient: "false"
|
||||
8
bin/configs/dart-openapi.yaml
Normal file
8
bin/configs/dart-openapi.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: dart
|
||||
outputDir: samples/client/petstore/dart/openapi
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart
|
||||
additionalProperties:
|
||||
supportDart2: "false"
|
||||
hideGenerationTimestamp: "true"
|
||||
browserClient: "false"
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: dart
|
||||
outputDir: samples/openapi3/client/petstore/dart2/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/dart2
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: dart
|
||||
outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart2
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
6
bin/configs/go-experimental-go-petstore-oas2.yaml
Normal file
6
bin/configs/go-experimental-go-petstore-oas2.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
generatorName: go-experimental
|
||||
outputDir: samples/client/petstore/go-experimental/go-petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go-experimental
|
||||
additionalProperties:
|
||||
packageName: petstore
|
||||
8
bin/configs/go-experimental-go-petstore.yaml
Normal file
8
bin/configs/go-experimental-go-petstore.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: go-experimental
|
||||
outputDir: samples/openapi3/client/petstore/go-experimental/go-petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go-experimental
|
||||
additionalProperties:
|
||||
enumClassPrefix: "true"
|
||||
packageName: petstore
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: go
|
||||
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/go-experimental
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
packageName: x_auth_id_alias
|
||||
@@ -4,4 +4,3 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
packageName: petstore
|
||||
generateInterfaces: true
|
||||
|
||||
8
bin/configs/go-petstore-withXml.yaml
Normal file
8
bin/configs/go-petstore-withXml.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
generatorName: go
|
||||
outputDir: samples/client/petstore/go/go-petstore-withXml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
packageName: petstore
|
||||
withXml: "true"
|
||||
withGoCodegenComment: "true"
|
||||
@@ -1,9 +1,7 @@
|
||||
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/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
enumClassPrefix: "true"
|
||||
packageName: petstore
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
generateInterfaces: true
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/feign-no-nullable
|
||||
library: feign
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
booleanGetterPrefix: is
|
||||
artifactId: petstore-feign-no-nullable
|
||||
hideGenerationTimestamp: "true"
|
||||
additionalModelTypeAnnotations: '@javax.annotation.concurrent.Immutable'
|
||||
openApiNullable: "false"
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: java
|
||||
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8
|
||||
library: jersey2
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
|
||||
additionalProperties:
|
||||
artifactId: openapi3-extensions-x-auth-id-alias-jersey2-java8
|
||||
hideGenerationTimestamp: true
|
||||
@@ -1,11 +0,0 @@
|
||||
generatorName: java
|
||||
outputDir: samples/openapi3/client/petstore/java/native
|
||||
library: native
|
||||
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-openapi3-native
|
||||
hideGenerationTimestamp: true
|
||||
serverPort: "8082"
|
||||
useOneOfDiscriminatorLookup: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/okhttp-gson-dynamicOperations
|
||||
library: okhttp-gson
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-okhttp-gson-dynamicoperations
|
||||
hideGenerationTimestamp: "true"
|
||||
dynamicOperations: "true"
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: java-play-framework
|
||||
outputDir: samples/server/petstore/java-play-framework-no-nullable
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
openApiNullable: "false"
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/petstore/java/vertx-no-nullable
|
||||
library: vertx
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: petstore-vertx-no-nullable
|
||||
hideGenerationTimestamp: "true"
|
||||
openApiNullable: "false"
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: kotlin-spring
|
||||
outputDir: samples/server/petstore/kotlin-springboot-delegate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/kotlin-spring
|
||||
additionalProperties:
|
||||
library: spring-boot
|
||||
delegatePattern: "true"
|
||||
swaggerAnnotations: "true"
|
||||
beanValidations: "true"
|
||||
7
bin/configs/other/aspnetcore-3.1.yaml
Normal file
7
bin/configs/other/aspnetcore-3.1.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: aspnetcore
|
||||
outputDir: samples/server/petstore/aspnetcore-3.1
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0
|
||||
additionalProperties:
|
||||
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
|
||||
aspnetCoreVersion: "3.1"
|
||||
6
bin/configs/other/aspnetcore.yaml
Normal file
6
bin/configs/other/aspnetcore.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
generatorName: aspnetcore
|
||||
outputDir: samples/server/petstore/aspnetcore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/aspnetcore/2.1
|
||||
additionalProperties:
|
||||
packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}'
|
||||
6
bin/configs/other/dart-dio.yaml
Normal file
6
bin/configs/other/dart-dio.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
generatorName: dart-dio
|
||||
outputDir: samples/client/petstore/dart-dio
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/dart-dio
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
7
bin/configs/other/java-vertx-web-rx.yaml
Normal file
7
bin/configs/other/java-vertx-web-rx.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: java-vertx-web
|
||||
outputDir: samples/server/petstore/java-vertx-web/rx
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaVertXWebServer
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
artifactId: java-vertx-web-rx-server
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: java-vertx-web
|
||||
outputDir: samples/server/petstore/java-vertx-web
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaVertXWebServer
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
artifactId: java-vertx-web-server
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: jaxrs-cxf-client
|
||||
outputDir: samples/client/petstore/jaxrs-cxf-client-jackson
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf
|
||||
additionalProperties:
|
||||
artifactId: jaxrs-cxf-jackson-petstore-client
|
||||
jackson: "true"
|
||||
@@ -1,4 +0,0 @@
|
||||
generatorName: php-mezzio-ph
|
||||
outputDir: samples/server/petstore/php-mezzio-ph
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/php-mezzio-ph
|
||||
4
bin/configs/php-ze-ph.yaml
Normal file
4
bin/configs/php-ze-ph.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
generatorName: php-ze-ph
|
||||
outputDir: samples/server/petstore/php-ze-ph
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/php-ze-ph
|
||||
@@ -10,7 +10,3 @@ additionalProperties:
|
||||
powershellGalleryUrl: https://www.powershellgallery.com/packages/PSPetstore
|
||||
apiNamePrefix: PS
|
||||
powershellVersion: "5.0"
|
||||
licenseUri: https://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
projectUri: https://github.com/OpenAPITools/openapi-generator
|
||||
releaseNotes: 'This is a sample project'
|
||||
tags: 'PetStore,powershell,sdk'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: python-legacy
|
||||
generatorName: python
|
||||
outputDir: samples/client/petstore/python-asyncio
|
||||
library: asyncio
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-legacy
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
generatorName: python-experimental
|
||||
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/python-experimental/
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: x_auth_id_alias
|
||||
@@ -0,0 +1,6 @@
|
||||
generatorName: python-experimental
|
||||
outputDir: samples/openapi3/client/features/dynamic-servers/python-experimental/
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/features/dynamic-servers.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: dynamic_servers
|
||||
7
bin/configs/python-experimental-oas2.yaml
Normal file
7
bin/configs/python-experimental-oas2.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
generatorName: python-experimental
|
||||
outputDir: samples/client/petstore/python-experimental
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
disallowAdditionalPropertiesIfNotPresent: "true"
|
||||
packageName: petstore_api
|
||||
6
bin/configs/python-experimental.yaml
Normal file
6
bin/configs/python-experimental.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
generatorName: python-experimental
|
||||
outputDir: samples/openapi3/client/petstore/python-experimental
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: python
|
||||
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/python/
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: x_auth_id_alias
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: python
|
||||
outputDir: samples/openapi3/client/features/dynamic-servers/python/
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/features/dynamic-servers.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: dynamic_servers
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: python-legacy
|
||||
outputDir: samples/client/petstore/python-legacy
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-legacy
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: python-legacy
|
||||
outputDir: samples/openapi3/client/petstore/python-legacy
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-legacy
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
@@ -1,7 +1,6 @@
|
||||
generatorName: python
|
||||
outputDir: samples/client/petstore/python
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
disallowAdditionalPropertiesIfNotPresent: "true"
|
||||
packageName: petstore_api
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
generatorName: python-legacy
|
||||
generatorName: python
|
||||
outputDir: samples/client/petstore/python-tornado
|
||||
library: tornado
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python-legacy
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
generatorName: python
|
||||
outputDir: samples/openapi3/client/petstore/python
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/python
|
||||
additionalProperties:
|
||||
packageName: petstore_api
|
||||
recursionLimit: "1234"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: ruby
|
||||
outputDir: samples/openapi3/client/features/dynamic-servers/ruby/
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/features/dynamic-servers.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/ruby-client
|
||||
additionalProperties:
|
||||
gemVersion: 1.0.0
|
||||
moduleName: DynamicServers
|
||||
gemName: dynamic_servers
|
||||
skipFormModel: "true"
|
||||
@@ -1,12 +0,0 @@
|
||||
generatorName: ruby
|
||||
outputDir: samples/openapi3/client/features/generate-alias-as-model/ruby-client/
|
||||
library: typhoeus
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/features/generate-alias-as-model.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/ruby-client
|
||||
additionalProperties:
|
||||
gemVersion: 1.0.0
|
||||
moduleName: Petstore
|
||||
gemName: petstore
|
||||
skipFormModel: "true"
|
||||
strictSpecBehavior: false
|
||||
generateAliasAsModel: true
|
||||
@@ -4,5 +4,5 @@ library: reqwest
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/rust
|
||||
additionalProperties:
|
||||
supportAsync: false
|
||||
supportAsync: "false"
|
||||
packageName: petstore-reqwest
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
generatorName: spring
|
||||
outputDir: samples/server/petstore/springboot-beanvalidation-no-nullable
|
||||
library: spring-boot
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
additionalProperties:
|
||||
java8: "false"
|
||||
useBeanValidation: true
|
||||
artifactId: spring-boot-beanvalidation-no-nullable
|
||||
hideGenerationTimestamp: "true"
|
||||
openApiNullable: "false"
|
||||
@@ -1,10 +0,0 @@
|
||||
generatorName: spring
|
||||
outputDir: samples/client/petstore/spring-cloud-no-nullable
|
||||
library: spring-cloud
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud
|
||||
additionalProperties:
|
||||
artifactId: petstore-spring-cloud-no-nullable
|
||||
responseWrapper: HystrixCommand
|
||||
hideGenerationTimestamp: "true"
|
||||
openApiNullable: "false"
|
||||
@@ -1,8 +0,0 @@
|
||||
generatorName: spring
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-spring-pageable.yaml
|
||||
outputDir: samples/client/petstore/spring-cloud-spring-pageable
|
||||
artifactId: spring-cloud-spring-pageable
|
||||
library: spring-cloud
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: 'true'
|
||||
@@ -1,10 +0,0 @@
|
||||
generatorName: spring
|
||||
outputDir: samples/server/petstore/spring-mvc-no-nullable
|
||||
library: spring-mvc
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
additionalProperties:
|
||||
artifactId: spring-mvc-server-no-nullable
|
||||
openApiNullable: "false"
|
||||
serverPort: "8002"
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -1,8 +0,0 @@
|
||||
generatorName: spring
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
|
||||
outputDir: samples/server/petstore/spring-mvc-spring-pageable
|
||||
artifactId: spring-mvc-spring-pageable
|
||||
library: spring-mvc
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: 'true'
|
||||
@@ -1,10 +0,0 @@
|
||||
generatorName: spring
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
|
||||
outputDir: samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8
|
||||
artifactId: springboot-spring-pageable-delegatePattern-without-j8
|
||||
library: spring-boot
|
||||
delegatePattern: true
|
||||
java8: false
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: 'true'
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: spring
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
|
||||
outputDir: samples/server/petstore/springboot-spring-pageable-delegatePattern
|
||||
artifactId: springboot-spring-pageable-delegatePattern
|
||||
library: spring-boot
|
||||
delegatePattern: true
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: 'true'
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: spring
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
|
||||
outputDir: samples/server/petstore/springboot-spring-pageable-without-j8
|
||||
artifactId: springboot-spring-pageable-withoutj8
|
||||
library: spring-boot
|
||||
java8: false
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: 'true'
|
||||
@@ -1,8 +0,0 @@
|
||||
generatorName: spring
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing-with-spring-pageable.yaml
|
||||
outputDir: samples/server/petstore/springboot-spring-pageable
|
||||
artifactId: springboot-spring-pageable
|
||||
library: spring-boot
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: 'true'
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
additionalProperties:
|
||||
ngVersion: 11.0.0
|
||||
npmVersion: 1.0.0
|
||||
npmName: '@openapitools/typescript-angular-petstore'
|
||||
npmRepository: https://skimdb.npmjs.com/registry
|
||||
snapshot: false
|
||||
@@ -1,5 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
additionalProperties:
|
||||
ngVersion: 11.0.0
|
||||
@@ -8,4 +8,3 @@ additionalProperties:
|
||||
npmRepository: https://skimdb.npmjs.com/registry
|
||||
snapshot: false
|
||||
apiModulePrefix: PetStore
|
||||
configurationPrefix: PetStore
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
generatorName: typescript-fetch
|
||||
outputDir: samples/client/petstore/typescript-fetch/builds/default-v3.0
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
@@ -1,3 +0,0 @@
|
||||
generatorName: typescript-fetch
|
||||
outputDir: samples/client/petstore/typescript-fetch/builds/enum
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/typescript-fetch/enum.yaml
|
||||
@@ -1,9 +0,0 @@
|
||||
generatorName: typescript-fetch
|
||||
outputDir: samples/client/petstore/typescript-fetch/builds/without-runtime-checks
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
additionalProperties:
|
||||
npmVersion: 1.0.0
|
||||
npmName: '@openapitools/typescript-fetch-petstore'
|
||||
npmRepository: https://skimdb.npmjs.com/registry
|
||||
withoutRuntimeChecks: true
|
||||
snapshot: false
|
||||
@@ -11,7 +11,6 @@ if [ ! -f "$executable" ]; then
|
||||
fi
|
||||
|
||||
export JAVA_OPTS="${JAVA_OPTS} -ea -server -Duser.timezone=UTC"
|
||||
export BATCH_OPTS="${BATCH_OPTS:-}"
|
||||
|
||||
files=()
|
||||
args=()
|
||||
@@ -62,6 +61,6 @@ else
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2068
|
||||
java ${JAVA_OPTS} -jar "$executable" batch ${BATCH_OPTS} --includes-base-dir "${root}" --fail-fast -- ${files[@]}
|
||||
java ${JAVA_OPTS} -jar "$executable" batch --includes-base-dir "${root}" --fail-fast -- ${files[@]}
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
# ruby script to detect changes in test-related files
|
||||
require 'yaml'
|
||||
require 'digest'
|
||||
|
||||
hash = Digest::SHA256.hexdigest("xyz")
|
||||
|
||||
filename= ARGV[0]
|
||||
|
||||
if !filename
|
||||
puts "Usage: #{$0} filename"
|
||||
exit 1
|
||||
end
|
||||
|
||||
if !File.file? filename
|
||||
warn "Error. #{filename} doesn't exist."
|
||||
exit 1
|
||||
end
|
||||
|
||||
mismatch = 0
|
||||
count = 0
|
||||
|
||||
test_files = YAML.load_file(filename)
|
||||
test_files.each do |test_file|
|
||||
count = count + 1
|
||||
# file still exists?
|
||||
if !File.file? test_file['filename']
|
||||
warn "Error. Provided test file `#{test_file['filename']}` doesn't exist."
|
||||
mismatch = mismatch + 1
|
||||
end
|
||||
|
||||
# check sha256 hash
|
||||
sha256 = Digest::SHA256.hexdigest(File.read(test_file['filename']))
|
||||
if test_file['sha256'] != sha256
|
||||
warn "Looks like #{test_file['filename']} has been modified as its SHA256 `#{sha256}` is not the same as the one in the record: #{test_file['sha256']}"
|
||||
mismatch = mismatch + 1
|
||||
else
|
||||
# no change to the test file
|
||||
end
|
||||
end
|
||||
|
||||
if mismatch > 0
|
||||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
warn "There are #{mismatch} mismatch. Please review the test files to ensure it has not been deleted/regenerated."
|
||||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
exit 1
|
||||
else
|
||||
puts "OK. All matched!"
|
||||
end
|
||||
|
||||
if count == 0
|
||||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
warn "Looks like the test file list in #{filename} is empty! Please check!"
|
||||
warn "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
exit 1
|
||||
end
|
||||
|
||||
@@ -53,9 +53,6 @@ if [ -n "$(git status --porcelain)" ]; then
|
||||
git --no-pager diff
|
||||
echo "Perform git status"
|
||||
git status
|
||||
echo -e "\nThis script runs in pull requests against the anticipated merge commit (as if the PR was merged now)."
|
||||
echo "When you see unexpected files here, it likely means that there are newer commits in master that you need to "
|
||||
echo -e "rebase or merge into your branch.\n"
|
||||
echo "Please run 'bin/utils/ensure-up-to-date' locally and commit changes (UNCOMMITTED CHANGES ERROR)"
|
||||
exit 1
|
||||
else
|
||||
|
||||
@@ -10,11 +10,7 @@ if [[ "true" == "${SKIP_EXPORT_DOCS}" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
N=4
|
||||
(
|
||||
for GENERATOR in $(java -jar ${executable} list --short --include all | sed -e 's/,/\'$'\n''/g')
|
||||
do
|
||||
((i=i%N)); ((i++==0)) && wait
|
||||
./bin/utils/export_generator.sh ${GENERATOR} &
|
||||
./bin/utils/export_generator.sh ${GENERATOR}
|
||||
done
|
||||
)
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
# csharp-netcore test files and image for upload
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs"
|
||||
sha256: b74ef9eefa4b41fd3233e083fe2355babf25a77f9073d28e1aa81ae2e0a5f1d0
|
||||
- filename: "samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png"
|
||||
sha256: 0a67c32728197e942b13bdda064b73793f12f5c795f1e5cf35a3adf69c973230
|
||||
99
circle.yml
Normal file
99
circle.yml
Normal file
@@ -0,0 +1,99 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
# docker:
|
||||
# #- image: openapitools/openapi-generator
|
||||
# - image: swaggerapi/petstore
|
||||
# environment:
|
||||
# SWAGGER_HOST=http://petstore.swagger.io
|
||||
# SWAGGER_BASE_PATH=/v2
|
||||
machine:
|
||||
image: circleci/classic:latest
|
||||
working_directory: ~/OpenAPITools/openapi-generator
|
||||
parallelism: 3
|
||||
shell: /bin/bash --login
|
||||
environment:
|
||||
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
|
||||
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
|
||||
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
|
||||
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
|
||||
steps:
|
||||
# Restore the dependency cache
|
||||
- restore_cache:
|
||||
keys:
|
||||
# Default branch if not
|
||||
- source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
- source-v2-{{ .Branch }}-
|
||||
- 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
|
||||
# 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.
|
||||
# In many cases you can simplify this from what is generated here.
|
||||
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
|
||||
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
|
||||
# This is based on your 1.0 configuration file or project settings
|
||||
- run:
|
||||
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
|
||||
- run:
|
||||
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
|
||||
- run:
|
||||
command: |-
|
||||
printf '127.0.0.1 petstore.swagger.io
|
||||
' | sudo tee -a /etc/hosts
|
||||
# Dependencies
|
||||
# Install latest stable node for angular 6
|
||||
- run:
|
||||
name: Install node@stable (for angular 6)
|
||||
command: |
|
||||
set +e
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
|
||||
export NVM_DIR="/opt/circleci/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install stable
|
||||
nvm alias default stable
|
||||
|
||||
# Each step uses the same `$BASH_ENV`, so need to modify it
|
||||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
|
||||
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> $BASH_ENV
|
||||
- run: node --version
|
||||
# - run: docker pull openapitools/openapi-petstore
|
||||
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
|
||||
- run: docker pull swaggerapi/petstore
|
||||
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
|
||||
- run: docker ps -a
|
||||
- run: sleep 30
|
||||
- run: cat /etc/hosts
|
||||
# Test
|
||||
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
|
||||
- run: ./CI/circle_parallel.sh
|
||||
# Save dependency cache
|
||||
- save_cache:
|
||||
key: source-v2-{{ .Branch }}-{{ .Revision }}
|
||||
paths:
|
||||
# This is a broad list of cache paths to include many possible development environments
|
||||
# You can probably delete some of these entries
|
||||
- vendor/bundle
|
||||
- ~/virtualenvs
|
||||
- ~/.m2
|
||||
- ~/.ivy2
|
||||
- ~/.sbt
|
||||
- ~/.bundle
|
||||
- ~/.go_workspace
|
||||
- ~/.gradle
|
||||
- ~/.cache/bower
|
||||
- ".git"
|
||||
- ~/.stack
|
||||
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
|
||||
- ~/R
|
||||
# Teardown
|
||||
# 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
|
||||
# Save test results
|
||||
- store_test_results:
|
||||
path: /tmp/circleci-test-results
|
||||
# Save artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-artifacts
|
||||
- store_artifacts:
|
||||
path: /tmp/circleci-test-results
|
||||
@@ -12,7 +12,7 @@ codegen="${cli}/target/openapi-generator-cli.jar"
|
||||
# We code in a list of commands here as source processing is potentially buggy (requires undocumented conventional use of annotations).
|
||||
# A list of known commands helps us determine if we should compile CLI. There's an edge-case where a new command not added to this
|
||||
# list won't be considered a "real" command. We can get around that a bit by checking CLI completions beforehand if it exists.
|
||||
commands="config-help,generate,batch,help,list,meta,validate,version"
|
||||
commands="config-help,generate,help,list,meta,validate,version"
|
||||
|
||||
if [ $# == 0 ]; then
|
||||
echo "No command specified. Available commands:"
|
||||
|
||||
@@ -44,7 +44,7 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c
|
||||
./run-in-docker.sh help # Executes 'help' command for openapi-generator-cli
|
||||
./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 \
|
||||
./run-in-docker.sh generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-g go -o /gen/out/go-petstore --packageName=petstore # generates go client, outputs locally to ./out/go-petstore
|
||||
```
|
||||
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
---
|
||||
id: configuration
|
||||
title: Configuration Options
|
||||
---
|
||||
|
||||
Our tooling supports the following types of configuration:
|
||||
|
||||
* [global properties](./global-properties.md)
|
||||
- properties with cross-cutting concerns which control generation, but _don't_ belong to individual generators
|
||||
- Example: `debugSupportingFiles` prints the contents of template data bound to supporting files
|
||||
* config options
|
||||
- configuration specific to each individual [generator](./generators/README.md)
|
||||
- these options are susceptible to validation within the defining generator; a config option of the same name across multiple generators may be validated differently in each
|
||||
- NOTE: The CLI accepts config options as "additional properties"
|
||||
* additional properties
|
||||
- these are the properties which will be passed to templates
|
||||
- generally used to pass user-defined properties to custom templates
|
||||
- many config options may also be passed as additional properties, however generators will read/modify/rewrite config options
|
||||
- users may pass custom additional properties and use these within templates (e.g. a custom `generatedBy` key with a value of `Jim Schubert` for inclusion in a custom CVS-like header)
|
||||
* top-level properties specific to individual tools/plugins used to bootstrap our tooling
|
||||
|
||||
## Tool-specific Declarations
|
||||
|
||||
The READMEs for the [CLI](https://openapi-generator.tech/docs/usage#generate), [Gradle Plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin), [Maven Plugin](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin), and [SBT Plugin](https://github.com/OpenAPITools/sbt-openapi-generator/blob/master/README.md) may have top-level or tooling specific options which appear to duplicate 'config options' or 'global properties'. Each may also expose user-facing properties slightly differently from the other tools. This may occur due to:
|
||||
|
||||
* Conventions used by the underlying tooling
|
||||
* Limitations in underlying frameworks which define how properties must be declared
|
||||
* Continuation of support for "legacy" invocation patterns
|
||||
* Mistakes in documentation and/or contributions (please do [file a bug](https://github.com/OpenAPITools/openapi-generator/issues/new?assignees=&labels=Issue%3A+Bug&template=bug_report.md&title=%5BBUG%5D+Issue+with+options))
|
||||
|
||||
Take, for example, the CLI option of `--skip-validate-spec`. This flag sets the value to true with no option to set it to false (the default internally). The maven and gradle plugins allow for the top-level option `skipValidateSpec` to have a value of true or false. The SBT plugin, on the other hand, follows community convention and this property is `openApiSkipValidateSpec`.
|
||||
|
||||
_How_ you provide values to options also depends on the tool. OpenAPI Generator supports global properties for [selective generation](https://openapi-generator.tech/docs/customization/#selective-generation) -- such as `apis` -- to have either a blank value or a comma-separated list of selected values. We would define this in CLI as `--global-property apis` or `--global-property apis=Equipment`. In the Gradle Plugin, these properties are set directly as strings:
|
||||
|
||||
```
|
||||
openApiGenerate {
|
||||
globalProperties = [
|
||||
apis: "",
|
||||
models: "User,Pet"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
In the Maven plugin, we're limited by XML syntax where `<apis/>` and `<apis></apis>` are treated the same as if the `apis` node was undefined; there's no way to provide an empty string as a default. Instead, we have to extract the global property into its own properties which maintain the two states supported elsewhere (i.e. "all apis" or "select apis"). We have `generateApis` which accepts a boolean and `apisToGenerate` which accepts a comma-separated selection list.
|
||||
|
||||
## Discovering Options
|
||||
|
||||
Refer to [global properties](./global-properties.md) for a list of available global properties and their usage.
|
||||
|
||||
Top-level tooling options are defined in [CLI usage](https://openapi-generator.tech/docs/usage/#generate). Many of these options directly map to camel case options in other tools, but do refer to [plugin documentation](https://openapi-generator.tech/docs/plugins) for full details or plugin-specific differences.
|
||||
|
||||
Config options for generators are available in [documentation online](https://openapi-generator.tech/docs/generators). You may also use the CLI to query config options for a target generator using `openapi-generator config-help -g <generator-name>`. For example:
|
||||
|
||||
```
|
||||
$ openapi-generator config-help -g mysql-schema
|
||||
|
||||
CONFIG OPTIONS
|
||||
|
||||
defaultDatabaseName
|
||||
Default database name for all MySQL queries (Default: )
|
||||
|
||||
identifierNamingConvention
|
||||
Naming convention of MySQL identifiers(table names and column names). This is not related to database name which is defined by defaultDatabaseName option (Default: original)
|
||||
original - Do not transform original names
|
||||
snake_case - Use snake_case names
|
||||
|
||||
jsonDataTypeEnabled
|
||||
Use special JSON MySQL data type for complex model properties. Requires MySQL version 5.7.8. Generates TEXT data type when disabled (Default: true)
|
||||
|
||||
namedParametersEnabled
|
||||
Generates model prepared SQLs with named parameters, eg. :petName. Question mark placeholder used when option disabled. (Default: false)
|
||||
```
|
||||
|
||||
This output provides the name of the configuration option. A set of acceptable values for any constrained values will print as an indented list (e.g. `identifierNamingConvention` above).
|
||||
|
||||
Suppose you want to apply snake case naming to mysql schema outputs. Your configuration might resemble the following examples.
|
||||
|
||||
**CLI**
|
||||
|
||||
```
|
||||
openapi-generator -g mysql-schema -o out -i spec.yaml --additional-properties=identifierNamingConvention=snake_case
|
||||
```
|
||||
|
||||
It may seem like a typo but there are two `=` signs in the above example.
|
||||
|
||||
**Maven Plugin**
|
||||
|
||||
```
|
||||
<execution>
|
||||
<id>mysql-schema</id>
|
||||
<phase>generate-sources</phase>
|
||||
<goals>
|
||||
<goal>generate</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<inputSpec>spec.yaml</inputSpec>
|
||||
<generatorName>mysql-schema</generatorName>
|
||||
<configOptions>
|
||||
<identifierNamingConvention>snake_case</identifierNamingConvention>
|
||||
</configOptions>
|
||||
<output>${project.build.directory}/generated-sources/mysql</output>
|
||||
</configuration>
|
||||
</execution>
|
||||
```
|
||||
|
||||
**Gradle Plugin**
|
||||
|
||||
```
|
||||
openApiGenerate {
|
||||
generatorName = "mysql-schema"
|
||||
inputSpec = "$rootDir/spec.yaml".toString()
|
||||
outputDir = "$buildDir/mysql".toString()
|
||||
configOptions = [
|
||||
identifierNamingConvention: "snake_case"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -91,7 +91,9 @@ To add test cases (optional) covering the change in the code generator, please r
|
||||
To test the templates, please perform the following:
|
||||
|
||||
- Update the Petstore sample by running the shell scripts under the `bin` folder. For example, run `./bin/generate-samples.sh .
|
||||
/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
/bin/configs/python*` to update the Python-related samples under [`samples`](https://github.com/openapitools/openapi-generator/tree/master/samples). For Windows, please install [GIT bash](https://gitforwindows.org/). (If you find that there are new files g
|
||||
enerated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec fro
|
||||
m time to time. If you've questions or concerns, please open a ticket to start a discussion)
|
||||
- During development it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `-t modules/openapi-generator/src/main/resources/python`.
|
||||
- Run the tests in the sample folder using maven `mvn integration-test -f /path/to/pom.xml`, e.g. `mvn integration-test -f samples/client/petstore/python/pom.xml`. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
|
||||
- Finally, git commit the updated samples files: `git commit -a`
|
||||
|
||||
@@ -3,77 +3,6 @@ id: customization
|
||||
title: Customization
|
||||
---
|
||||
|
||||
## User-defined Templates
|
||||
|
||||
The most common scenario for user customization is to override the built-in templates with small modifications. That scenario's documentation is in our [templating](./templating.md) page, and differs from user-defined templates.
|
||||
|
||||
Prior to release 5.0.0, whenever a user wanted to include templates which weren't built-in or weren't known to the generator at compile time, they'd need to follow the more involved approach of creating a custom generator as documented later in this document. Beginning in 5.0.0, a user may now provide additional supporting files and extensions to built-in templates via configuration. This feature requires using the external configuration file feature.
|
||||
|
||||
Consider that you might want to add some static documentation such as `AUTHORS.md` and a custom tooling script. Rather than a single file for API definitions you also want an implementation file and a separate interface file for each.
|
||||
|
||||
You might have an external configuration file named `config.yaml` which defines additional properties like this for a `kotlin` client generator:
|
||||
|
||||
```yaml
|
||||
additionalProperties:
|
||||
artifactId: kotlin-petstore-client
|
||||
serializableModel: "true"
|
||||
dateLibrary: java8
|
||||
```
|
||||
|
||||
You would generate via CLI with the command:
|
||||
|
||||
```shell script
|
||||
openapi-generator generate -g kotlin -i spec.yaml -o outdir -c config.yaml
|
||||
```
|
||||
|
||||
To support the above scenario with custom templates, ensure that you're pointing to your custom template directory and add a `files` node with template file definitions to your config:
|
||||
|
||||
```
|
||||
templateDir: my_custom_templates
|
||||
additionalProperties:
|
||||
artifactId: kotlin-petstore-client
|
||||
serializableModel: "true"
|
||||
dateLibrary: java8
|
||||
files:
|
||||
AUTHORS.md: {}
|
||||
api_interfaces.mustache:
|
||||
templateType: API
|
||||
destinationFilename: Interface.kt
|
||||
api.mustache:
|
||||
templateType: API
|
||||
destinationFilename: Impl.kt
|
||||
other/check.mustache:
|
||||
folder: scripts
|
||||
destinationFilename: check.sh
|
||||
templateType: SupportingFiles
|
||||
```
|
||||
|
||||
The keys under the `files` node are your template filenames. These honor the same resolution order as all other templates.
|
||||
|
||||
The above configuration will do the following:
|
||||
|
||||
* Copy `my_custom_templates/AUTHORS.md` to the generated output directory without processing via the template engine (due to template file extension). The empty object definition following `AUTHORS.md` allows the tool to infer the target output filename in the root of the output directory.
|
||||
* Compile a user-provided `my_custom_templates/api_interfaces.mustache` following our usual API template compilation logic. That is, one file will be created per API; APIs are generated defined according to tags in your spec documentation. The destination filename of `Interface.kt` will act as a suffix for the filename. So, a tag of `Equipment` will output a corresponding `EquipmentInterface.kt`.
|
||||
* Because `api.mustache` is the same mustache filename as used in your target generator (`kotlin` in this example), we support the following:
|
||||
- The destination filename provides a suffix for the generated output. APIs generate per tag in your specification. So, a tag of `Equipment` will output a corresponding `EquipmentImpl.kt`. This option will be used whether `api.mustache` targets a user customized template or a built-in template.
|
||||
- The built-in template will be used if you haven't provided an customized template. The kotlin generator defines the suffix as simply `.kt`, so this scenario would modify only the generated file suffixes according to the previous bullet point.
|
||||
- Your `api.mustache` will be used if it exists in your custom template directory. For generators with library options, such as `jvm-okhttp3` in the kotlin generator, your file must exist in the same relative location as the embedded template. For kotlin using the `jvm-okhttp3` library option, this file would need to be located at `my_custom_templates/libraries/jvm-okhttp/api.mustache`. See [templating](./templating.md) for more details.
|
||||
* Compile `my_custom_templates/other/check.mustache` with the supporting files bundle, and output to `scripts/check.sh` in your output directory. Note that we don't currently support setting file flags on output, so scripts such as these will either have to be sourced rather than executed, or have file flags set separately after generation (external to our tooling).
|
||||
|
||||
The `templateType` option will default to `SupportingFiles`, so the option for `other/check.mustache` is redundant and provided to demonstrate the full template file configuration options. The available template types are:
|
||||
|
||||
* API
|
||||
* APIDocs
|
||||
* APITests
|
||||
* Model
|
||||
* ModelDocs
|
||||
* ModelTests
|
||||
* SupportingFiles
|
||||
|
||||
Excluding `SupportingFiles`, each of the above options may result in multiple files. API related types create a file per API. Model related types create a file for each model.
|
||||
|
||||
Note that user-defined templates will merge with built-in template definitions. If a supporting file with the sample template file path exists, it will be replaced with the user-defined template, otherwise the user-defined template will be added to the list of template files to compile. If the generator's built-in template is `model_docs.mustache` and you define `model-docs.mustache`, this will result in duplicated model docs (if `destinationFilename` differs) or undefined behavior as whichever template compiles last will overwrite the previous model docs (if `destinationFilename` matches the extension or suffix in the generator's code).
|
||||
|
||||
## Custom Generator (and Template)
|
||||
|
||||
<a id="creating-a-new-template"></a> If none of the built-in generators suit your needs and you need to do more than just modify the mustache templates to tweak generated code, you can create a brand new generator and its associated templates. OpenAPI Generator can help with this, using the `meta` command:
|
||||
@@ -91,12 +20,7 @@ These names can be anything you like. If you are building a client for the white
|
||||
|
||||
### Use your new generator with the CLI
|
||||
|
||||
To compile your library, enter the `out/generators/my-codegen` directory, run `mvn package`.
|
||||
|
||||
**NOTE** Running your custom generator requires adding it to the classpath. This differs on [Windows](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) slightly from [unix](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/classpath.html).
|
||||
If you are running a Windows Subsystem for Linux or a shell such as gitbash, and have issues with the unix variant, try the Windows syntax below.
|
||||
|
||||
Now, execute the generator:
|
||||
To compile your library, enter the `out/generators/my-codegen` directory, run `mvn package` and execute the generator:
|
||||
|
||||
```sh
|
||||
java -cp out/generators/my-codegen/target/my-codegen-openapi-generator-1.0.0.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar org.openapitools.codegen.OpenAPIGenerator
|
||||
@@ -104,7 +28,7 @@ java -cp out/generators/my-codegen/target/my-codegen-openapi-generator-1.0.0.jar
|
||||
|
||||
For Windows users, you will need to use `;` instead of `:` in the classpath, e.g.
|
||||
```
|
||||
java -cp "out/generators/my-codegen/target/my-codegen-openapi-generator-1.0.0.jar;modules/openapi-generator-cli/target/openapi-generator-cli.jar" org.openapitools.codegen.OpenAPIGenerator
|
||||
java -cp out/generators/my-codegen/target/my-codegen-openapi-generator-1.0.0.jar;modules/openapi-generator-cli/target/openapi-generator-cli.jar org.openapitools.codegen.OpenAPIGenerator
|
||||
```
|
||||
|
||||
Note the `my-codegen` is an option for `-g` now, and you can use the usual arguments for generating your code:
|
||||
@@ -112,15 +36,15 @@ Note the `my-codegen` is an option for `-g` now, and you can use the usual argum
|
||||
```sh
|
||||
java -cp out/codegens/customCodegen/target/my-codegen-openapi-generator-1.0.0.jar:modules/openapi-generator-cli/target/openapi-generator-cli.jar \
|
||||
org.openapitools.codegen.OpenAPIGenerator generate -g my-codegen \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-o ./out/myClient
|
||||
```
|
||||
|
||||
For Windows users:
|
||||
```
|
||||
java -cp "out/codegens/customCodegen/target/my-codegen-openapi-generator-1.0.0.jar;modules/openapi-generator-cli/target/openapi-generator-cli.jar" \
|
||||
java -cp out/codegens/customCodegen/target/my-codegen-openapi-generator-1.0.0.jar;modules/openapi-generator-cli/target/openapi-generator-cli.jar \
|
||||
org.openapitools.codegen.OpenAPIGenerator generate -g my-codegen \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-o ./out/myClient
|
||||
```
|
||||
|
||||
@@ -283,7 +207,7 @@ Each of these files creates reasonable defaults so you can get running quickly.
|
||||
|
||||
```sh
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml \
|
||||
-g java \
|
||||
-o samples/client/petstore/java \
|
||||
-c path/to/config.json
|
||||
|
||||
@@ -39,7 +39,7 @@ config.templateDir = 'src/openapi-generator-templates/Java/libraries/feign
|
||||
```
|
||||
mvn clean package
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
||||
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \
|
||||
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \
|
||||
-l java --library=okhttp-gson \
|
||||
--additional-properties hideGenerationTimestamp=true \
|
||||
-o /var/tmp/java/okhttp-gson/
|
||||
@@ -55,7 +55,7 @@ To generate the Android SDK with [`volley`](https://github.com/mcxiaoke/android-
|
||||
```
|
||||
mvn clean package
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
||||
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.json \
|
||||
-i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.json \
|
||||
-l android --library=volley \
|
||||
-o /var/tmp/android/volley/
|
||||
```
|
||||
|
||||
@@ -48,7 +48,7 @@ Let's see how to pass Ruby generated files to Rubocop, a static code analysis/li
|
||||
# First, export the required environment variable
|
||||
export RUBY_POST_PROCESS_FILE="/usr/local/bin/rubocop -a"
|
||||
|
||||
export OPENAPI_DOC="https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml"
|
||||
export OPENAPI_DOC="https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"
|
||||
|
||||
# Invoke the generator with --enable-post-process-file
|
||||
openapi-generator generate --enable-post-process-file -i $OPENAPI_DOC -g ruby -o .out-ruby/
|
||||
|
||||
@@ -29,7 +29,7 @@ The following generators are available:
|
||||
* [erlang-proper](generators/erlang-proper.md)
|
||||
* [flash-deprecated (deprecated)](generators/flash-deprecated.md)
|
||||
* [go](generators/go.md)
|
||||
* [go-deprecated (deprecated)](generators/go-deprecated.md)
|
||||
* [go-experimental (experimental)](generators/go-experimental.md)
|
||||
* [groovy](generators/groovy.md)
|
||||
* [haskell-http-client](generators/haskell-http-client.md)
|
||||
* [java](generators/java.md)
|
||||
@@ -48,8 +48,8 @@ The following generators are available:
|
||||
* [perl](generators/perl.md)
|
||||
* [php](generators/php.md)
|
||||
* [powershell (beta)](generators/powershell.md)
|
||||
* [python (experimental)](generators/python.md)
|
||||
* [python-legacy](generators/python-legacy.md)
|
||||
* [python](generators/python.md)
|
||||
* [python-experimental (experimental)](generators/python-experimental.md)
|
||||
* [r](generators/r.md)
|
||||
* [ruby](generators/ruby.md)
|
||||
* [rust](generators/rust.md)
|
||||
@@ -107,11 +107,11 @@ The following generators are available:
|
||||
* [nodejs-express-server (beta)](generators/nodejs-express-server.md)
|
||||
* [php-laravel](generators/php-laravel.md)
|
||||
* [php-lumen](generators/php-lumen.md)
|
||||
* [php-mezzio-ph](generators/php-mezzio-ph.md)
|
||||
* [php-silex-deprecated (deprecated)](generators/php-silex-deprecated.md)
|
||||
* [php-slim-deprecated (deprecated)](generators/php-slim-deprecated.md)
|
||||
* [php-slim4](generators/php-slim4.md)
|
||||
* [php-symfony](generators/php-symfony.md)
|
||||
* [php-ze-ph](generators/php-ze-ph.md)
|
||||
* [python-aiohttp](generators/python-aiohttp.md)
|
||||
* [python-blueplanet](generators/python-blueplanet.md)
|
||||
* [python-flask](generators/python-flask.md)
|
||||
@@ -140,13 +140,13 @@ The following generators are available:
|
||||
|
||||
## SCHEMA generators
|
||||
* [avro-schema (beta)](generators/avro-schema.md)
|
||||
* [graphql-schema](generators/graphql-schema.md)
|
||||
* [mysql-schema](generators/mysql-schema.md)
|
||||
* [protobuf-schema (beta)](generators/protobuf-schema.md)
|
||||
|
||||
|
||||
## CONFIG generators
|
||||
* [apache2](generators/apache2.md)
|
||||
* [graphql-schema](generators/graphql-schema.md)
|
||||
* [protobuf-schema (beta)](generators/protobuf-schema.md)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ The following generators are available:
|
||||
* [perl](perl.md)
|
||||
* [php](php.md)
|
||||
* [powershell](powershell.md)
|
||||
* [python](python.md)
|
||||
* [python-legacy](python-legacy.md)
|
||||
* [python](python.md)
|
||||
* [python-experimental (experimental)](python-experimental.md)
|
||||
* [r](r.md)
|
||||
* [ruby](ruby.md)
|
||||
* [rust](rust.md)
|
||||
@@ -96,9 +96,9 @@ The following generators are available:
|
||||
* [nodejs-express-server (beta)](nodejs-express-server.md)
|
||||
* [php-laravel](php-laravel.md)
|
||||
* [php-lumen](php-lumen.md)
|
||||
* [php-mezzio-ph](php-mezzio-ph.md)
|
||||
* [php-slim4](php-slim4.md)
|
||||
* [php-symfony](php-symfony.md)
|
||||
* [php-ze-ph](php-ze-ph.md)
|
||||
* [python-aiohttp](python-aiohttp.md)
|
||||
* [python-blueplanet](python-blueplanet.md)
|
||||
* [python-flask](python-flask.md)
|
||||
|
||||
@@ -3,14 +3,12 @@ title: Config Options for ada-server
|
||||
sidebar_label: ada-server
|
||||
---
|
||||
|
||||
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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|legacyDiscriminatorBehavior|Set to true for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|projectName|GNAT project name| |defaultProject|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
@@ -31,17 +29,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>DateTime</li>
|
||||
<li>binary</li>
|
||||
<li>Boolean</li>
|
||||
<li>Character</li>
|
||||
<li>Integer</li>
|
||||
<li>boolean</li>
|
||||
<li>date</li>
|
||||
<li>double</li>
|
||||
<li>float</li>
|
||||
<li>integer</li>
|
||||
<li>long</li>
|
||||
<li>number</li>
|
||||
<li>object</li>
|
||||
<li>string</li>
|
||||
</ul>
|
||||
|
||||
## RESERVED WORDS
|
||||
@@ -213,8 +208,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
### Security Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|BasicAuth|✗|OAS2,OAS3
|
||||
|ApiKey|✗|OAS2,OAS3
|
||||
|BasicAuth|✓|OAS2,OAS3
|
||||
|ApiKey|✓|OAS2,OAS3
|
||||
|OpenIDConnect|✗|OAS3
|
||||
|BearerToken|✗|OAS3
|
||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
||||
|
||||
@@ -3,14 +3,12 @@ title: Config Options for ada
|
||||
sidebar_label: ada
|
||||
---
|
||||
|
||||
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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|legacyDiscriminatorBehavior|Set to true for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|projectName|GNAT project name| |defaultProject|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
@@ -31,17 +29,14 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
## LANGUAGE PRIMITIVES
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>DateTime</li>
|
||||
<li>binary</li>
|
||||
<li>Boolean</li>
|
||||
<li>Character</li>
|
||||
<li>Integer</li>
|
||||
<li>boolean</li>
|
||||
<li>date</li>
|
||||
<li>double</li>
|
||||
<li>float</li>
|
||||
<li>integer</li>
|
||||
<li>long</li>
|
||||
<li>number</li>
|
||||
<li>object</li>
|
||||
<li>string</li>
|
||||
</ul>
|
||||
|
||||
## RESERVED WORDS
|
||||
@@ -127,7 +122,7 @@ 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
|
||||
|MockServer|✗|ToolingExtension
|
||||
@@ -168,7 +163,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
### Documentation Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|Readme|✓|ToolingExtension
|
||||
|Readme|✗|ToolingExtension
|
||||
|Model|✓|ToolingExtension
|
||||
|Api|✓|ToolingExtension
|
||||
|
||||
@@ -188,7 +183,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|MultiServer|✗|OAS3
|
||||
|ParameterizedServer|✗|OAS3
|
||||
|ParameterStyling|✗|OAS3
|
||||
|Callbacks|✗|OAS3
|
||||
|Callbacks|✓|OAS3
|
||||
|LinkObjects|✗|OAS3
|
||||
|
||||
### Parameter Feature
|
||||
@@ -207,20 +202,20 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
| ---- | --------- | ---------- |
|
||||
|Simple|✓|OAS2,OAS3
|
||||
|Composite|✓|OAS2,OAS3
|
||||
|Polymorphism|✗|OAS2,OAS3
|
||||
|Polymorphism|✓|OAS2,OAS3
|
||||
|Union|✗|OAS3
|
||||
|
||||
### Security Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|BasicAuth|✗|OAS2,OAS3
|
||||
|ApiKey|✗|OAS2,OAS3
|
||||
|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
|
||||
|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 |
|
||||
|
||||
@@ -3,8 +3,6 @@ title: Config Options for android
|
||||
sidebar_label: android
|
||||
---
|
||||
|
||||
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|
|
||||
@@ -14,11 +12,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|apiPackage|package for generated api classes| |null|
|
||||
|artifactId|artifactId for use in the generated build.gradle and pom.xml| |null|
|
||||
|artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null|
|
||||
|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|groupId|groupId for use in the generated build.gradle and pom.xml| |null|
|
||||
|invokerPackage|root package for generated code| |null|
|
||||
|legacyDiscriminatorBehavior|Set to true for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|library|library template (sub-template) to use|<dl><dt>**volley**</dt><dd>HTTP client: Volley 1.0.19 (default)</dd><dt>**httpclient**</dt><dd>HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.</dd></dl>|null|
|
||||
|modelPackage|package for generated models| |null|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
@@ -36,11 +34,17 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|ArrayList|java.util.ArrayList|
|
||||
|BigDecimal|java.math.BigDecimal|
|
||||
|Date|java.util.Date|
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|LocalTime|org.joda.time.*|
|
||||
|Map|java.util.Map|
|
||||
|Set|java.util.*|
|
||||
|Timestamp|java.sql.Timestamp|
|
||||
|URI|java.net.URI|
|
||||
|UUID|java.util.UUID|
|
||||
|
||||
|
||||
@@ -3,14 +3,12 @@ title: Config Options for apache2
|
||||
sidebar_label: apache2
|
||||
---
|
||||
|
||||
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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|legacyDiscriminatorBehavior|Set to true for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |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|
|
||||
@@ -20,6 +18,23 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|
||||
| Type/Alias | Imports |
|
||||
| ---------- | ------- |
|
||||
|Array|java.util.List|
|
||||
|ArrayList|java.util.ArrayList|
|
||||
|BigDecimal|java.math.BigDecimal|
|
||||
|Date|java.util.Date|
|
||||
|DateTime|org.joda.time.*|
|
||||
|File|java.io.File|
|
||||
|HashMap|java.util.HashMap|
|
||||
|LinkedHashSet|java.util.LinkedHashSet|
|
||||
|List|java.util.*|
|
||||
|LocalDate|org.joda.time.*|
|
||||
|LocalDateTime|org.joda.time.*|
|
||||
|LocalTime|org.joda.time.*|
|
||||
|Map|java.util.Map|
|
||||
|Set|java.util.*|
|
||||
|Timestamp|java.sql.Timestamp|
|
||||
|URI|java.net.URI|
|
||||
|UUID|java.util.UUID|
|
||||
|
||||
|
||||
## INSTANTIATION TYPES
|
||||
|
||||
@@ -3,17 +3,15 @@ title: Config Options for apex
|
||||
sidebar_label: apex
|
||||
---
|
||||
|
||||
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|
|
||||
|apiVersion|The Metadata API version number to use for components in this package.| |null|
|
||||
|buildMethod|The build method for this package.| |null|
|
||||
|classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null|
|
||||
|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
|
||||
|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document. If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.</dd></dl>|true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|legacyDiscriminatorBehavior|Set to true for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true|
|
||||
|namedCredential|The named credential name for the HTTP callouts| |null|
|
||||
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|
||||
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|
||||
@@ -64,7 +62,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>begin</li>
|
||||
<li>bigdecimal</li>
|
||||
<li>blob</li>
|
||||
<li>boolean</li>
|
||||
<li>break</li>
|
||||
<li>bulk</li>
|
||||
<li>by</li>
|
||||
@@ -78,6 +75,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>commit</li>
|
||||
<li>const</li>
|
||||
<li>continue</li>
|
||||
<li>convertcurrency</li>
|
||||
<li>currency</li>
|
||||
<li>date</li>
|
||||
<li>datetime</li>
|
||||
@@ -86,7 +84,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>delete</li>
|
||||
<li>desc</li>
|
||||
<li>do</li>
|
||||
<li>double</li>
|
||||
<li>else</li>
|
||||
<li>end</li>
|
||||
<li>enum</li>
|
||||
@@ -100,6 +97,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>float</li>
|
||||
<li>for</li>
|
||||
<li>from</li>
|
||||
<li>future</li>
|
||||
<li>global</li>
|
||||
<li>goto</li>
|
||||
<li>group</li>
|
||||
@@ -113,10 +111,13 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>insert</li>
|
||||
<li>instanceof</li>
|
||||
<li>int</li>
|
||||
<li>integer</li>
|
||||
<li>interface</li>
|
||||
<li>into</li>
|
||||
<li>join</li>
|
||||
<li>last_90_days</li>
|
||||
<li>last_month</li>
|
||||
<li>last_n_days</li>
|
||||
<li>last_week</li>
|
||||
<li>like</li>
|
||||
<li>limit</li>
|
||||
<li>list</li>
|
||||
@@ -125,6 +126,10 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>map</li>
|
||||
<li>merge</li>
|
||||
<li>new</li>
|
||||
<li>next_90_days</li>
|
||||
<li>next_month</li>
|
||||
<li>next_n_days</li>
|
||||
<li>next_week</li>
|
||||
<li>not</li>
|
||||
<li>null</li>
|
||||
<li>nulls</li>
|
||||
@@ -143,14 +148,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>public</li>
|
||||
<li>retrieve</li>
|
||||
<li>return</li>
|
||||
<li>returning</li>
|
||||
<li>rollback</li>
|
||||
<li>savepoint</li>
|
||||
<li>search</li>
|
||||
<li>select</li>
|
||||
<li>set</li>
|
||||
<li>short</li>
|
||||
<li>sobject</li>
|
||||
<li>sort</li>
|
||||
<li>stat</li>
|
||||
<li>static</li>
|
||||
<li>string</li>
|
||||
<li>super</li>
|
||||
<li>switch</li>
|
||||
<li>synchronized</li>
|
||||
@@ -158,22 +165,28 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>testmethod</li>
|
||||
<li>then</li>
|
||||
<li>this</li>
|
||||
<li>this_month</li>
|
||||
<li>this_week</li>
|
||||
<li>throw</li>
|
||||
<li>time</li>
|
||||
<li>today</li>
|
||||
<li>tolabel</li>
|
||||
<li>tomorrow</li>
|
||||
<li>transaction</li>
|
||||
<li>trigger</li>
|
||||
<li>true</li>
|
||||
<li>try</li>
|
||||
<li>type</li>
|
||||
<li>undelete</li>
|
||||
<li>update</li>
|
||||
<li>upsert</li>
|
||||
<li>using</li>
|
||||
<li>virtual</li>
|
||||
<li>void</li>
|
||||
<li>webservice</li>
|
||||
<li>when</li>
|
||||
<li>where</li>
|
||||
<li>while</li>
|
||||
<li>yesterday</li>
|
||||
</ul>
|
||||
|
||||
## FEATURE SET
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user