Skip to content

Commit 702fa69

Browse files
Merge branch 'OpenAPITools:master' into bugfix/22928-parameter-handling
2 parents 57ec23f + 9432aaf commit 702fa69

8,691 files changed

Lines changed: 37357 additions & 10408 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/samples-rust-server.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,22 @@ jobs:
4848
run: |
4949
set -e
5050
51-
# Iterate through each example and test various features
52-
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
51+
# Iterate through each package and test various features
52+
for package in $(find output -maxdepth 1 -mindepth 1 -type d)
5353
do
54+
pushd $package
5455
# Not all versions have a server example
5556
if test -f examples/server/main.rs; then
56-
cargo build --example server --features="server"
57+
cargo build --example ${package##*/}-server --features="server"
58+
fi
59+
# Not all versions have a client example
60+
if test -f examples/client/main.rs; then
61+
cargo build --example ${package##*/}-client --features="client"
5762
fi
5863
# Test the CLI works if present
5964
if test -f bin/cli.rs; then
6065
cargo build --bin ${package##*/} --features cli
61-
target/debug/${package##*/} --help
66+
../../target/debug/${package##*/} --help
6267
fi
6368
# Test the validate feature if it exists
6469
if cargo read-manifest | grep -q '"validate"'; then
@@ -77,4 +82,5 @@ jobs:
7782
cargo test
7883
cargo clippy
7984
cargo doc
85+
popd
8086
done

.github/workflows/samples-spring-jdk17.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ on:
44
push:
55
paths:
66
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
7+
- samples/openapi3/client/petstore/spring-cloud-4-with-optional
8+
- samples/client/petstore/spring-http-interface-springboot-4
79
- samples/openapi3/server/petstore/springboot-3
10+
- samples/openapi3/server/petstore/springboot-4
811
- samples/server/petstore/springboot-api-response-examples
912
- samples/server/petstore/springboot-lombok-data
1013
- samples/server/petstore/springboot-lombok-tostring
@@ -15,7 +18,10 @@ on:
1518
pull_request:
1619
paths:
1720
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
21+
- samples/openapi3/client/petstore/spring-cloud-4-with-optional
22+
- samples/client/petstore/spring-http-interface-springboot-4
1823
- samples/openapi3/server/petstore/springboot-3
24+
- samples/openapi3/server/petstore/springboot-4
1925
- samples/server/petstore/springboot-api-response-examples
2026
- samples/server/petstore/springboot-lombok-data
2127
- samples/server/petstore/springboot-lombok-tostring
@@ -33,8 +39,11 @@ jobs:
3339
sample:
3440
# clients
3541
- samples/openapi3/client/petstore/spring-cloud-3-with-optional
42+
- samples/openapi3/client/petstore/spring-cloud-4-with-optional
43+
- samples/client/petstore/spring-http-interface-springboot-4
3644
# servers
3745
- samples/openapi3/server/petstore/springboot-3
46+
- samples/openapi3/server/petstore/springboot-4
3847
- samples/server/petstore/springboot-api-response-examples
3948
- samples/server/petstore/springboot-lombok-data
4049
- samples/server/petstore/springboot-lombok-tostring
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Samples Terraform
2+
3+
on:
4+
push:
5+
paths:
6+
- 'samples/client/petstore/terraform/**'
7+
- 'samples/client/petstore/terraform-addpet/**'
8+
- 'samples/client/petstore/terraform-server/**'
9+
- 'samples/client/others/terraform/**'
10+
pull_request:
11+
paths:
12+
- 'samples/client/petstore/terraform/**'
13+
- 'samples/client/petstore/terraform-addpet/**'
14+
- 'samples/client/petstore/terraform-server/**'
15+
- 'samples/client/others/terraform/**'
16+
17+
jobs:
18+
build:
19+
name: Build Terraform Provider
20+
runs-on: ubuntu-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
sample:
25+
- samples/client/petstore/terraform/
26+
- samples/client/petstore/terraform-addpet/
27+
- samples/client/petstore/terraform-server/
28+
- samples/client/others/terraform/allof-discriminator/
29+
- samples/client/others/terraform/oneof-anyof-required/
30+
- samples/client/others/terraform/oneof-discriminator-lookup/
31+
steps:
32+
- uses: actions/checkout@v5
33+
- uses: actions/setup-go@v6
34+
with:
35+
go-version: "stable"
36+
- run: go version
37+
- name: Install Dependencies
38+
working-directory: ${{ matrix.sample }}
39+
run: |
40+
go mod tidy
41+
- name: Build provider
42+
working-directory: ${{ matrix.sample }}
43+
run: go build -v ./...
44+
- name: Run tests
45+
working-directory: ${{ matrix.sample }}
46+
run: go test ./... -v -timeout 120m

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<div align="center">
1717

18-
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.20.0`):
18+
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.21.0`):
1919
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
2020
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
2121

@@ -149,8 +149,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
149149

150150
| OpenAPI Generator Version | Release Date | Notes |
151151
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
152-
| 7.20.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 20.02.2026 | Minor release with breaking changes (with fallback) |
153-
| [7.19.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.19.0) (latest stable release) | 20.01.2026 | Minor release with breaking changes (with fallback) |
152+
| 7.21.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 20.03.2026 | Minor release with breaking changes (with fallback) |
153+
| [7.20.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.20.0) (latest stable release) | 16.02.2026 | Minor release with breaking changes (with fallback) |
154154
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
155155
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
156156
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
@@ -213,16 +213,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
213213
<!-- RELEASE_VERSION -->
214214
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
215215

216-
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar`
216+
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.20.0/openapi-generator-cli-7.20.0.jar`
217217

218218
For **Mac/Linux** users:
219219
```sh
220-
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar -O openapi-generator-cli.jar
220+
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.20.0/openapi-generator-cli-7.20.0.jar -O openapi-generator-cli.jar
221221
```
222222

223223
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.
224224
```
225-
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar
225+
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.20.0/openapi-generator-cli-7.20.0.jar
226226
```
227227

228228
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -418,12 +418,12 @@ Once built, `run-in-docker.sh` will act as an executable for openapi-generator-c
418418

419419
##### Troubleshooting
420420

421-
If an error like this occurs, just execute the **./mvnw clean install -U** command:
421+
If an error like this occurs, just execute the **mvn clean install -U** command:
422422

423423
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project openapi-generator: A type incompatibility occurred while executing org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test: java.lang.ExceptionInInitializerError cannot be cast to java.io.IOException
424424
425425
```sh
426-
./run-in-docker.sh ./mvnw clean install -U
426+
./run-in-docker.sh mvn clean install -U
427427
```
428428

429429
> Failed to execute goal org.fortasoft:gradle-maven-plugin:1.0.8:invoke (default) on project openapi-generator-gradle-plugin-mvn-wrapper: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-4.7-bin.zip'
@@ -438,7 +438,7 @@ cd openapi-generator
438438
vagrant up
439439
vagrant ssh
440440
cd /vagrant
441-
./run-in-docker.sh ./mvnw package
441+
./run-in-docker.sh mvn package
442442
```
443443

444444
### [1.7 - NPM](#table-of-contents)
@@ -457,7 +457,7 @@ openapi-generator-cli version
457457
To use a specific version of "openapi-generator-cli"
458458

459459
```sh
460-
openapi-generator-cli version-manager set 7.19.0
460+
openapi-generator-cli version-manager set 7.20.0
461461
```
462462

463463
Or install it as dev-dependency:
@@ -481,7 +481,7 @@ pip install openapi-generator-cli
481481

482482
To install a specific version
483483
```
484-
pip install openapi-generator-cli==7.19.0
484+
pip install openapi-generator-cli==7.20.0
485485
```
486486

487487
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
@@ -507,7 +507,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
507507
(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`)
508508

509509
<!-- RELEASE_VERSION -->
510-
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar)
510+
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.20.0/openapi-generator-cli-7.20.0.jar)
511511
<!-- /RELEASE_VERSION -->
512512

513513
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
@@ -1109,6 +1109,7 @@ Here is a list of template creators:
11091109
* Swift 5: @4brunu
11101110
* Swift 6: @4brunu
11111111
* Swift Combine: @dydus0x14
1112+
* Terraform: @jasondamour
11121113
* TypeScript (Angular1): @mhardorf
11131114
* TypeScript (Angular2): @roni-frantchi
11141115
* TypeScript (Angular6): @akehir
@@ -1131,6 +1132,7 @@ Here is a list of template creators:
11311132
* C# Azure functions: @Abrhm7786
11321133
* C# NancyFX: @mstefaniuk
11331134
* C++ (Qt5 QHttpEngine): @etherealjoy
1135+
* C++ Httplib: @rajvesh
11341136
* C++ Oat++: @Kraust
11351137
* C++ Pistache: @sebymiano
11361138
* C++ Restbed: @stkrwork

bin/configs/spring-boot-4.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
generatorName: spring
2+
outputDir: samples/openapi3/server/petstore/springboot-4
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
5+
additionalProperties:
6+
groupId: org.openapitools.openapi3
7+
documentationProvider: springdoc
8+
artifactId: springboot
9+
snapshotVersion: "true"
10+
useSpringBoot4: true
11+
useJackson3: true
12+
useBeanValidation: true
13+
withXml: true
14+
hideGenerationTimestamp: "true"
15+
generateConstructorWithAllArgs: true
16+
generateBuilders: true
17+
openApiNullable: false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
generatorName: spring
2+
library: spring-cloud
3+
outputDir: samples/openapi3/client/petstore/spring-cloud-4-with-optional
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
6+
additionalProperties:
7+
groupId: org.openapitools.openapi3
8+
documentationProvider: springdoc
9+
artifactId: spring-cloud-oas4
10+
useSpringBoot4: "true"
11+
useJackson3: true
12+
openApiNullable: false
13+
dateLibrary: "java8"
14+
useOptional: "true"
15+
useSwaggerUI: "false"
16+
hideGenerationTimestamp: "true"
17+
documentationProvider: none
18+
#optionalAcceptNullable: "false" # default to true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
generatorName: spring
2+
library: spring-http-interface
3+
outputDir: samples/client/petstore/spring-http-interface-springboot-4
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
6+
additionalProperties:
7+
artifactId: spring-http-interface
8+
snapshotVersion: "true"
9+
hideGenerationTimestamp: "true"
10+
modelNameSuffix: 'Dto'
11+
generatedConstructorWithRequiredArgs: "false"
12+
# documentation provider should be ignored
13+
documentationProvider: "springdoc"
14+
# annotation provider should be ignored
15+
annotationLibrary: "swagger2"
16+
# validation should be ignored
17+
useBeanValidation: "true"
18+
performBeanValidation: "true"
19+
useSpringBoot4: "true"
20+
useJackson3: true
21+
openApiNullable: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
generatorName: terraform-provider
2+
outputDir: samples/client/others/terraform/allof-discriminator
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/terraform-provider
5+
gitHost: github.com
6+
gitUserId: example
7+
gitRepoId: terraform-provider-allof
8+
additionalProperties:
9+
providerName: "allof"
10+
providerAddress: "registry.terraform.io/example/allof"
11+
hideGenerationTimestamp: "true"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
generatorName: terraform-provider
2+
outputDir: samples/client/others/terraform/oneof-anyof-required
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/go/spec-with-oneof-anyof-required.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/terraform-provider
5+
gitHost: github.com
6+
gitUserId: example
7+
gitRepoId: terraform-provider-oneof-anyof
8+
additionalProperties:
9+
providerName: "oneof"
10+
providerAddress: "registry.terraform.io/example/oneof-anyof"
11+
hideGenerationTimestamp: "true"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
generatorName: terraform-provider
2+
outputDir: samples/client/others/terraform/oneof-discriminator-lookup
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/go/spec-with-oneof-discriminator.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/terraform-provider
5+
gitHost: github.com
6+
gitUserId: example
7+
gitRepoId: terraform-provider-oneof-disc
8+
additionalProperties:
9+
providerName: "oneof"
10+
providerAddress: "registry.terraform.io/example/oneof-disc"
11+
hideGenerationTimestamp: "true"

0 commit comments

Comments
 (0)