Skip to content

Commit e357f7f

Browse files
author
30p87
authored
Merge branch 'OpenAPITools:master' into master
2 parents 4844920 + 6da343a commit e357f7f

408 files changed

Lines changed: 32889 additions & 6903 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-java-client-jdk11.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ jobs:
7474
- samples/client/petstore/java/microprofile-rest-client-with-useSingleRequestParameter
7575
- samples/client/petstore/java/apache-httpclient
7676
- samples/client/petstore/java/feign
77+
- samples/client/petstore/java/feign-hc5
7778
- samples/client/petstore/java/feign-no-nullable
7879
- samples/client/petstore/java/okhttp-gson-awsv4signature
7980
- samples/openapi3/client/petstore/java/jersey2-java8-special-characters
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Samples Scala/sbt (JDK8)
2+
3+
on:
4+
push:
5+
paths:
6+
- 'samples/server/petstore/scala-finch/**'
7+
pull_request:
8+
paths:
9+
- 'samples/server/petstore/scala-finch/**'
10+
jobs:
11+
build:
12+
name: Build scala-finch servers
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
sample:
18+
# servers
19+
- samples/server/petstore/scala-finch # cannot be tested with jdk11
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-java@v4
23+
with:
24+
distribution: 'temurin'
25+
java-version: 8
26+
- name: Setup sbt launcher
27+
uses: sbt/setup-sbt@v1
28+
- name: Cache maven dependencies
29+
uses: actions/cache@v4
30+
env:
31+
cache-name: maven-repository
32+
with:
33+
path: |
34+
~/.ivy2
35+
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/build.sbt') }}
36+
- name: Build and test
37+
working-directory: ${{ matrix.sample }}
38+
run: sbt -v +test

.github/workflows/samples-scala.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ jobs:
2020
matrix:
2121
sample:
2222
# clients
23-
- 'samples/client/petstore/java/okhttp-gson'
23+
- samples/client/petstore/java/okhttp-gson
2424
- samples/client/petstore/scalaz
2525
- samples/client/petstore/scala-pekko
2626
- samples/client/petstore/scala-http4s
27-
#- samples/client/petstore/scala-sttp # won't pass while the same tests in circleci pass
27+
#- samples/client/petstore/scala-sttp
28+
#- samples/client/petstore/scala-sttp-circe
2829
# servers
2930
- samples/server/petstore/scala-lagom-server
3031
- samples/server/petstore/scala-play-server
3132
- samples/server/petstore/scala-akka-http-server
3233
- samples/server/petstore/scala-pekko-http-server
3334
- samples/server/petstore/scalatra
34-
- samples/server/petstore/scala-finch # cannot be tested with jdk11
3535
- samples/server/petstore/scala-http4s-server
3636
- samples/server/petstore/scala-cask
3737
steps:
3838
- uses: actions/checkout@v4
3939
- uses: actions/setup-java@v4
4040
with:
4141
distribution: 'temurin'
42-
java-version: 8
42+
java-version: 11
4343
- name: Setup sbt launcher
4444
uses: sbt/setup-sbt@v1
4545
- name: Cache maven dependencies

CI/circle_parallel.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ else
122122

123123
(cd samples/client/petstore/scala-akka && mvn integration-test)
124124
(cd samples/client/petstore/scala-sttp && mvn integration-test)
125+
(cd samples/client/petstore/scala-sttp-circe && mvn integration-test)
125126
(cd samples/client/petstore/scala-sttp4 && mvn integration-test)
126127
(cd samples/client/petstore/clojure && mvn integration-test)
127128
(cd samples/client/petstore/java/jersey2-java8 && mvn integration-test)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ Here is a list of template creators:
11391139
* Kotlin (Spring Boot): @dr4ke616
11401140
* Kotlin (Vertx): @Wooyme
11411141
* Kotlin (JAX-RS): @anttileppa
1142-
* Kotlin Misk: @andrewwilsonnew
1142+
* Kotlin Misk: @andrewwilsonnew @guiarn
11431143
* Kotlin WireMock: @stefankoppier
11441144
* NodeJS Express: @YishTish
11451145
* PHP Flight: @daniel-sc

bin/configs/java-feign-hc5.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/feign-hc5
3+
library: feign-hc5
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
booleanGetterPrefix: is
8+
artifactId: petstore-feign-hc5
9+
hideGenerationTimestamp: "true"

bin/configs/scala-sttp-circe.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
generatorName: scala-sttp
2+
outputDir: samples/client/petstore/scala-sttp-circe
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/scala/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/scala-sttp
5+
nameMappings:
6+
_type: "`underscoreType`"
7+
type_: "`typeWithUnderscore`"
8+
http_debug_operation: "`httpDebugOperation`"
9+
parameterNameMappings:
10+
_type: underscoreType
11+
type_: typeWithUnderscore
12+
http_debug_operation: httpDebugOperation
13+
additionalProperties:
14+
artifactId: scala-sttp-petstore
15+
jsonLibrary: circe

docs/generators/java-microprofile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6262
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
6363
|invokerPackage|root package for generated code| |org.openapitools.client|
6464
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
65-
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
65+
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
6666
|licenseName|The name of the license| |Unlicense|
6767
|licenseUrl|The URL of the license| |http://unlicense.org|
6868
|microprofileFramework|Framework for microprofile. Possible values &quot;kumuluzee&quot;| |null|

docs/generators/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
6262
|implicitHeadersRegex|Skip header parameters that matches given regex in the generated API methods using @ApiImplicitParams annotation. Note: this parameter is ignored when implicitHeaders=true| |null|
6363
|invokerPackage|root package for generated code| |org.openapitools.client|
6464
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
65-
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
65+
|library|library template (sub-template) to use|<dl><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.17.1</dd><dt>**jersey3**</dt><dd>HTTP client: Jersey client 3.1.1. JSON processing: Jackson 2.17.1</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 13.2.1. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**feign-hc5**</dt><dd>HTTP client: OpenFeign 13.2.1/HttpClient5 5.4.2. JSON processing: Jackson 2.17.1 or Gson 2.10.1</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 4.11.0. JSON processing: Gson 2.10.1 (Retrofit 2.5.0) or Jackson 2.17.1. Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 5.3.33 (6.1.5 if `useJakartaEe=true`). JSON processing: Jackson 2.17.1</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.1.18. JSON processing: Jackson 2.17.1</dd><dt>**restclient**</dt><dd>HTTP client: Spring RestClient 6.1.6. JSON processing: Jackson 2.17.1</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 4.7.6. JSON processing: Jackson 2.17.1</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.5.2. JSON processing: Jackson 2.17.1</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 2.2.0. JSON processing: Jackson 2.17.1</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured 5.3.2. JSON processing: Gson 2.10.1 or Jackson 2.17.1. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.17.1. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 2.0 (default, set desired version via `microprofileRestClientVersion=x.x.x`). JSON processing: JSON-B 1.0.2 or Jackson 2.17.1</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 5.2.1. JSON processing: Jackson 2.17.1</dd></dl>|okhttp-gson|
6666
|licenseName|The name of the license| |Unlicense|
6767
|licenseUrl|The URL of the license| |http://unlicense.org|
6868
|microprofileFramework|Framework for microprofile. Possible values &quot;kumuluzee&quot;| |null|

docs/generators/scala-sttp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2020
| ------ | ----------- | ------ | ------- |
2121
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
2222
|apiPackage|package for generated api classes| |null|
23+
|circeVersion|The version of circe library| |0.14.1|
2324
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for JDK 1.8+)</dd></dl>|java8|
2425
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
2526
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|

0 commit comments

Comments
 (0)