Skip to content

Commit

Permalink
Merge branch 'master' into path-handling
Browse files Browse the repository at this point in the history
* 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)
  ...
  • Loading branch information
jimschubert committed Sep 2, 2020
2 parents 5e01c65 + d50d31c commit 164fd7d
Show file tree
Hide file tree
Showing 4,016 changed files with 108,353 additions and 25,433 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ assignees: ''

- [ ] Have you provided a full/minimal spec to reproduce the issue?
- [ ] Have you validated the input using an OpenAPI validator ([example](https://apidevtools.org/swagger-parser/online/))?
- [ ] What's the version of OpenAPI Generator used?
- [ ] 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?
- [ ] Have you search for related issues/PRs?
- [ ] What's the actual output vs expected output?
- [ ] [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))
- [ ] [Optional] Sponsorship to speed up the bug fix or feature request ([example](https://github.com/OpenAPITools/openapi-generator/issues/6178))

<!--
Please follow the issue template below for bug reports.
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/check-supported-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Upload Maven build artifact
uses: actions/upload-artifact@v1
if: matrix.java == '8'
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
with:
name: artifact
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
Expand All @@ -65,7 +65,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
# include:
# - os: windows-latest
# flags: --skip-docs
steps:
- name: Check out code
uses: actions/checkout@v2
Expand All @@ -74,7 +77,11 @@ jobs:
with:
name: artifact
- name: Run Ensures Script
shell: bash
run: |
git config --global core.fileMode false
git config --global core.safecrlf false
git config --global core.autocrlf true
mkdir -p modules/openapi-generator-cli/target/
mv artifact/openapi-generator-cli.jar modules/openapi-generator-cli/target/
./bin/utils/ensure-up-to-date
./bin/utils/ensure-up-to-date ${{ matrix.flags }}
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,14 @@ samples/client/petstore/python-asyncio/.pytest_cache/
samples/client/petstore/python-tornado/.venv/

# PHP
samples/client/petstore/php/OpenAPIClient-php/composer.lock
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
samples/openapi3/server/petstore/php-ze-ph/composer.lock
samples/server/petstore/php-laravel/lib/composer.lock
samples/server/petstore/php-lumen/lib/composer.lock
samples/server/petstore/php-slim4/composer.lock
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
samples/server/petstore/php-ze-ph/composer.lock

# ts
samples/client/petstore/typescript-angular2/npm/npm-debug.log
Expand Down
8 changes: 2 additions & 6 deletions .hub.cli.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
##
## You can build _just_ this part with:
## docker --target builder -t container-name:builder -f .hub.cli.dockerfile .
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder

RUN set -x && \
apk add --no-cache bash
FROM maven:3.6.3-jdk-11-openj9 as builder

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

ENV GEN_DIR /opt/openapi-generator

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

WORKDIR ${GEN_DIR}/modules/openapi-generator-cli/target
Expand Down
7 changes: 2 additions & 5 deletions .hub.online.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
##
## You can build _just_ this part with:
## docker --target builder -t container-name:builder -f .hub.online.dockerfile .
FROM jimschubert/8-jdk-alpine-mvn:1.0 as builder

RUN set -x && \
apk add --no-cache bash
FROM maven:3.6.3-jdk-11-openj9 as builder

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

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

ENV GEN_DIR /opt/openapi-generator
ENV TARGET_DIR /generator
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
FROM jimschubert/8-jdk-alpine-mvn:1.0

RUN set -x && \
apk add --no-cache bash
FROM maven:3.6.3-jdk-11-openj9

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

ENTRYPOINT ["docker-entrypoint.sh"]
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]

CMD ["help"]
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<h1 align="center">OpenAPI Generator</h1>


<div align="center">

[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)
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[![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)
[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator)
[![iOS Build Status](https://app.bitrise.io/app/4a2b10a819d12b67/status.svg?token=859FMDR8QHwabCzwvZK6vQ&branch=master)](https://app.bitrise.io/app/4a2b10a819d12b67)
![Check Supported Java Versions](https://github.com/openapitools/openapi-generator/workflows/Check%20Supported%20Java%20Versions/badge.svg)
[![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)

</div>

<div align="center">

[![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)
[![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)
[![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)
[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)
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
[![Run Status](https://api.shippable.com/projects/5af6bf74e790f4070084a115/badge?branch=master)](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[![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)
[![JDK11 Build](https://cloud.drone.io/api/badges/OpenAPITools/openapi-generator/status.svg?ref=refs/heads/master)](https://cloud.drone.io/OpenAPITools/openapi-generator)
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
[![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)

</div>

Expand Down Expand Up @@ -627,6 +627,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [Prometheus/Alertmanager](https://github.com/prometheus/alertmanager)
- [QEDIT](https://qed-it.com)
- [Qulix Systems](https://www.qulix.com)
- [Raksul](https://corp.raksul.com)
- [Raiffeisen Schweiz Genossenschaft](https://www.raiffeisen.ch)
- [RedHat](https://www.redhat.com)
- [RepreZen API Studio](https://www.reprezen.com/swagger-openapi-code-generation-api-first-microservices-enterprise-development)
Expand All @@ -641,6 +642,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- [TUI InfoTec GmbH](http://www.tui-infotec.com/)
- [unblu inc.](https://www.unblu.com/)
- [Veamly](https://www.veamly.com/)
- [wbt-solutions](https://www.wbt-solutions.de/)
- [Woleet](https://www.woleet.io/)
- [WSO2](https://wso2.com/)
- [Vouchery.io](https://vouchery.io)
Expand Down Expand Up @@ -769,6 +771,8 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
- 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)
- 2020-07-26 - [Dartのhttp_interceptorライブラリを使うと配列のクエリパラメータが消えてしまう件の応急処置](https://qiita.com/gyamoto/items/eeeff81b6770487319ed) by [@gyamoto](https://qiita.com/gyamoto)
- 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)
- 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/)
- 2020-08-25 - [OpenAPI Generator と TypeScript で型安全にフロントエンド開発をしている話](https://tech.smarthr.jp/entry/2020/08/25/135631) at [SmartHR Tech Blog](https://tech.smarthr.jp/)

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

Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: '{branch}-{build}'
image: Visual Studio 2017
image: Visual Studio 2019
hosts:
petstore.swagger.io: 127.0.0.1
install:
Expand Down Expand Up @@ -53,8 +53,8 @@ build_script:
- gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --stacktrace
test_script:
# test c# API client (netcore)
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
- dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
# test c# API client
- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor
# test c# API client (with PropertyChanged)
Expand Down
2 changes: 1 addition & 1 deletion bin/configs/csharp-netcore-OpenAPIClientCore.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generatorName: csharp-netcore
outputDir: samples/client/petstore/csharp-netcore/OpenAPIClientCore
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
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/csharp-netcore
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
Expand Down
6 changes: 6 additions & 0 deletions bin/configs/go-experimental-extensions-x-auth-id-alias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
generatorName: go-experimental
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/go-experimental
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
templateDir: modules/openapi-generator/src/main/resources/go-experimental
additionalProperties:
packageName: x_auth_id_alias
1 change: 1 addition & 0 deletions bin/configs/go-experimental-go-petstore-oas2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-e
templateDir: modules/openapi-generator/src/main/resources/go-experimental
additionalProperties:
packageName: petstore
generateInterfaces: true
1 change: 1 addition & 0 deletions bin/configs/go-experimental-go-petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ additionalProperties:
enumClassPrefix: "true"
packageName: petstore
disallowAdditionalPropertiesIfNotPresent: false
generateInterfaces: true
1 change: 1 addition & 0 deletions bin/configs/go-petstore-withXml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ additionalProperties:
packageName: petstore
withXml: "true"
withGoCodegenComment: "true"
generateInterfaces: true
11 changes: 11 additions & 0 deletions bin/configs/java-feign-no-nullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: java
outputDir: samples/client/petstore/java/feign-no-nullable
library: feign
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
booleanGetterPrefix: is
artifactId: petstore-feign-no-nullable
hideGenerationTimestamp: "true"
additionalModelTypeAnnotations: '@javax.annotation.concurrent.Immutable'
openApiNullable: "false"
7 changes: 7 additions & 0 deletions bin/configs/java-jersey2-extensions-x-auth-id-alias.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generatorName: java
outputDir: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8
library: jersey2
inputSpec: modules/openapi-generator/src/test/resources/3_0/extensions/x-auth-id-alias.yaml
additionalProperties:
artifactId: openapi3-extensions-x-auth-id-alias-jersey2-java8
hideGenerationTimestamp: true
7 changes: 7 additions & 0 deletions bin/configs/java-play-framework-no-nullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
generatorName: java-play-framework
outputDir: samples/server/petstore/java-play-framework-no-nullable
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework
additionalProperties:
hideGenerationTimestamp: "true"
openApiNullable: "false"
9 changes: 9 additions & 0 deletions bin/configs/java-vertx-no-nullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
generatorName: java
outputDir: samples/client/petstore/java/vertx-no-nullable
library: vertx
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/Java
additionalProperties:
artifactId: petstore-vertx-no-nullable
hideGenerationTimestamp: "true"
openApiNullable: "false"
7 changes: 0 additions & 7 deletions bin/configs/other/flash.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions bin/configs/spring-boot-beanvalidation-no-nullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
generatorName: spring
outputDir: samples/server/petstore/springboot-beanvalidation-no-nullable
library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
java8: "false"
useBeanValidation: true
artifactId: spring-boot-beanvalidation-no-nullable
hideGenerationTimestamp: "true"
openApiNullable: "false"
2 changes: 1 addition & 1 deletion bin/configs/spring-boot-beanvalidation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ library: spring-boot
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
java8: "false"
java8: true
useBeanValidation: true
artifactId: spring-boot-beanvalidation
hideGenerationTimestamp: "true"
2 changes: 1 addition & 1 deletion bin/configs/spring-boot-delegate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
artifactId: springboot-delegate
hideGenerationTimestamp: "true"
java8: "false"
java8: true
delegatePattern: "true"
10 changes: 10 additions & 0 deletions bin/configs/spring-cloud-no-nullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
generatorName: spring
outputDir: samples/client/petstore/spring-cloud-no-nullable
library: spring-cloud
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud
additionalProperties:
artifactId: petstore-spring-cloud-no-nullable
responseWrapper: HystrixCommand
hideGenerationTimestamp: "true"
openApiNullable: "false"
10 changes: 10 additions & 0 deletions bin/configs/spring-mvc-no-nullable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
generatorName: spring
outputDir: samples/server/petstore/spring-mvc-no-nullable
library: spring-mvc
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
artifactId: spring-mvc-server-no-nullable
openApiNullable: "false"
serverPort: "8002"
hideGenerationTimestamp: "true"
3 changes: 2 additions & 1 deletion bin/configs/spring-mvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ library: spring-mvc
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
additionalProperties:
java8: "false"
java8: true
booleanGetterPrefix: get
artifactId: spring-mvc-server
hideGenerationTimestamp: "true"
serverPort: "8002"
additionalModelTypeAnnotations: '@com.fasterxml.jackson.annotation.JsonFilter(value = "filter-name");@com.fasterxml.jackson.annotation.JsonIgnoreProperties(value = "id")'
7 changes: 7 additions & 0 deletions bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ if [ $status -ne 0 ]; then
exit $status
fi

if [[ "--skip-docs" == "${1}" ]]; then
# We export here rather than modify our iterable so that:
# - the scripts can show they ran and echo meaningfully
# - the scripts can do cleanup (if necessary) when skipped
export SKIP_EXPORT_DOCS=true
fi

# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath)
# Docs should always be run, regardless of batch or operation.
declare -a always_iterate=(
Expand Down
5 changes: 5 additions & 0 deletions bin/utils/export_docs_generators.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ echo "# START SCRIPT: ${SCRIPT}"

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

if [[ "true" == "${SKIP_EXPORT_DOCS}" ]]; then
echo "Skipping doc exports. Note that docs generated by Windows may break paths as they have not yet been normalized to OS-specific paths."
exit 0
fi

for GENERATOR in $(java -jar ${executable} list --short --include all | sed -e 's/,/\'$'\n''/g')
do
./bin/utils/export_generator.sh ${GENERATOR}
Expand Down
Loading

0 comments on commit 164fd7d

Please sign in to comment.