Skip to content

Commit 164fd7d

Browse files
committed
Merge branch 'master' into path-handling
* master: (89 commits) add structPrefix support to go-experimental (#7327) Add a link to SmartHR Tech Blog (#7324) Revert "Correct allOf with only one child schema (no discriminator)" (#7323) Correct allOf with only one child schema (no discriminator) (#6901) [Go]: Interface definitions for api functions (#5914) Update bug_report.md (#7320) update samples [Java][Client] Use java8 OffsetDateTime for clients (#7190) [java] Intro openApiNullable property to enable/disable OpenAPI Jackson Nullable library (#6154) [Spring Boot] update dependencies, mark java8 option as deprecated (#7306) Remove dot in golang type (#7307) [doc] Document usage of post-process file feature (#7315) fix http bear auth documentation for go clinets (#7312) [Extensions][Go][Java] Test x-auth-id-alias (#6642) [php-slim4] Move config to a separate file (#6971) [C][Client][Clang Static Analyzer] Remove the useless free operation for (#7309) Fix typescript-node generation when only models are generated (#7127) update spring config to use java8 (#7308) [C][Client][Clang Static Analyzer] Fix uninitialized argument value (#7305) [Java] remove deprecated jackson classes (#7304) ...
2 parents 5e01c65 + d50d31c commit 164fd7d

File tree

4,016 files changed

+108353
-25433
lines changed

Some content is hidden

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

4,016 files changed

+108353
-25433
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ assignees: ''
1111

1212
- [ ] Have you provided a full/minimal spec to reproduce the issue?
1313
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
14-
- [ ] What's the version of OpenAPI Generator used?
14+
- [ ] Have you [tested with the latest master](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) to confirm the issuue still exists?
1515
- [ ] Have you search for related issues/PRs?
1616
- [ ] What's the actual output vs expected output?
17-
- [ ] [Optional] Bounty to sponsor the fix ([example](https://www.bountysource.com/issues/66123212-javascript-client-produces-a-wrong-object-for-a-string-enum-type-that-is-used-with-ref))
17+
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))
1818

1919
<!--
2020
Please follow the issue template below for bug reports.

.github/workflows/check-supported-versions.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
- name: Upload Maven build artifact
5656
uses: actions/upload-artifact@v1
57-
if: matrix.java == '8'
57+
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
5858
with:
5959
name: artifact
6060
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
@@ -65,7 +65,10 @@ jobs:
6565
runs-on: ${{ matrix.os }}
6666
strategy:
6767
matrix:
68-
os: [ubuntu-latest, windows-latest]
68+
os: [ubuntu-latest]
69+
# include:
70+
# - os: windows-latest
71+
# flags: --skip-docs
6972
steps:
7073
- name: Check out code
7174
uses: actions/checkout@v2
@@ -74,7 +77,11 @@ jobs:
7477
with:
7578
name: artifact
7679
- name: Run Ensures Script
80+
shell: bash
7781
run: |
82+
git config --global core.fileMode false
83+
git config --global core.safecrlf false
84+
git config --global core.autocrlf true
7885
mkdir -p modules/openapi-generator-cli/target/
7986
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
80-
./bin/utils/ensure-up-to-date
87+
./bin/utils/ensure-up-to-date ${{ matrix.flags }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,14 @@ samples/client/petstore/python-asyncio/.pytest_cache/
174174
samples/client/petstore/python-tornado/.venv/
175175

176176
# PHP
177+
samples/client/petstore/php/OpenAPIClient-php/composer.lock
178+
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
179+
samples/openapi3/server/petstore/php-ze-ph/composer.lock
180+
samples/server/petstore/php-laravel/lib/composer.lock
177181
samples/server/petstore/php-lumen/lib/composer.lock
182+
samples/server/petstore/php-slim4/composer.lock
183+
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
184+
samples/server/petstore/php-ze-ph/composer.lock
178185

179186
# ts
180187
samples/client/petstore/typescript-angular2/npm/npm-debug.log

.hub.cli.dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
##
44
## You can build _just_ this part with:
55
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
6-
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
7-
8-
RUN set -x && \
9-
apk add --no-cache bash
6+
FROM maven:3.6.3-jdk-11-openj9 as builder
107

118
ENV GEN_DIR /opt/openapi-generator
129
WORKDIR ${GEN_DIR}
@@ -18,11 +15,10 @@ RUN mvn -am -pl "modules/openapi-generator-cli" package
1815
## The final (release) image
1916
## The resulting container here only needs the target jar
2017
## and ca-certificates (to be able to query HTTPS hosted specs)
21-
FROM openjdk:8-jre-alpine
18+
FROM openjdk:11.0.8-jre-slim-buster
2219

2320
ENV GEN_DIR /opt/openapi-generator
2421

25-
RUN apk --no-cache add ca-certificates bash
2622
RUN mkdir -p ${GEN_DIR}/modules/openapi-generator-cli/target
2723

2824
WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target

.hub.online.dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
##
44
## You can build _just_ this part with:
55
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
6-
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder
7-
8-
RUN set -x && \
9-
apk add --no-cache bash
6+
FROM maven:3.6.3-jdk-11-openj9 as builder
107

118
ENV GEN_DIR /opt/openapi-generator
129
WORKDIR ${GEN_DIR}
@@ -17,7 +14,7 @@ RUN mvn -am -pl "modules/openapi-generator-online" package
1714

1815
## The final (release) image
1916
## The resulting container here only needs the target jar
20-
FROM openjdk:8-jre-alpine
17+
FROM openjdk:11.0.8-jre-slim-buster
2118

2219
ENV GEN_DIR /opt/openapi-generator
2320
ENV TARGET_DIR /generator

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
FROM jimschubert/8-jdk-alpine-mvn:1.0
2-
3-
RUN set -x && \
4-
apk add --no-cache bash
1+
FROM maven:3.6.3-jdk-11-openj9
52

63
ENV GEN_DIR /opt/openapi-generator
74
WORKDIR ${GEN_DIR}
@@ -29,6 +26,6 @@ RUN mvn -am -pl "modules/openapi-generator-cli" package
2926
COPY docker-entrypoint.sh /usr/local/bin/
3027
RUN ln -s /usr/local/bin/docker-entrypoint.sh /usr/local/bin/openapi-generator
3128

32-
ENTRYPOINT ["docker-entrypoint.sh"]
29+
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
3330

3431
CMD ["help"]

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<h1 align="center">OpenAPI Generator</h1>
22

3+
34
<div align="center">
45

5-
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.0.0`): [![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
6-
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
7-
[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
8-
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
9-
[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator)
10-
[![iOS Build Status](https://app.bitrise.io/app/4a2b10a819d12b67/status.svg?token=859FMDR8QHwabCzwvZK6vQ&branch=master)](https://app.bitrise.io/app/4a2b10a819d12b67)
11-
![Check Supported Java Versions](https://github.com/openapitools/openapi-generator/workflows/Check%20Supported%20Java%20Versions/badge.svg)
6+
[![Stable releaases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) ![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
127

138
</div>
149

1510
<div align="center">
1611

17-
[![Jion the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM)
18-
[![Stable releaases in the Maven store](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22)
19-
[![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
12+
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.0.0`):
13+
[![Build Status](https://img.shields.io/travis/OpenAPITools/openapi-generator/master.svg?label=Integration%20Test)](https://travis-ci.org/OpenAPITools/openapi-generator)
14+
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
15+
[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
16+
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/openapitools/openapi-generator?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
17+
[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator)
18+
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
19+
[![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/openapitools/openapi-generator/Check%20Supported%20Java%20Versions/master?label=Check%20Supported%20Java%20Versions&logo=github&logoColor=green)](https://github.com/OpenAPITools/openapi-generator/actions?query=workflow%3A%22Check+Supported+Java+Versions%22)
2020

2121
</div>
2222

@@ -627,6 +627,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
627627
- [Prometheus/Alertmanager](https://github.com/prometheus/alertmanager)
628628
- [QEDIT](https://qed-it.com)
629629
- [Qulix Systems](https://www.qulix.com)
630+
- [Raksul](https://corp.raksul.com)
630631
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
631632
- [RedHat](https://www.redhat.com)
632633
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
@@ -641,6 +642,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
641642
- [TUI InfoTec GmbH](http://www.tui-infotec.com/)
642643
- [unblu inc.](https://www.unblu.com/)
643644
- [Veamly](https://www.veamly.com/)
645+
- [wbt-solutions](https://www.wbt-solutions.de/)
644646
- [Woleet](https://www.woleet.io/)
645647
- [WSO2](https://wso2.com/)
646648
- [Vouchery.io](https://vouchery.io)
@@ -769,6 +771,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
769771
- 2020-07-23 - [Generate Client SDK for .NET Core using Open Api](https://dev.to/no0law1/generate-client-sdk-for-net-core-using-open-api-2dgh) by [Nuno Reis](https://dev.to/no0law1)
770772
- 2020-07-26 - [Dartのhttp_interceptorライブラリを使うと配列のクエリパラメータが消えてしまう件の応急処置](https://qiita.com/gyamoto/items/eeeff81b6770487319ed) by [@gyamoto](https://qiita.com/gyamoto)
771773
- 2020-08-03 - [Criando Bibliotecas para APIs RESTful com OpenAPI, Swagger Editor e OpenAPI Generator](https://medium.com/@everisBrasil/criando-bibliotecas-para-apis-restful-com-openapi-swagger-editor-e-openapi-generator-75349a6420fd) by [everis Brasil (an NTT DATA Company)](https://medium.com/@everisBrasil)
774+
- 2020-08-19 - [マイクロサービスを連携してみよう](https://thinkit.co.jp/article/17704) by [岡井 裕矢(おかい ゆうや)](https://thinkit.co.jp/author/17588), [泉 勝(いずみ まさる)](https://thinkit.co.jp/author/17705) at [Think IT(シンクイット)](https://thinkit.co.jp/)
775+
- 2020-08-25 - [OpenAPI Generator と TypeScript で型安全にフロントエンド開発をしている話](https://tech.smarthr.jp/entry/2020/08/25/135631) at [SmartHR Tech Blog](https://tech.smarthr.jp/)
772776

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

appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: '{branch}-{build}'
2-
image: Visual Studio 2017
2+
image: Visual Studio 2019
33
hosts:
44
petstore.swagger.io: 127.0.0.1
55
install:
@@ -53,8 +53,8 @@ build_script:
5353
- gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --stacktrace
5454
test_script:
5555
# test c# API client (netcore)
56-
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
5756
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
57+
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
5858
# test c# API client
5959
- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
6060
# test c# API client (with PropertyChanged)

bin/configs/csharp-netcore-OpenAPIClientCore.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
generatorName: csharp-netcore
22
outputDir: samples/client/petstore/csharp-netcore/OpenAPIClientCore
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/java/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
44
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
55
additionalProperties:
66
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
generatorName: go-experimental
2+
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/go-experimental
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/go-experimental
5+
additionalProperties:
6+
packageName: x_auth_id_alias

bin/configs/go-experimental-go-petstore-oas2.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e
44
templateDir: modules/openapi-generator/src/main/resources/go-experimental
55
additionalProperties:
66
packageName: petstore
7+
generateInterfaces: true

bin/configs/go-experimental-go-petstore.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ additionalProperties:
66
enumClassPrefix: "true"
77
packageName: petstore
88
disallowAdditionalPropertiesIfNotPresent: false
9+
generateInterfaces: true

bin/configs/go-petstore-withXml.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ additionalProperties:
66
packageName: petstore
77
withXml: "true"
88
withGoCodegenComment: "true"
9+
generateInterfaces: true
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/feign-no-nullable
3+
library: feign
4+
inputSpec: modules/openapi-generator/src/test/resources/2_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-no-nullable
9+
hideGenerationTimestamp: "true"
10+
additionalModelTypeAnnotations: '@javax.annotation.concurrent.Immutable'
11+
openApiNullable: "false"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
generatorName: java
2+
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8
3+
library: jersey2
4+
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
5+
additionalProperties:
6+
artifactId: openapi3-extensions-x-auth-id-alias-jersey2-java8
7+
hideGenerationTimestamp: true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
generatorName: java-play-framework
2+
outputDir: samples/server/petstore/java-play-framework-no-nullable
3+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"
7+
openApiNullable: "false"
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/vertx-no-nullable
3+
library: vertx
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: petstore-vertx-no-nullable
8+
hideGenerationTimestamp: "true"
9+
openApiNullable: "false"

bin/configs/other/flash.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
generatorName: spring
2+
outputDir: samples/server/petstore/springboot-beanvalidation-no-nullable
3+
library: spring-boot
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
6+
additionalProperties:
7+
java8: "false"
8+
useBeanValidation: true
9+
artifactId: spring-boot-beanvalidation-no-nullable
10+
hideGenerationTimestamp: "true"
11+
openApiNullable: "false"

bin/configs/spring-boot-beanvalidation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ library: spring-boot
44
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
55
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
66
additionalProperties:
7-
java8: "false"
7+
java8: true
88
useBeanValidation: true
99
artifactId: spring-boot-beanvalidation
1010
hideGenerationTimestamp: "true"

bin/configs/spring-boot-delegate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ templateDir: modules/openapi-generator/src/main/resources/JavaSpring
55
additionalProperties:
66
artifactId: springboot-delegate
77
hideGenerationTimestamp: "true"
8-
java8: "false"
8+
java8: true
99
delegatePattern: "true"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
generatorName: spring
2+
outputDir: samples/client/petstore/spring-cloud-no-nullable
3+
library: spring-cloud
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud
6+
additionalProperties:
7+
artifactId: petstore-spring-cloud-no-nullable
8+
responseWrapper: HystrixCommand
9+
hideGenerationTimestamp: "true"
10+
openApiNullable: "false"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
generatorName: spring
2+
outputDir: samples/server/petstore/spring-mvc-no-nullable
3+
library: spring-mvc
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
6+
additionalProperties:
7+
artifactId: spring-mvc-server-no-nullable
8+
openApiNullable: "false"
9+
serverPort: "8002"
10+
hideGenerationTimestamp: "true"

bin/configs/spring-mvc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ library: spring-mvc
44
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
55
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
66
additionalProperties:
7-
java8: "false"
7+
java8: true
88
booleanGetterPrefix: get
99
artifactId: spring-mvc-server
1010
hideGenerationTimestamp: "true"
1111
serverPort: "8002"
12+
additionalModelTypeAnnotations: '@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name");@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id")'

bin/utils/ensure-up-to-date

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ if [ $status -ne 0 ]; then
1919
exit $status
2020
fi
2121

22+
if [[ "--skip-docs" == "${1}" ]]; then
23+
# We export here rather than modify our iterable so that:
24+
# - the scripts can show they ran and echo meaningfully
25+
# - the scripts can do cleanup (if necessary) when skipped
26+
export SKIP_EXPORT_DOCS=true
27+
fi
28+
2229
# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath)
2330
# Docs should always be run, regardless of batch or operation.
2431
declare -a always_iterate=(

bin/utils/export_docs_generators.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ echo "# START SCRIPT: ${SCRIPT}"
55

66
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
77

8+
if [[ "true" == "${SKIP_EXPORT_DOCS}" ]]; then
9+
echo "Skipping doc exports. Note that docs generated by Windows may break paths as they have not yet been normalized to OS-specific paths."
10+
exit 0
11+
fi
12+
813
for GENERATOR in $(java -jar ${executable} list --short --include all | sed -e 's/,/\'$'\n''/g')
914
do
1015
./bin/utils/export_generator.sh ${GENERATOR}

0 commit comments

Comments
 (0)