Skip to content

Commit 14a7f78

Browse files
committed
Merge branch 'master' into feature/add-support-for-includeHttpRequestContext-to-java-spring-codegen
# Conflicts: # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java
2 parents 3f65431 + b1022e7 commit 14a7f78

375 files changed

Lines changed: 24591 additions & 822 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

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"
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/petstore/terraform-addpet
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-addpet-only.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/terraform-provider
5+
gitHost: github.com
6+
gitUserId: example
7+
gitRepoId: terraform-provider-petstore-addpet
8+
additionalProperties:
9+
providerName: "petstore"
10+
providerAddress: "registry.terraform.io/example/petstore-addpet"
11+
hideGenerationTimestamp: "true"

0 commit comments

Comments
 (0)