Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java/Spring] all-of and one-of Improvements and Fixes #12075

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
da4712c
Add config to reproduce the issue
cachescrubber Apr 5, 2022
af9d7b3
Add test case to reproduce issue.
cachescrubber Apr 5, 2022
628de7d
Debug Session: identify critical codep path
cachescrubber Apr 6, 2022
3a26775
Works exactly as needed for oneOf/allOf in Java/Spring
cachescrubber Apr 6, 2022
ca6ee6e
Add allVars to omit list in OneOfImplementorAdditionalData
cachescrubber Apr 7, 2022
a4d79b3
SpringCodegen: Support parentVars in order to support fluent setter w…
cachescrubber Apr 7, 2022
34fe8af
Generate Samples
cachescrubber Apr 7, 2022
751455f
Add imports for inherited Properties
cachescrubber Apr 7, 2022
3fd8712
Add JavaDoc
cachescrubber Apr 7, 2022
3bb412a
Polishing
cachescrubber Apr 7, 2022
e224d61
add a link to zozo tech blog post
wing328 Apr 5, 2022
e7075d2
[java] Add jersey3 support to the Java client (#12046)
wing328 Apr 5, 2022
10e1a60
more checks in validateJsonObject (#12041)
wing328 Apr 5, 2022
4827d74
add response headers to api exception (#12042)
wing328 Apr 5, 2022
91bfb2f
[Ruby] Fix incorrectly capitalized identifier in apis template (#12045)
harmony7 Apr 5, 2022
726dcc0
update jackson databind to newer version (#12053)
wing328 Apr 5, 2022
7ebd09e
[PowerShell] add more tests to powershell client (#12057)
wing328 Apr 6, 2022
0924cab
comment out error message debug (#12056)
wing328 Apr 6, 2022
3f197e4
Reduce casting for operations processing (#12002)
borsch Apr 6, 2022
4e2995d
[typescript] Support esbuild, second attempt (#11465)
bodograumann Apr 6, 2022
13dbbc7
Fix the null pointer exception when generating examples for schemas i…
spacether Apr 7, 2022
6f3bf90
surefire plugin 3.0.0-M6 (#12076)
sullis Apr 7, 2022
852f8c3
[python-experimental] adds missing init files in endpoint modules (#1…
spacether Apr 7, 2022
1ed0ba7
testng 7.5 (#11380)
sullis Apr 7, 2022
1cee11e
Eliminates handlebars helper warnings (#12078)
spacether Apr 7, 2022
324d000
Adds postProcess method to python-experimental (#12079)
spacether Apr 7, 2022
231364f
[PowerShell] better enum model support (#12082)
wing328 Apr 8, 2022
9cf3029
docs: updated supported angular version (#12072)
takkiraz Apr 8, 2022
a5b7900
Fixed typo in readme which caused the project link to be broken (#12083)
lukacsaronzs Apr 8, 2022
1643c55
Bump actions/setup-java from 2 to 3 (#12087)
dependabot[bot] Apr 9, 2022
a1c4e37
Configure apiNameSuffix via plugins (#12062)
borsch Apr 9, 2022
940d240
[dart-dio] Adds support for enumUnknownDefaultCase to dart builtvalue…
josh-burton Apr 9, 2022
23995be
[php-slim4] Add Mock Server (#12044)
ybelenko Apr 9, 2022
5f4eccd
Adds 'params_encoder' config option for Ruby clients using Faraday (#…
dkliban Apr 9, 2022
eb4c696
Remove restrictions for additional property types (#11802)
impl Apr 9, 2022
bd9f1b6
Specify source encoding in java/kotlin sample poms templates (#12088)
wing328 Apr 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ commands: # a reusable command with parameters
- source-v2-
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
- run:
name: Install Headless Chrome dependencies
command: |
sudo apt-get update && sudo apt-get install -yq \
gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \
libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm1
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-supported-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- samples/client/petstore/java/okhttp-gson
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/samples-dart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-groovy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- samples/client/petstore/groovy
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-java-client-jdk11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- samples/client/petstore/java/jersey1
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-java-play-framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- samples/server/petstore/java-play-framework-no-wrap-calls
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-jaxrs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- samples/server/petstore/jaxrs-cxf-non-spring-app
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-kotlin-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- samples/client/petstore/kotlin-array-simple-string
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-kotlin-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
#- samples/server/petstore/kotlin-vertx-modelMutable
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-scala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- samples/server/petstore/scala-finch # cannot be tested with jdk11
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/samples-spring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- samples/openapi3/server/petstore/spring-boot-oneof
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ OpenAPI Generator allows generation of API client libraries (SDK generation), se

| | Languages/Frameworks |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 11.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
| **API clients** | **ActionScript**, **Ada**, **Apex**, **Bash**, **C**, **C#** (.net 2.0, 3.5 or later, .NET Standard 1.3 - 2.1, .NET Core 3.1, .NET 5.0. Libraries: RestSharp, GenericHost, HttpClient), **C++** (Arduino, cpp-restsdk, Qt5, Tizen, Unreal Engine 4), **Clojure**, **Crystal**, **Dart**, **Elixir**, **Elm**, **Eiffel**, **Erlang**, **Go**, **Groovy**, **Haskell** (http-client, Servant), **Java** (Apache HttpClient, Jersey1.x, Jersey2.x, OkHttp, Retrofit1.x, Retrofit2.x, Feign, RestTemplate, RESTEasy, Vertx, Google API Client Library for Java, Rest-assured, Spring 5 Web Client, MicroProfile Rest Client), **k6**, **Kotlin**, **Lua**, **Nim**, **Node.js/JavaScript** (ES5, ES6, AngularJS with Google Closure Compiler annotations, Flow types, Apollo GraphQL DataStore), **Objective-C**, **OCaml**, **Perl**, **PHP**, **PowerShell**, **Python**, **R**, **Ruby**, **Rust** (hyper, reqwest, rust-server), **Scala** (akka, http4s, scalaz, sttp, swagger-async-httpclient), **Swift** (2.x, 3.x, 4.x, 5.x), **Typescript** (AngularJS, Angular (2.x - 13.x), Aurelia, Axios, Fetch, Inversify, jQuery, Nestjs, Node, redux-query, Rxjs) |
| **Server stubs** | **Ada**, **C#** (ASP.NET Core, Azure Functions), **C++** (Pistache, Restbed, Qt5 QHTTPEngine), **Erlang**, **F#** (Giraffe), **Go** (net/http, Gin, Echo), **Haskell** (Servant, Yesod), **Java** (MSF4J, Spring, Undertow, JAX-RS: CDI, CXF, Inflector, Jersey, RestEasy, Play Framework, [PKMST](https://github.com/ProKarma-Inc/pkmst-getting-started-examples), [Vert.x](https://vertx.io/), [Apache Camel](https://camel.apache.org/)), **Kotlin** (Spring Boot, Ktor, Vertx), **PHP** (Laravel, Lumen, [Mezzio (fka Zend Expressive)](https://github.com/mezzio/mezzio), Slim, Silex, [Symfony](https://symfony.com/)), **Python** (FastAPI, Flask), **NodeJS**, **Ruby** (Sinatra, Rails5), **Rust** (rust-server), **Scala** (Akka, [Finch](https://github.com/finagle/finch), [Lagom](https://github.com/lagom/lagom), [Play](https://www.playframework.com/), Scalatra) |
| **API documentation generators** | **HTML**, **Confluence Wiki**, **Asciidoc**, **Markdown**, **PlantUML** |
| **Configuration files** | [**Apache2**](https://httpd.apache.org/) |
Expand Down Expand Up @@ -841,6 +841,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 2022-01-02 - [Towards a secure API client generator for IoT devices](https://arxiv.org/abs/2201.00270) by Anders Aaen Springborg, Martin Kaldahl Andersen, Kaare Holland Hattel, Michele Albano
- 2022-02-02 - [Use OpenApi generator to share your models between Flutter and your backend](https://www.youtube.com/watch?v=kPW7ccu9Yvk) by [Guillaume Bernos](https://feb2022.fluttervikings.com/speakers/guillaume_bernos) at [Flutter Vikings Conference 2022 (Hybrid)](https://feb2022.fluttervikings.com/)
- 2022-03-15 - [OpenAPI Specでハイフン区切りのEnum値をOpenAPI Generatorで出力すると、ハイフン区切りのまま出力される](https://qiita.com/yuji38kwmt/items/824d74d4889055ab37d8) by [yuji38kwmt](https://qiita.com/yuji38kwmt)
- 2022-04-01 - [OpenAPI Generatorのコード生成とSpring Frameworkのカスタムデータバインディングを共存させる](https://techblog.zozo.com/entry/coexistence-of-openapi-and-spring) in [ZOZO Tech Blog](https://techblog.zozo.com/)

## [6 - About Us](#table-of-contents)

Expand Down
9 changes: 1 addition & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,8 @@ test_script:

# test ps petstore
- ps: |
$ErrorActionPreference = "Stop"
cd samples\client\petstore\powershell\
.\Build.ps1
Import-Module -Name '.\src\PSPetstore'
$Result = Invoke-Pester -PassThru
if ($Result.FailedCount -gt 0) {
$host.SetShouldExit($Result.FailedCount)
exit $Result.FailedCount
}
.\CIRunTest.ps1
cache:
- C:\maven\
- C:\gradle\
Expand Down
1 change: 1 addition & 0 deletions bin/configs/dart-dio-next-petstore-client-lib-fake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ typeMappings:
EnumClass: "ModelEnumClass"
additionalProperties:
hideGenerationTimestamp: "true"
enumUnknownDefaultCase: "true"
1 change: 1 addition & 0 deletions bin/configs/dart-dio-petstore-client-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/dart-dio
additionalProperties:
hideGenerationTimestamp: "true"
enumUnknownDefaultCase: "true"
13 changes: 13 additions & 0 deletions bin/configs/java-jersey3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
generatorName: java
outputDir: samples/client/petstore/java/jersey3
library: jersey3
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: petstore-jersey3
hideGenerationTimestamp: true
serverPort: "8082"
dateLibrary: java8
useOneOfDiscriminatorLookup: true
disallowAdditionalPropertiesIfNotPresent: false
gradleProperties: "\n# JVM arguments\norg.gradle.jvmargs=-Xmx2024m -XX:MaxPermSize=512m\n# set timeout\norg.gradle.daemon.idletimeout=3600000\n# show all warnings\norg.gradle.warning.mode=all"
2 changes: 1 addition & 1 deletion bin/configs/powershell.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generatorName: powershell
outputDir: samples/client/petstore/powershell
inputSpec: modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/powershell/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
templateDir: modules/openapi-generator/src/main/resources/powershell
additionalProperties:
packageGuid: a27b908d-2a20-467f-bc32-af6f3a654ac5
Expand Down
10 changes: 10 additions & 0 deletions bin/configs/typescript-consolidated-browser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
generatorName: typescript
outputDir: samples/openapi3/client/petstore/typescript/builds/browser
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/typescript
additionalProperties:
framework: fetch-api
npmName: ts-petstore-client
projectName: ts-petstore-client
moduleName: petstore
supportsES6: true
Loading