forked from loafle/openapi-generator-original
Compare commits
130 Commits
fix-circle
...
fix-circle
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fdc277f18 | ||
|
|
a3fb8f59f8 | ||
|
|
5c51ee49a2 | ||
|
|
3ab495a0aa | ||
|
|
e40f9e3801 | ||
|
|
7f40ce0dd8 | ||
|
|
7d9e1ecc22 | ||
|
|
8ead4b6e3f | ||
|
|
0e34d39833 | ||
|
|
21be5f5abc | ||
|
|
4ad76cc86c | ||
|
|
e8ae249cad | ||
|
|
cde0f551fc | ||
|
|
7f64246b20 | ||
|
|
b528e4a7a7 | ||
|
|
74e49ac1d2 | ||
|
|
ce0c0dcab0 | ||
|
|
ba2e50519d | ||
|
|
ffa196e6a9 | ||
|
|
36b72052e6 | ||
|
|
123119c076 | ||
|
|
890c758fd8 | ||
|
|
f2bbb9e0a2 | ||
|
|
efc53f5d47 | ||
|
|
0f13dfedb9 | ||
|
|
c96d3088c5 | ||
|
|
90de8dcd75 | ||
|
|
a018c10c70 | ||
|
|
2cff152e2a | ||
|
|
3ad5303f99 | ||
|
|
2b8d496c80 | ||
|
|
5cef0803b8 | ||
|
|
e0b6b2bbc7 | ||
|
|
af536f6205 | ||
|
|
ecdd8b5442 | ||
|
|
70df1170cc | ||
|
|
85ab65c4ca | ||
|
|
a79aad8420 | ||
|
|
afc27ef4bc | ||
|
|
6e9a0559a8 | ||
|
|
1c3eade94d | ||
|
|
fc00a663e1 | ||
|
|
b3f11963c3 | ||
|
|
60bae732d3 | ||
|
|
275107e3f1 | ||
|
|
fb7aa580bf | ||
|
|
481c69063d | ||
|
|
57b1c91d17 | ||
|
|
c529b16600 | ||
|
|
32573f7464 | ||
|
|
8040e9aae9 | ||
|
|
5581a2dd2c | ||
|
|
30787a16fb | ||
|
|
5757def39b | ||
|
|
09df01501a | ||
|
|
5f92de4785 | ||
|
|
9537a7fb46 | ||
|
|
a06a2b4c7b | ||
|
|
a56d032edf | ||
|
|
db6709fdb3 | ||
|
|
670e9d7099 | ||
|
|
79145dc633 | ||
|
|
b80461373a | ||
|
|
86a293e0b6 | ||
|
|
cea3c5ba09 | ||
|
|
f83b049fe6 | ||
|
|
28c7b9b956 | ||
|
|
0ff8c46595 | ||
|
|
13111077d4 | ||
|
|
73079c2ef6 | ||
|
|
9374dbd030 | ||
|
|
890c37fd77 | ||
|
|
c2884b7b1a | ||
|
|
cd7cdb1e24 | ||
|
|
d5866feb2d | ||
|
|
eb668b6a76 | ||
|
|
c349270c7a | ||
|
|
61ae569149 | ||
|
|
4883de51c1 | ||
|
|
2722fdcdc8 | ||
|
|
8fb81ea554 | ||
|
|
5687edcf02 | ||
|
|
65df3c22b9 | ||
|
|
c5863629c0 | ||
|
|
a6280d9b58 | ||
|
|
4ba87ae0e7 | ||
|
|
515c8827b2 | ||
|
|
c5fb60b5f2 | ||
|
|
07b5c5fc70 | ||
|
|
8167aa1852 | ||
|
|
c3c2e7aeca | ||
|
|
a5c9c6d531 | ||
|
|
dd67423c8c | ||
|
|
3eddc9af85 | ||
|
|
9ed15a1c97 | ||
|
|
21bf477da3 | ||
|
|
aeb7caf9b1 | ||
|
|
cdfa7fee77 | ||
|
|
79f70dcc8b | ||
|
|
c2c161eb26 | ||
|
|
af6be6adee | ||
|
|
6f19741927 | ||
|
|
61262e939a | ||
|
|
97c805f0e0 | ||
|
|
53f7e471c4 | ||
|
|
055605b075 | ||
|
|
e1130c343a | ||
|
|
adbbe68d4d | ||
|
|
ba0456aa91 | ||
|
|
01fa58a763 | ||
|
|
c74dfa3b3e | ||
|
|
9a9c1087be | ||
|
|
248a78b894 | ||
|
|
cba193666e | ||
|
|
8998d83f99 | ||
|
|
68e7d49456 | ||
|
|
5ecde555ab | ||
|
|
3ee7886345 | ||
|
|
e553180c06 | ||
|
|
187af2ec4e | ||
|
|
8b52b0afe3 | ||
|
|
8c337f05be | ||
|
|
f1c1567aa9 | ||
|
|
b033219c54 | ||
|
|
561a707afc | ||
|
|
95a74c804c | ||
|
|
a68ad56ea9 | ||
|
|
ad8de61143 | ||
|
|
8cbba7334d | ||
|
|
bc70f04848 |
@@ -11,7 +11,7 @@ jobs:
|
||||
report:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dorny/test-reporter@v1
|
||||
- uses: dorny/test-reporter@v2
|
||||
with:
|
||||
artifact: surefire-test-results
|
||||
name: JUnit Test results
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- samples/server/petstore/aspnet/fastendpoints-useValidators
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: 3.1.*
|
||||
- name: Build
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- samples/server/petstore/aspnetcore-6.0-useSwashBuckle
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
- samples/client/echo_api/csharp/restsharp/net8/EchoApi
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Run echo server
|
||||
|
||||
@@ -16,9 +16,10 @@ jobs:
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
|
||||
- samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
2
.github/workflows/samples-dotnet8.yaml
vendored
2
.github/workflows/samples-dotnet8.yaml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
2
.github/workflows/samples-dotnet9.yaml
vendored
2
.github/workflows/samples-dotnet9.yaml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
- uses: actions/setup-dotnet@v4.3.0
|
||||
with:
|
||||
dotnet-version: '9.0.101'
|
||||
- name: Build
|
||||
|
||||
31
.github/workflows/samples-ocaml.yaml
vendored
Normal file
31
.github/workflows/samples-ocaml.yaml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Samples OCaml
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'samples/client/petstore/ocaml/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'samples/client/petstore/ocaml/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build OCaml
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- 'samples/client/petstore/ocaml/'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set-up OCaml
|
||||
uses: ocaml/setup-ocaml@v3
|
||||
with:
|
||||
ocaml-compiler: 5
|
||||
- name: Install
|
||||
run: opam install . --deps-only --with-test
|
||||
working-directory: ${{ matrix.sample }}
|
||||
- name: Build
|
||||
run: opam exec -- dune build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
32
.github/workflows/samples-php7.yaml
vendored
32
.github/workflows/samples-php7.yaml
vendored
@@ -1,32 +0,0 @@
|
||||
name: Samples PHP 7.x
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/server/petstore/php-laravel/lib/
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/php-laravel/lib/
|
||||
jobs:
|
||||
build:
|
||||
name: Build PHP projects
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# servers
|
||||
- samples/server/petstore/php-laravel/lib/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup PHP with tools
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '7.4'
|
||||
tools: php-cs-fixer, phpunit
|
||||
- name: composer install
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: composer install
|
||||
- name: phpunit
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: vendor/bin/phpunit
|
||||
3
.github/workflows/samples-php8.yaml
vendored
3
.github/workflows/samples-php8.yaml
vendored
@@ -5,10 +5,12 @@ on:
|
||||
paths:
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
|
||||
- samples/server/petstore/php-flight/**
|
||||
- samples/server/petstore/php-laravel/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
|
||||
- samples/server/petstore/php-flight/**
|
||||
- samples/server/petstore/php-laravel/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build PHP projects
|
||||
@@ -25,6 +27,7 @@ jobs:
|
||||
# servers
|
||||
- samples/server/petstore/php-symfony/SymfonyBundle-php/
|
||||
- samples/server/petstore/php-flight/
|
||||
- samples/server/petstore/php-laravel/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup PHP with tools
|
||||
|
||||
38
.github/workflows/samples-protobuf.yaml
vendored
Normal file
38
.github/workflows/samples-protobuf.yaml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
name: Samples Protobuf
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- .github/workflows/samples-protobuf.yaml
|
||||
- samples/config/petstore/protobuf-schema/**
|
||||
- samples/config/petstore/protobuf-schema-config/**
|
||||
pull_request:
|
||||
paths:
|
||||
- .github/workflows/samples-protobuf.yaml
|
||||
- samples/config/petstore/protobuf-schema/**
|
||||
- samples/config/petstore/protobuf-schema-config/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build Protobuf Client
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- 'samples/config/petstore/protobuf-schema/'
|
||||
- 'samples/config/petstore/protobuf-schema-config/'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Protocol Buffers Compiler
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y protobuf-compiler
|
||||
- name: Generate Protobuf Schema
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
mkdir out
|
||||
protoc --proto_path=. --cpp_out=out models/*.proto services/*.proto
|
||||
- name: Verify Generated Files
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: |
|
||||
ls -l out/models
|
||||
ls -l out/services
|
||||
@@ -68,7 +68,6 @@ elif [ "$NODE_INDEX" = "3" ]; then
|
||||
echo "Running node $NODE_INDEX ... "
|
||||
|
||||
# Install node@stable (for angular 6)
|
||||
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"
|
||||
|
||||
24
README.md
24
README.md
@@ -15,7 +15,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.12.0`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.13.0`):
|
||||
[](https://app.travis-ci.com/github/OpenAPITools/openapi-generator/builds)
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator)
|
||||
@@ -73,6 +73,7 @@ If you find OpenAPI Generator useful for work, please consider asking your compa
|
||||
[<img src="https://openapi-generator.tech/img/companies/kong.png" width="128" height="128">](https://konghq.com/products/kong-konnect?utm_medium=referral&utm_source=github&utm_campaign=platform&utm_content=openapi-generator)
|
||||
[<img src="https://openapi-generator.tech/img/companies/route4me.png" width="128" height="128">](https://route4me.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
|
||||
[<img src="https://openapi-generator.tech/img/companies/dm.png" width="128" height="128">](https://www.dotcom-monitor.com/sponsoring-open-source-projects/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
|
||||
[<img src="https://openapi-generator.tech/img/companies/clickit.jpg" width="128" height="128">](https://www.clickittech.com/?utm_source=openapi-generator&utm_medium=sponsorship&utm_campaign=oss-sponsorship)
|
||||
|
||||
#### Thank you GoDaddy for sponsoring the domain names, Linode for sponsoring the VPS, Checkly for sponsoring the API monitoring and Gradle for sponsoring Develocity
|
||||
|
||||
@@ -130,8 +131,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
| OpenAPI Generator Version | Release Date | Notes |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| 7.12.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.12.0-SNAPSHOT/) | 17.02.2024 | Minor release with breaking changes (with fallback) |
|
||||
| [7.11.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.11.0) (latest stable release) | 20.01.2024 | Minor release with breaking changes (with fallback) |
|
||||
| 7.13.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.13.0-SNAPSHOT/) | 02.04.2025 | Minor release with breaking changes (with fallback) |
|
||||
| [7.12.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.12.0) (latest stable release) | 28.02.2025 | Minor release with breaking changes (with fallback) |
|
||||
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
|
||||
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
|
||||
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
|
||||
@@ -194,16 +195,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
|
||||
<!-- RELEASE_VERSION -->
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
|
||||
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.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/7.11.0/openapi-generator-cli-7.11.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -438,7 +439,7 @@ openapi-generator-cli version
|
||||
To use a specific version of "openapi-generator-cli"
|
||||
|
||||
```sh
|
||||
openapi-generator-cli version-manager set 7.11.0
|
||||
openapi-generator-cli version-manager set 7.12.0
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -462,7 +463,7 @@ pip install openapi-generator-cli
|
||||
|
||||
To install a specific version
|
||||
```
|
||||
pip install openapi-generator-cli==7.11.0
|
||||
pip install openapi-generator-cli==7.12.0
|
||||
```
|
||||
|
||||
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
|
||||
@@ -488,7 +489,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
||||
(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`)
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.0.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.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`
|
||||
@@ -630,6 +631,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [act coding](https://github.com/actcoding)
|
||||
- [Adaptant Solutions AG](https://www.adaptant.io/)
|
||||
- [adesso SE](https://www.adesso.de/)
|
||||
- [adorsys GmbH & Co.KG](https://adorsys.com/)
|
||||
- [Adyen](https://www.adyen.com/)
|
||||
- [Agoda](https://www.agoda.com/)
|
||||
- [Airthings](https://www.airthings.com/)
|
||||
@@ -971,6 +973,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- 2024-04-04 - [Working with OpenAPI using Rust](https://www.shuttle.dev/blog/2024/04/04/using-openapi-rust) by [Joshua Mo](https://twitter.com/joshmo_dev)
|
||||
- 2024-04-08 - [Implement API first strategy with OpenAPI generator plugin](https://medium.com/javarevisited/implement-api-first-strategy-with-openapi-generator-plugin-e4bbe7f0d778) by [Rui Zhou](https://medium.com/@wirelesser)
|
||||
- 2024-05-06 - [OpenAPI Generator Custom Templates](https://www.javacodegeeks.com/openapi-generator-custom-templates.html) by [Mary Zheng](https://www.javacodegeeks.com/author/mary-zheng)
|
||||
- 2025-02-09 - [Custom validation with OpenApiGenerator and Spring Boot 3](https://medium.com/@jugurtha.aitoufella/custom-validation-with-openapigenerator-and-spring-boot-3-34a656e815c8) by [Jugurtha Aitoufella](https://medium.com/@jugurtha.aitoufella)
|
||||
- 2025-02-20 - [Optimizing API Integration in a Large React Application Using OpenAPI Generator](https://www.youtube.com/watch?v=-B33pQnGQUI) by Stefano Marzo
|
||||
|
||||
|
||||
## [6 - About Us](#table-of-contents)
|
||||
@@ -1139,6 +1143,7 @@ Here is a list of template creators:
|
||||
* NodeJS Express: @YishTish
|
||||
* PHP Flight: @daniel-sc
|
||||
* PHP Laravel: @renepardon
|
||||
* PHP Laravel (refactor in 7.12.0): @gijs-blanken
|
||||
* PHP Lumen: @abcsun
|
||||
* PHP Mezzio (with Path Handler): @Articus
|
||||
* PHP Slim: @jfastnacht
|
||||
@@ -1149,6 +1154,7 @@ Here is a list of template creators:
|
||||
* Python AIOHTTP:
|
||||
* Ruby on Rails 5: @zlx
|
||||
* Rust (rust-server): @metaswitch
|
||||
* Rust (rust-axum): @linxGnu
|
||||
* Scala Akka: @Bouillie
|
||||
* Scala Cask: @aaronp
|
||||
* Scala Finch: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.7/AllOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.7/AnyOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.7/AnyOfNoCompare
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.7/FormModels
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.7/OneOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.7/UseDateTimeForDate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.7/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.8/AllOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.8/AnyOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.8/AnyOfNoCompare
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.8/FormModels
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.8/OneOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.8/UseDateTimeForDate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net4.8/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/AllOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/AnyOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/AnyOfNoCompare
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/FormModels
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/SourceGeneration
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/NullReferenceTypes
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/OneOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net8/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/AllOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/AnyOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/AnyOfNoCompare
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/FormModels
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/SourceGeneration
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/NullReferenceTypes
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/OneOf
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/UseDateTimeForDate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{2E60EF87-DB0B-4D01-A36E-F5E90F7EC757}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/net9/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/standard2.0/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/generichost/latest/Tags
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/tags.json
|
||||
library: generichost
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net4.7/MultipleFrameworks
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net4.7/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net4.8/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/echo_api/csharp/restsharp/net8/EchoApi
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/ParameterMappings
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/name-parameter-mappings.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/EnumMappings
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net9/EnumMappings
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/others/csharp-complex-files
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/form-multipart-binary-array.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/standard2.0/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
|
||||
10
bin/configs/csharp-restsharp-useVirtualForHooks.yaml
Normal file
10
bin/configs/csharp-restsharp-useVirtualForHooks.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
library: restsharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-addpet-only.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{D0A67E81-4061-48EB-B4B8-C73BDF8B2D95}'
|
||||
targetFramework: net8.0
|
||||
useVirtualForHooks: true
|
||||
6
bin/configs/go-oneof-discriminator-lookup.yaml
Normal file
6
bin/configs/go-oneof-discriminator-lookup.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
generatorName: go
|
||||
outputDir: samples/client/others/go/oneof-discriminator-lookup
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/go/spec-with-oneof-discriminator.yaml
|
||||
additionalProperties:
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -1,6 +1,6 @@
|
||||
generatorName: nim
|
||||
outputDir: samples/client/petstore/nim
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/nim/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/nim-client
|
||||
additionalProperties:
|
||||
packageName: petstore
|
||||
|
||||
9
bin/configs/protobuf-schema-config.yaml
Normal file
9
bin/configs/protobuf-schema-config.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
generatorName: protobuf-schema
|
||||
outputDir: samples/config/petstore/protobuf-schema-config
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/protobuf/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/protobuf-schema
|
||||
additionalProperties:
|
||||
packageName: petstore
|
||||
addJsonNameAnnotation: true
|
||||
numberedFieldNumberList: true
|
||||
startEnumsWithUnspecified: true
|
||||
@@ -12,3 +12,4 @@ additionalProperties:
|
||||
useSwaggerUI: "false"
|
||||
hideGenerationTimestamp: "true"
|
||||
documentationProvider: none
|
||||
#optionalAcceptNullable: "false" # default to true
|
||||
|
||||
@@ -2,6 +2,7 @@ generatorName: typescript-axios
|
||||
outputDir: samples/client/echo_api/typescript-axios/build
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-axios
|
||||
httpUserAgent: EchoApi/1.0.0
|
||||
additionalProperties:
|
||||
artifactId: echo-api-typescript-axios
|
||||
hideGenerationTimestamp: "true"
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
sha256: 04715cabbe9bd27ff98dd56e3db489ebc9ffbf98d9af104a6707b0a40ab4f8fe
|
||||
- filename: "samples/client/echo_api/java/resttemplate/src/test/java/org/openapitools/client/api/AuthApiTest.java"
|
||||
sha256: 38193bbad7f3eef087bc1474352e484178b14a2b8c0e0ba0cd4e4960516a14f9
|
||||
- filename: "samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/JacksonTest.java"
|
||||
sha256: 90e511a75178f26c8b73a6c77d16d7f134c51f959e8c72191bbe935b08436b22
|
||||
- filename: "samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/api/PetApiTest.java"
|
||||
sha256: 24c6a39a9d7327d397dc038c368a19c84f14ed96a69fe28d53719b3eaf0a725c
|
||||
- filename: "samples/client/petstore/java/jersey3/src/test/java/org/openapitools/client/api/PetApiTest.java"
|
||||
@@ -49,6 +51,10 @@
|
||||
sha256: 67a9e63e13ebddac21cb236aa015edce30f5d3bd8d6adcf50044cad00d48c45e
|
||||
- filename: "samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/ZebraTest.java"
|
||||
sha256: 15eeb6d8a9a79d0f1930b861540d9c5780d6c49ea4fdb68269ac3e7ec481e142
|
||||
- filename: "samples/client/petstore/java/webclient/src/test/java/org/openapitools/client/JacksonTest.java"
|
||||
sha256: 45cdaba3d2adc212cd4f0184ad475419a95e2326254c2ef84175e210c922b2f3
|
||||
- filename: "samples/client/petstore/java/feign/src/test/java/org/openapitools/client/JacksonTest.java"
|
||||
sha256: 45cdaba3d2adc212cd4f0184ad475419a95e2326254c2ef84175e210c922b2f3
|
||||
# rust axum test files
|
||||
- filename: "samples/server/petstore/rust-axum/output/rust-axum-oneof/tests/oneof_with_discriminator.rs"
|
||||
sha256: 2d4f5a069fdcb3057bb078d5e75b3de63cd477b97725e457079df24bd2c30600
|
||||
|
||||
@@ -504,7 +504,7 @@ Another useful option is `inlineSchemaOptions`, which allows you to customize ho
|
||||
- `MAP_ITEM_SUFFIX` set the map item suffix
|
||||
- `SKIP_SCHEMA_REUSE=true` is a special value to skip reusing inline schemas during refactoring
|
||||
- `REFACTOR_ALLOF_INLINE_SCHEMAS=true` will restore the 6.x (or below) behaviour to refactor allOf inline schemas into $ref. (v7.0.0 will skip the refactoring of these allOf inline schemas by default)
|
||||
- `RESOLVE_INLINE_ENUMS=true` will refactor inline enum definitions into $ref
|
||||
- `RESOLVE_INLINE_ENUMS=true` will refactor inline enum definitions into $ref. This must be activated to allow the renaming of inline enum definitions using `inlineSchemaMappings`.
|
||||
|
||||
## OpenAPI Normalizer
|
||||
|
||||
@@ -573,6 +573,13 @@ Example:
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/java-okhttp/ --openapi-normalizer SET_TAGS_TO_OPERATIONID=true
|
||||
```
|
||||
|
||||
- `SET_TAGS_TO_VENDOR_EXTENSION`: when set to a string value, tags will be set to the value of the provided vendor extension
|
||||
|
||||
Example:
|
||||
```
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/enableSetTagsToVendorExtension_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer SET_TAGS_TO_VENDOR_EXTENSION=x-tags
|
||||
```
|
||||
|
||||
- `ADD_UNSIGNED_TO_INTEGER_WITH_INVALID_MAX_VALUE`: when set to true, auto fix integer with maximum value 4294967295 (2^32-1) or long with 18446744073709551615 (2^64-1) by adding x-unsigned to the schema
|
||||
|
||||
Example:
|
||||
@@ -594,11 +601,29 @@ Example:
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/enableKeepOnlyFirstTagInOperation_test.yaml -o /tmp/java-okhttp/ --openapi-normalizer REMOVE_X_INTERNAL=true
|
||||
```
|
||||
|
||||
- `FILTER`: When set to `operationId:addPet|getPetById` for example, it will add `x-internal:true` to operations with operationId not equal to addPet/getPetById (which will have x-internal set to false) so that these operations marked as internal won't be generated.
|
||||
- `FILTER`
|
||||
|
||||
Example:
|
||||
```
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/java-okhttp/ --openapi-normalizer FILTER="operationId:addPet|getPetById"
|
||||
The `FILTER` parameter allows selective inclusion of API operations based on specific criteria. It applies the `x-internal: true` property to operations that do **not** match the specified values, preventing them from being generated.
|
||||
|
||||
### Available Filters
|
||||
|
||||
- **`operationId`**
|
||||
When set to `operationId:addPet|getPetById`, operations **not** matching `addPet` or `getPetById` will be marked as internal (`x-internal: true`), and excluded from generation. Matching operations will have `x-internal: false`.
|
||||
|
||||
- **`method`**
|
||||
When set to `method:get|post`, operations **not** using `GET` or `POST` methods will be marked as internal (`x-internal: true`), preventing their generation.
|
||||
|
||||
- **`tag`**
|
||||
When set to `tag:person|basic`, operations **not** tagged with `person` or `basic` will be marked as internal (`x-internal: true`), and will not be generated.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```sh
|
||||
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate \
|
||||
-g java \
|
||||
-i modules/openapi-generator/src/test/resources/3_0/petstore.yaml \
|
||||
-o /tmp/java-okhttp/ \
|
||||
--openapi-normalizer FILTER="operationId:addPet|getPetById"
|
||||
```
|
||||
|
||||
- `SET_CONTAINER_TO_NULLABLE`: When set to `array|set|map` (or just `array`) for example, it will set `nullable` in array, set and map to true.
|
||||
|
||||
@@ -28,7 +28,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|equatable|Overrides Equals and GetHashCode methods.| |false|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|
||||
|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I|
|
||||
|library|HTTP library template (sub-template) to use|<dl><dt>**generichost**</dt><dd>HttpClient with Generic Host dependency injection (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host) (Experimental. Subject to breaking changes without notice.)</dd><dt>**httpclient**</dt><dd>HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. Subject to breaking changes without notice.)</dd><dt>**unityWebRequest**</dt><dd>UnityWebRequest (...) (Experimental. Subject to breaking changes without notice.)</dd><dt>**restsharp**</dt><dd>RestSharp (https://github.com/restsharp/RestSharp)</dd></dl>|restsharp|
|
||||
|library|HTTP library template (sub-template) to use|<dl><dt>**generichost**</dt><dd>HttpClient, Generic Host integration, and System.Text.Json (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host)</dd><dt>**httpclient**</dt><dd>HttpClient and Newtonsoft (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) (Experimental. Subject to breaking changes without notice.)</dd><dt>**unityWebRequest**</dt><dd>UnityWebRequest (...) (Experimental. Subject to breaking changes without notice.)</dd><dt>**restsharp**</dt><dd>RestSharp (https://github.com/restsharp/RestSharp)</dd></dl>|generichost|
|
||||
|licenseId|The identifier of the license| |null|
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase|
|
||||
|modelPropertySorting|One of legacy, alphabetical, default.| |default|
|
||||
@@ -54,6 +54,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useIntForTimeout|Use int for Timeout (fall back to v7.9.0 templates). This option (for restsharp only) will be deprecated so please migrated to TimeSpan instead.| |false|
|
||||
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false|
|
||||
|useSourceGeneration|Use source generation where available (only `generichost` library supports this option).| |false|
|
||||
|useVirtualForHooks|Generate code that exposes public virtual hooks on ApiClient to customize low-level HTTP requests (only `restsharp`. `httpclient` libraries support this option).| |false|
|
||||
|validatable|Generates self-validatable models.| |true|
|
||||
|zeroBasedEnums|Enumerations with string values will start from 0 when true, 1 when false. If not set, enumerations with string values will start from 0 if the first value is 'unknown', case insensitive.| |null|
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|optionalAcceptNullable|Use `ofNullable` instead of just `of` to accept null values when using Optional.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
@@ -103,6 +104,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|
||||
|useOptional|Use Optional container for optional parameters| |false|
|
||||
|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
|
||||
|useSealed|Whether to generate sealed model interfaces and classes| |false|
|
||||
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|
||||
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|
||||
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|
||||
|
||||
@@ -52,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|errorObjectType|Error Object type. (This option is for okhttp-gson only)| |null|
|
||||
|failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateClientAsBean|For resttemplate, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false|
|
||||
|generateClientAsBean|For resttemplate, restclient and webclient, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
|gradleProperties|Append additional Gradle properties to the gradle.properties file| |null|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
@@ -100,7 +100,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useRuntimeException|Use RuntimeException instead of Exception. Only jersey2, jersey3, okhttp-gson, vertx, microprofile support this option.| |false|
|
||||
|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|
||||
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|
||||
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option.| |false|
|
||||
|useSingleRequestParameter|Setting this property to "true" will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to "static" does the same as "true", but also makes the generated arguments class static with single parameter instantiation.| |false|
|
||||
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
|
||||
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|
||||
@@ -52,7 +52,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|errorObjectType|Error Object type. (This option is for okhttp-gson only)| |null|
|
||||
|failOnUnknownProperties|Fail Jackson de-serialization on unknown properties| |false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateClientAsBean|For resttemplate, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false|
|
||||
|generateClientAsBean|For resttemplate, restclient and webclient, configure whether to create `ApiClient.java` and Apis clients as bean (with `@Component` annotation).| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
|gradleProperties|Append additional Gradle properties to the gradle.properties file| |null|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
@@ -100,7 +100,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useRuntimeException|Use RuntimeException instead of Exception. Only jersey2, jersey3, okhttp-gson, vertx, microprofile support this option.| |false|
|
||||
|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|
||||
|useRxJava3|Whether to use the RxJava3 adapter with the retrofit2 library. IMPORTANT: This option has been deprecated.| |false|
|
||||
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option.| |false|
|
||||
|useSingleRequestParameter|Setting this property to "true" will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter. ONLY jersey2, jersey3, okhttp-gson, microprofile, Spring RestClient, Spring WebClient support this option. Setting this property to "static" does the same as "true", but also makes the generated arguments class static with single parameter instantiation.| |false|
|
||||
|webclientBlockingOperations|Making all WebClient operations blocking(sync). Note that if on operation 'x-webclient-blocking: false' then such operation won't be sync| |false|
|
||||
|withAWSV4Signature|whether to include AWS v4 signature support (only available for okhttp-gson library)| |false|
|
||||
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|
|
||||
|
||||
@@ -44,6 +44,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|<dl><dt>**false**</dt><dd>No changes to the enum's are made, this is the default option.</dd><dt>**true**</dt><dd>With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.</dd></dl>|false|
|
||||
|generateBuilders|Whether to generate builders for models| |false|
|
||||
|generateConstructorWithAllArgs|whether to generate a constructor for all arguments| |false|
|
||||
|generateJsonCreator|Whether to generate @JsonCreator constructor for required properties.| |true|
|
||||
|generatePom|Whether to generate pom.xml if the file does not already exist.| |true|
|
||||
|groupId|groupId in generated pom.xml| |org.openapitools|
|
||||
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |false|
|
||||
|
||||
@@ -11,7 +11,7 @@ title: Documentation for the php-laravel Generator
|
||||
| generator type | SERVER | |
|
||||
| generator language | PHP | |
|
||||
| generator default templating engine | mustache | |
|
||||
| helpTxt | Generates a PHP laravel server library. | |
|
||||
| helpTxt | Generates a php-laravel server. | |
|
||||
|
||||
## CONFIG OPTIONS
|
||||
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
|
||||
@@ -22,6 +22,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|apiPackage|package for generated api classes| |null|
|
||||
|artifactUrl|artifact URL in generated pom.xml| |null|
|
||||
|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null|
|
||||
|autowire|Should autowire be enabled.| |false|
|
||||
|composerPackageName|The name to use in the composer package name field. e.g. `vendor/project` (must be lowercase and consist of words separated by `-`, `.` or `_`).| |null|
|
||||
|developerOrganization|developer organization in generated pom.xml| |null|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |null|
|
||||
@@ -57,6 +58,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|
||||
<ul class="column-ul">
|
||||
<li>\DateTime</li>
|
||||
<li>\Illuminate\Http\UploadedFile</li>
|
||||
<li>\SplFileObject</li>
|
||||
<li>array</li>
|
||||
<li>bool</li>
|
||||
@@ -200,7 +202,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
|
||||
|
||||
@@ -220,7 +222,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
|
||||
@@ -239,7 +241,7 @@ 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
|
||||
|allOf|✗|OAS2,OAS3
|
||||
|anyOf|✗|OAS3
|
||||
@@ -249,14 +251,14 @@ 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
|
||||
|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
|
||||
|SignatureAuth|✗|OAS3
|
||||
|AWSV4Signature|✗|ToolingExtension
|
||||
|
||||
|
||||
@@ -18,8 +18,9 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|
||||
| Option | Description | Values | Default |
|
||||
| ------ | ----------- | ------ | ------- |
|
||||
|addJsonNameAnnotation|Append "json_name" annotation to message field when the specification name differs from the protobuf field name| |false|
|
||||
|numberedFieldNumberList|Field numbers in order.| |false|
|
||||
|startEnumsWithUnknown|Introduces "UNKNOWN" as the first element of enumerations.| |false|
|
||||
|startEnumsWithUnspecified|Introduces "UNSPECIFIED" as the first element of enumerations.| |false|
|
||||
|
||||
## IMPORT MAPPING
|
||||
|
||||
|
||||
@@ -209,16 +209,16 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|Union|✗|OAS3
|
||||
|allOf|✗|OAS2,OAS3
|
||||
|anyOf|✗|OAS3
|
||||
|oneOf|✗|OAS3
|
||||
|oneOf|✓|OAS3
|
||||
|not|✗|OAS3
|
||||
|
||||
### Security Feature
|
||||
| Name | Supported | Defined By |
|
||||
| ---- | --------- | ---------- |
|
||||
|BasicAuth|✗|OAS2,OAS3
|
||||
|BasicAuth|✓|OAS2,OAS3
|
||||
|ApiKey|✓|OAS2,OAS3
|
||||
|OpenIDConnect|✗|OAS3
|
||||
|BearerToken|✗|OAS3
|
||||
|BearerToken|✓|OAS3
|
||||
|OAuth2_Implicit|✗|OAS2,OAS3
|
||||
|OAuth2_Password|✗|OAS2,OAS3
|
||||
|OAuth2_ClientCredentials|✗|OAS2,OAS3
|
||||
|
||||
@@ -66,6 +66,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|licenseUrl|The URL of the license| |http://unlicense.org|
|
||||
|modelPackage|package for generated models| |org.openapitools.model|
|
||||
|openApiNullable|Enable OpenAPI Jackson Nullable library. Not supported by `microprofile` library.| |true|
|
||||
|optionalAcceptNullable|Use `ofNullable` instead of just `of` to accept null values when using Optional.| |true|
|
||||
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
|
||||
@@ -96,6 +97,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
|
||||
|useOptional|Use Optional container for optional parameters| |false|
|
||||
|useResponseEntity|Use the `ResponseEntity` type to wrap return values of generated API methods. If disabled, method are annotated using a `@ResponseStatus` annotation, which has the status of the first response declared in the Api definition| |true|
|
||||
|useSealed|Whether to generate sealed model interfaces and classes| |false|
|
||||
|useSpringBoot3|Generate code and provide dependencies for use with Spring Boot 3.x. (Use jakarta instead of javax in imports). Enabling this option will also enable `useJakartaEe`.| |false|
|
||||
|useSpringController|Annotate the generated API as a Spring Controller| |false|
|
||||
|useSwaggerUI|Open the OpenApi specification in swagger-ui. Will also import and configure needed dependencies| |true|
|
||||
|
||||
@@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g
|
||||
To install a specific version of the tool, pass the version during installation:
|
||||
<!-- RELEASE_VERSION -->
|
||||
```bash
|
||||
openapi-generator-cli version-manager set 7.9.0
|
||||
openapi-generator-cli version-manager set 7.12.0
|
||||
```
|
||||
<!-- /RELEASE_VERSION -->
|
||||
To install the tool as a dev dependency in your current project:
|
||||
|
||||
@@ -16,7 +16,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>7.9.0</version>
|
||||
<version>7.12.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
30
flake.lock
generated
30
flake.lock
generated
@@ -1,12 +1,15 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -17,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1678083093,
|
||||
"narHash": "sha256-eTkS9GcdSAYA3cE9zCAAs9wY3+oM2zT45ydIkAcEFFQ=",
|
||||
"lastModified": 1737989155,
|
||||
"narHash": "sha256-TFJAGK7tt/jj1v747xNOzopxZ4odBIeDi6EJlYDg/bI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "684306b246d05168e42425a3610df7e2c4d51fcd",
|
||||
"rev": "5861228f6e9e9dd5d3f8e0a26411f682fdade93a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -35,6 +38,21 @@
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
9
intellij-codestyle.xml
Normal file
9
intellij-codestyle.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<code_scheme name="Project" version="173">
|
||||
<JavaCodeStyleSettings>
|
||||
<option name="DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION" value="true" />
|
||||
<option name="DO_NOT_WRAP_AFTER_SINGLE_ANNOTATION_IN_PARAMETER" value="true" />
|
||||
</JavaCodeStyleSettings>
|
||||
<codeStyleSettings language="JAVA">
|
||||
<option name="FIELD_ANNOTATION_WRAP" value="0" />
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.12.0-SNAPSHOT</version>
|
||||
<version>7.13.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.openapitools.codegen;
|
||||
|
||||
public class Constants {
|
||||
private Constants(){ }
|
||||
private Constants() {
|
||||
}
|
||||
|
||||
public static final String CLI_NAME = "openapi-generator-cli";
|
||||
public static final String GIT_REPO = "https://github.com/openapitools/openapi-generator";
|
||||
|
||||
@@ -138,7 +138,7 @@ public class AuthorTemplate extends OpenApiGeneratorCommand {
|
||||
} else {
|
||||
LOGGER.warn("The library filter '{}' extracted an unexpected library path: {}", library, p.toAbsolutePath());
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
LOGGER.info("Extracted templates to '{}' directory. Refer to https://openapi-generator.tech/docs/templating for customization details.", outputDirPath);
|
||||
|
||||
@@ -20,11 +20,7 @@ package org.openapitools.codegen.cmd;
|
||||
import io.airlift.airline.Command;
|
||||
import io.airlift.airline.Option;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.CliOption;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.CodegenConfigLoader;
|
||||
import org.openapitools.codegen.GeneratorNotFoundException;
|
||||
import org.openapitools.codegen.VendorExtension;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.meta.FeatureSet;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -37,10 +33,10 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.apache.commons.text.StringEscapeUtils.escapeHtml4;
|
||||
import static org.apache.commons.lang3.StringUtils.isEmpty;
|
||||
import static org.apache.commons.text.StringEscapeUtils.escapeHtml4;
|
||||
|
||||
@SuppressWarnings({"unused","java:S106", "java:S1192"})
|
||||
@SuppressWarnings({"unused", "java:S106", "java:S1192"})
|
||||
@Command(name = "config-help", description = "Config help for chosen lang")
|
||||
public class ConfigHelp extends OpenApiGeneratorCommand {
|
||||
|
||||
@@ -49,7 +45,7 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
|
||||
private static final String FORMAT_TEXT = "text";
|
||||
private static final String FORMAT_MARKDOWN = "markdown";
|
||||
private static final String FORMAT_YAMLSAMPLE = "yamlsample";
|
||||
private static final int FEATURE_SET_DISPLAY_WIDTH= 20;
|
||||
private static final int FEATURE_SET_DISPLAY_WIDTH = 20;
|
||||
|
||||
@Option(name = {"-g",
|
||||
"--generator-name"}, title = "generator name", description = "generator to get config help for")
|
||||
@@ -121,7 +117,7 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
|
||||
private Boolean markdownHeader;
|
||||
|
||||
@Option(name = {
|
||||
"--supported-vendor-extensions"}, title = "supported vendor extensions", description = "List supported vendor extensions")
|
||||
"--supported-vendor-extensions"}, title = "supported vendor extensions", description = "List supported vendor extensions")
|
||||
private Boolean supportedVendorExtensions;
|
||||
|
||||
@Option(name = {"--full-details"}, title = "full generator details", description = "displays CLI options as well as other configs/mappings (implies --instantiation-types, --reserved-words, --language-specific-primitives, --import-mappings, --feature-set)")
|
||||
@@ -241,16 +237,16 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
|
||||
}
|
||||
|
||||
sb
|
||||
.append(newline).append("## SUPPORTED VENDOR EXTENSIONS").append(newline).append(newline)
|
||||
.append("| Extension name | Description | Applicable for | Default value |").append(newline)
|
||||
.append("| -------------- | ----------- | -------------- | ------------- |").append(newline);
|
||||
.append(newline).append("## SUPPORTED VENDOR EXTENSIONS").append(newline).append(newline)
|
||||
.append("| Extension name | Description | Applicable for | Default value |").append(newline)
|
||||
.append("| -------------- | ----------- | -------------- | ------------- |").append(newline);
|
||||
|
||||
supportedVendorExtensions.forEach(
|
||||
extension -> sb.append("|").append(extension.getName())
|
||||
.append("|").append(extension.getDescription())
|
||||
.append("|").append(extension.getLevels().stream().map(Objects::toString).collect(Collectors.joining(", ")))
|
||||
.append("|").append(extension.getDefaultValue())
|
||||
.append(newline)
|
||||
extension -> sb.append("|").append(extension.getName())
|
||||
.append("|").append(extension.getDescription())
|
||||
.append("|").append(extension.getLevels().stream().map(Objects::toString).collect(Collectors.joining(", ")))
|
||||
.append("|").append(extension.getDefaultValue())
|
||||
.append(newline)
|
||||
);
|
||||
sb.append(newline);
|
||||
}
|
||||
@@ -359,17 +355,17 @@ public class ConfigHelp extends OpenApiGeneratorCommand {
|
||||
|
||||
sb.append("| Property | Value | Notes |").append(newline);
|
||||
sb.append("| -------- | ----- | ----- |").append(newline);
|
||||
sb.append("| generator name | "+config.getName()+" | pass this to the generate command after -g |").append(newline);
|
||||
sb.append("| generator stability | "+config.getGeneratorMetadata().getStability()+" | |").append(newline);
|
||||
sb.append("| generator type | "+config.getTag()+" | |").append(newline);
|
||||
sb.append("| generator name | " + config.getName() + " | pass this to the generate command after -g |").append(newline);
|
||||
sb.append("| generator stability | " + config.getGeneratorMetadata().getStability() + " | |").append(newline);
|
||||
sb.append("| generator type | " + config.getTag() + " | |").append(newline);
|
||||
if (config.generatorLanguage() != null) {
|
||||
sb.append("| generator language | "+config.generatorLanguage().toString()+" | |").append(newline);
|
||||
sb.append("| generator language | " + config.generatorLanguage().toString() + " | |").append(newline);
|
||||
}
|
||||
if (config.generatorLanguageVersion() != null) {
|
||||
sb.append("| generator language version | "+config.generatorLanguageVersion()+" | |").append(newline);
|
||||
sb.append("| generator language version | " + config.generatorLanguageVersion() + " | |").append(newline);
|
||||
}
|
||||
sb.append("| generator default templating engine | "+config.defaultTemplatingEngine()+" | |").append(newline);
|
||||
sb.append("| helpTxt | "+config.getHelp()+" | |").append(newline);
|
||||
sb.append("| generator default templating engine | " + config.defaultTemplatingEngine() + " | |").append(newline);
|
||||
sb.append("| helpTxt | " + config.getHelp() + " | |").append(newline);
|
||||
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
@@ -17,18 +17,10 @@
|
||||
|
||||
package org.openapitools.codegen.cmd;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.*;
|
||||
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
import ch.qos.logback.core.spi.FilterAttachable;
|
||||
import io.airlift.airline.Command;
|
||||
import io.airlift.airline.Option;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.config.CodegenConfigurator;
|
||||
@@ -36,6 +28,14 @@ import org.openapitools.codegen.config.MergedSpecBuilder;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
|
||||
import static org.openapitools.codegen.config.CodegenConfiguratorUtils.*;
|
||||
|
||||
@SuppressWarnings({"java:S106"})
|
||||
@Command(name = "generate", description = "Generate code with the specified generator.")
|
||||
public class Generate extends OpenApiGeneratorCommand {
|
||||
@@ -101,7 +101,7 @@ public class Generate extends OpenApiGeneratorCommand {
|
||||
+ "overwritten during the generation.")
|
||||
private Boolean skipOverwrite;
|
||||
|
||||
@Option(name = { "--dry-run" }, title = "Dry run",
|
||||
@Option(name = {"--dry-run"}, title = "Dry run",
|
||||
description = "Try things out and report on potential changes (without actually making changes).")
|
||||
private Boolean isDryRun;
|
||||
|
||||
@@ -327,15 +327,15 @@ public class Generate extends OpenApiGeneratorCommand {
|
||||
private Boolean legacyDiscriminatorBehavior;
|
||||
|
||||
@Option(name = {"--minimal-update"},
|
||||
title = "Minimal update",
|
||||
description = "Only write output files that have changed.")
|
||||
title = "Minimal update",
|
||||
description = "Only write output files that have changed.")
|
||||
private Boolean minimalUpdate;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
if (StringUtils.isNotBlank(inputSpecRootDirectory)) {
|
||||
spec = new MergedSpecBuilder(inputSpecRootDirectory, StringUtils.isBlank(mergedFileName) ? "_merged_spec" : mergedFileName)
|
||||
.buildMergedSpec();
|
||||
.buildMergedSpec();
|
||||
System.out.println("Merge input spec would be used - " + spec);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.openapitools.codegen.cmd;
|
||||
|
||||
import ch.qos.logback.classic.Level;
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
@@ -26,7 +25,6 @@ import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier;
|
||||
import com.fasterxml.jackson.databind.deser.std.DelegatingDeserializer;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.util.TokenBuffer;
|
||||
|
||||
import io.airlift.airline.Arguments;
|
||||
import io.airlift.airline.Command;
|
||||
import io.airlift.airline.Option;
|
||||
@@ -211,7 +209,7 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
||||
ClientOptInput opts = configurator.toClientOptInput();
|
||||
CodegenConfig config = opts.getConfig();
|
||||
name = config.getName();
|
||||
|
||||
|
||||
Path target = Paths.get(config.getOutputDir());
|
||||
Path updated = rootDir.resolve(target);
|
||||
config.setOutputDir(updated.toString());
|
||||
@@ -308,34 +306,34 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
||||
public Object deserialize(JsonParser p, DeserializationContext ctx) throws IOException {
|
||||
ObjectMapper codec = (ObjectMapper) ctx.getParser().getCodec();
|
||||
TokenBuffer buffer = new TokenBuffer(p);
|
||||
|
||||
|
||||
recurse(buffer, p, codec, false);
|
||||
|
||||
|
||||
JsonParser newParser = buffer.asParser(codec);
|
||||
newParser.nextToken();
|
||||
|
||||
|
||||
return super.deserialize(newParser, ctx);
|
||||
}
|
||||
|
||||
|
||||
private void recurse(TokenBuffer buffer, JsonParser p, ObjectMapper codec, boolean skipOuterbraces) throws IOException {
|
||||
boolean firstToken = true;
|
||||
JsonToken token;
|
||||
|
||||
JsonToken token;
|
||||
|
||||
while ((token = p.nextToken()) != null) {
|
||||
String name = p.currentName();
|
||||
|
||||
|
||||
if (skipOuterbraces && firstToken && JsonToken.START_OBJECT.equals(token)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (skipOuterbraces && p.getParsingContext().inRoot() && JsonToken.END_OBJECT.equals(token)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (JsonToken.VALUE_NULL.equals(token)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (name != null && JsonToken.FIELD_NAME.equals(token) && name.startsWith(INCLUDE)) {
|
||||
p.nextToken();
|
||||
String fileName = p.getText();
|
||||
@@ -348,7 +346,7 @@ public class GenerateBatch extends OpenApiGeneratorCommand {
|
||||
} else {
|
||||
buffer.copyCurrentEvent(p);
|
||||
}
|
||||
|
||||
|
||||
firstToken = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package org.openapitools.codegen.cmd;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
import io.airlift.airline.Command;
|
||||
import io.airlift.airline.Option;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.CodegenConfigLoader;
|
||||
@@ -20,18 +18,18 @@ import java.util.stream.Collectors;
|
||||
@Command(name = "list", description = "Lists the available generators")
|
||||
public class ListGenerators extends OpenApiGeneratorCommand {
|
||||
|
||||
@Option(name = {"-s", "--short" }, description = "shortened output (suitable for scripting)")
|
||||
@Option(name = {"-s", "--short"}, description = "shortened output (suitable for scripting)")
|
||||
private Boolean shortened = false;
|
||||
|
||||
@Option(name = {"-d", "--docsite" }, description = "format for docusaurus site output", hidden = true)
|
||||
@Option(name = {"-d", "--docsite"}, description = "format for docusaurus site output", hidden = true)
|
||||
private Boolean docusaurus = false;
|
||||
|
||||
@Option(name = {"--github-nested-index" }, description = "format for github index at docs/generators/README.md", hidden = true)
|
||||
private Boolean githubNestedIndex = false;
|
||||
@Option(name = {"--github-nested-index"}, description = "format for github index at docs/generators/README.md", hidden = true)
|
||||
private Boolean githubNestedIndex = false;
|
||||
|
||||
@Option(name = {"-i", "--include" },
|
||||
@Option(name = {"-i", "--include"},
|
||||
description = "comma-separated list of stability indexes to include (value: all,beta,stable,experimental,deprecated). Excludes deprecated by default.",
|
||||
allowedValues = { "all", "beta", "stable", "experimental", "deprecated" })
|
||||
allowedValues = {"all", "beta", "stable", "experimental", "deprecated"})
|
||||
private String include = "stable,beta,experimental";
|
||||
|
||||
@Override
|
||||
@@ -88,7 +86,7 @@ public class ListGenerators extends OpenApiGeneratorCommand {
|
||||
.sorted(Comparator.comparing(CodegenConfig::getName))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if(!list.isEmpty()) {
|
||||
if (!list.isEmpty()) {
|
||||
if (docusaurus || githubNestedIndex) {
|
||||
sb.append("## ").append(typeName).append(" generators");
|
||||
} else {
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
|
||||
package org.openapitools.codegen.cmd;
|
||||
|
||||
import static ch.lambdaj.collection.LambdaCollections.with;
|
||||
import static com.google.common.base.Joiner.on;
|
||||
|
||||
import ch.lambdaj.function.convert.Converter;
|
||||
import com.google.common.base.CaseFormat;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -31,9 +29,9 @@ import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.SupportingFile;
|
||||
import org.openapitools.codegen.TemplateManager;
|
||||
import org.openapitools.codegen.api.TemplatePathLocator;
|
||||
import org.openapitools.codegen.templating.CommonTemplateContentLocator;
|
||||
import org.openapitools.codegen.templating.MustacheEngineAdapter;
|
||||
import org.openapitools.codegen.templating.TemplateManagerOptions;
|
||||
import org.openapitools.codegen.templating.CommonTemplateContentLocator;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -43,7 +41,8 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import ch.lambdaj.function.convert.Converter;
|
||||
import static ch.lambdaj.collection.LambdaCollections.with;
|
||||
import static com.google.common.base.Joiner.on;
|
||||
|
||||
/**
|
||||
* User: lanwen Date: 24.03.15 Time: 20:22
|
||||
@@ -99,19 +98,19 @@ public class Meta extends OpenApiGeneratorCommand {
|
||||
new SupportingFile("kotlin/generatorClassTest.mustache", on(File.separator).join("src/test/kotlin", asPath(targetPackage)), mainClass.concat("Test.kt")),
|
||||
new SupportingFile("kotlin/README.mustache", "", "README.md"),
|
||||
|
||||
new SupportingFile("api.template", "src/main/resources" + File.separator + name,"api.mustache"),
|
||||
new SupportingFile("model.template", "src/main/resources" + File.separator + name,"model.mustache"),
|
||||
new SupportingFile("api.template", "src/main/resources" + File.separator + name, "api.mustache"),
|
||||
new SupportingFile("model.template", "src/main/resources" + File.separator + name, "model.mustache"),
|
||||
new SupportingFile("myFile.template", String.join(File.separator, "src", "main", "resources", name), "myFile.mustache"),
|
||||
new SupportingFile("services.mustache", "src/main/resources/META-INF/services", CodegenConfig.class.getCanonicalName()))
|
||||
: ImmutableList.of(
|
||||
new SupportingFile("pom.mustache", "", "pom.xml"),
|
||||
new SupportingFile("generatorClass.mustache", on(File.separator).join("src/main/java", asPath(targetPackage)), mainClass.concat(".java")),
|
||||
new SupportingFile("generatorClassTest.mustache", on(File.separator).join("src/test/java", asPath(targetPackage)), mainClass.concat("Test.java")),
|
||||
new SupportingFile("README.mustache", "", "README.md"),
|
||||
new SupportingFile("api.template", "src/main/resources" + File.separator + name,"api.mustache"),
|
||||
new SupportingFile("model.template", "src/main/resources" + File.separator + name,"model.mustache"),
|
||||
new SupportingFile("myFile.template", String.join(File.separator, "src", "main", "resources", name), "myFile.mustache"),
|
||||
new SupportingFile("services.mustache", "src/main/resources/META-INF/services", CodegenConfig.class.getCanonicalName()));
|
||||
new SupportingFile("pom.mustache", "", "pom.xml"),
|
||||
new SupportingFile("generatorClass.mustache", on(File.separator).join("src/main/java", asPath(targetPackage)), mainClass.concat(".java")),
|
||||
new SupportingFile("generatorClassTest.mustache", on(File.separator).join("src/test/java", asPath(targetPackage)), mainClass.concat("Test.java")),
|
||||
new SupportingFile("README.mustache", "", "README.md"),
|
||||
new SupportingFile("api.template", "src/main/resources" + File.separator + name, "api.mustache"),
|
||||
new SupportingFile("model.template", "src/main/resources" + File.separator + name, "model.mustache"),
|
||||
new SupportingFile("myFile.template", String.join(File.separator, "src", "main", "resources", name), "myFile.mustache"),
|
||||
new SupportingFile("services.mustache", "src/main/resources/META-INF/services", CodegenConfig.class.getCanonicalName()));
|
||||
|
||||
String currentVersion = buildInfo.getVersion();
|
||||
|
||||
@@ -134,11 +133,11 @@ public class Meta extends OpenApiGeneratorCommand {
|
||||
* destination directory
|
||||
*
|
||||
* @param targetDir - destination directory
|
||||
* @param data - map with additional params needed to process templates
|
||||
* @param data - map with additional params needed to process templates
|
||||
* @return converter object to pass to lambdaj
|
||||
*/
|
||||
private static Converter<SupportingFile, File> processFiles(final File targetDir,
|
||||
final Map<String, Object> data) {
|
||||
final Map<String, Object> data) {
|
||||
return support -> {
|
||||
try {
|
||||
File destinationFolder =
|
||||
@@ -148,7 +147,7 @@ public class Meta extends OpenApiGeneratorCommand {
|
||||
TemplateManager templateProcessor = new TemplateManager(
|
||||
new TemplateManagerOptions(false, false),
|
||||
new MustacheEngineAdapter(),
|
||||
new TemplatePathLocator[]{ new CommonTemplateContentLocator("codegen") }
|
||||
new TemplatePathLocator[]{new CommonTemplateContentLocator("codegen")}
|
||||
);
|
||||
|
||||
String template = templateProcessor.readTemplate(new File(TEMPLATE_DIR_CLASSPATH, support.getTemplateFile()).getPath());
|
||||
|
||||
@@ -19,12 +19,13 @@ package org.openapitools.codegen.cmd;
|
||||
|
||||
import io.airlift.airline.Command;
|
||||
import io.airlift.airline.Option;
|
||||
|
||||
import io.swagger.parser.OpenAPIParser;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.parser.core.models.AuthorizationValue;
|
||||
import io.swagger.v3.parser.core.models.ParseOptions;
|
||||
import io.swagger.v3.parser.core.models.SwaggerParseResult;
|
||||
import org.apache.commons.text.WordUtils;
|
||||
import org.openapitools.codegen.auth.AuthParser;
|
||||
import org.openapitools.codegen.validation.ValidationResult;
|
||||
import org.openapitools.codegen.validations.oas.OpenApiEvaluator;
|
||||
import org.openapitools.codegen.validations.oas.RuleConfiguration;
|
||||
@@ -33,7 +34,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@SuppressWarnings({"unused","java:S106"})
|
||||
@SuppressWarnings({"unused", "java:S106"})
|
||||
@Command(name = "validate", description = "Validate specification")
|
||||
public class Validate extends OpenApiGeneratorCommand {
|
||||
|
||||
@@ -41,15 +42,23 @@ public class Validate extends OpenApiGeneratorCommand {
|
||||
description = "location of the OpenAPI spec, as URL or file (required)")
|
||||
private String spec;
|
||||
|
||||
@Option(name = { "--recommend"}, title = "recommend spec improvements")
|
||||
@Option(name = {"--recommend"}, title = "recommend spec improvements")
|
||||
private Boolean recommend;
|
||||
|
||||
@Option(
|
||||
name = {"-a", "--auth"},
|
||||
title = "authorization",
|
||||
description = "adds authorization headers when fetching the OpenAPI definitions remotely. "
|
||||
+ "Pass in a URL-encoded string of name:header with a comma separating multiple values")
|
||||
private String auth;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
System.out.println("Validating spec (" + spec + ")");
|
||||
ParseOptions options = new ParseOptions();
|
||||
options.setResolve(true);
|
||||
SwaggerParseResult result = new OpenAPIParser().readLocation(spec, null, options);
|
||||
final List<AuthorizationValue> authorizationValues = AuthParser.parse(this.auth);
|
||||
SwaggerParseResult result = new OpenAPIParser().readLocation(spec, authorizationValues, options);
|
||||
List<String> messageList = result.getMessages();
|
||||
Set<String> errors = new HashSet<>(messageList);
|
||||
Set<String> warnings = new HashSet<>();
|
||||
|
||||
@@ -20,7 +20,7 @@ public class AuthorTemplateTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void smokeTestAuthorTemplateCommand(){
|
||||
public void smokeTestAuthorTemplateCommand() {
|
||||
Cli.CliBuilder<Runnable> builder = createBuilder();
|
||||
String[] arguments = new String[]{
|
||||
"author",
|
||||
@@ -57,7 +57,7 @@ public class AuthorTemplateTest {
|
||||
Assert.assertFalse(Files.exists(outputDirectory.resolve("libraries/okhttp-gson/auth/RetryingOAuth.mustache")));
|
||||
}
|
||||
|
||||
private Cli.CliBuilder<Runnable> createBuilder(){
|
||||
private Cli.CliBuilder<Runnable> createBuilder() {
|
||||
Cli.CliBuilder<Runnable> builder = new Cli.CliBuilder<>("openapi-generator-cli");
|
||||
|
||||
builder.withGroup("author")
|
||||
|
||||
@@ -42,7 +42,7 @@ public class GenerateBatchTest {
|
||||
|
||||
@DataProvider(name = "customIncludeDeserializerFiles")
|
||||
public Object[][] customIncludeDeserializerFiles() {
|
||||
return new Object[][] {
|
||||
return new Object[][]{
|
||||
{JAXRS_DATELIB_J8_JSON},
|
||||
{JAXRS_DATELIB_J8_YAML},
|
||||
{JAXRS_DATELIB_J8_JSON_INCLUDE_YAML},
|
||||
@@ -89,7 +89,7 @@ public class GenerateBatchTest {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Test(
|
||||
expectedExceptions = { RuntimeException.class },
|
||||
expectedExceptions = {RuntimeException.class},
|
||||
expectedExceptionsMessageRegExp = "Unable to deserialize config file: .*"
|
||||
)
|
||||
public void testInvalidDeserializerWithIncludeOption() {
|
||||
|
||||
@@ -363,7 +363,7 @@ public class GenerateTest {
|
||||
verify(configurator).toContext();
|
||||
verifyNoMoreInteractions(configurator);
|
||||
} finally {
|
||||
if(!f.delete()) {
|
||||
if (!f.delete()) {
|
||||
System.out.println("Directory didn't delete. You can ignore this.");
|
||||
}
|
||||
}
|
||||
@@ -389,7 +389,7 @@ public class GenerateTest {
|
||||
verify(configurator).toClientOptInput();
|
||||
verify(configurator).toContext();
|
||||
verifyNoMoreInteractions(configurator);
|
||||
if(!f.delete()) {
|
||||
if (!f.delete()) {
|
||||
System.out.println("Directory didn't delete. You can ignore this.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
package org.openapitools.codegen.cmd.utils;
|
||||
|
||||
import org.openapitools.codegen.utils.OptionUtils;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.openapitools.codegen.utils.OptionUtils;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.12.0-SNAPSHOT</version>
|
||||
<version>7.13.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -27,7 +27,6 @@ public abstract class AbstractTemplatingEngineAdapter implements TemplatingEngin
|
||||
* Gets all possible template paths for a given location.
|
||||
*
|
||||
* @param location The full location of the template.
|
||||
*
|
||||
* @return A new array of locations, modified according to the extensions or other adapter rules.
|
||||
*/
|
||||
protected String[] getModifiedFileLocation(String location) {
|
||||
@@ -44,7 +43,6 @@ public abstract class AbstractTemplatingEngineAdapter implements TemplatingEngin
|
||||
* Returns the path without an extension for an input location.
|
||||
*
|
||||
* @param location The location of the file, with original file extension intact.
|
||||
*
|
||||
* @return The full path, without extension (e.g. /path/to/file.txt => /path/to/file)
|
||||
*/
|
||||
private String getPathWithoutExtension(String location) {
|
||||
|
||||
@@ -17,7 +17,7 @@ public class TemplateDefinition {
|
||||
/**
|
||||
* <p>Constructor for TemplateDefinition.</p>
|
||||
*
|
||||
* @param templateFile a template path relative to user template or embedded template.
|
||||
* @param templateFile a template path relative to user template or embedded template.
|
||||
* @param destinationFilename a target output location for the file, relative to the output directory.
|
||||
*/
|
||||
public TemplateDefinition(String templateFile, String destinationFilename) {
|
||||
@@ -34,8 +34,8 @@ public class TemplateDefinition {
|
||||
/**
|
||||
* <p>Constructor for TemplateDefinition.</p>
|
||||
*
|
||||
* @param templateFile a template path relative to user template or embedded template.
|
||||
* @param folder a folder in the target output directory in which to place the target file.
|
||||
* @param templateFile a template path relative to user template or embedded template.
|
||||
* @param folder a folder in the target output directory in which to place the target file.
|
||||
* @param destinationFilename a target output location for the file, relative to the output directory.
|
||||
*/
|
||||
public TemplateDefinition(String templateFile, String folder, String destinationFilename) {
|
||||
@@ -94,7 +94,9 @@ public class TemplateDefinition {
|
||||
this.templateType = templateType;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@@ -106,13 +108,17 @@ public class TemplateDefinition {
|
||||
getTemplateType() == that.getTemplateType();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(getTemplateFile(), getFolder(), getDestinationFilename(), getTemplateType());
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringJoiner(", ", TemplateDefinition.class.getSimpleName() + "[", "]")
|
||||
|
||||
@@ -17,16 +17,22 @@ public enum TemplateFileType {
|
||||
|
||||
private final String templateType;
|
||||
|
||||
TemplateFileType(String templateType) { this.templateType = templateType; }
|
||||
TemplateFileType(String templateType) {
|
||||
this.templateType = templateType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value for this template file type
|
||||
*
|
||||
* @return The template type of this enum.
|
||||
*/
|
||||
public String value() { return this.templateType; }
|
||||
public String value() {
|
||||
return this.templateType;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringJoiner(", ", TemplateFileType.class.getSimpleName() + "[", "]")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user