mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-01-25 22:30:49 +00:00
Compare commits
120 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0dc0e2eb8 | ||
|
|
d19f0cd348 | ||
|
|
17b77909d9 | ||
|
|
852a6075b2 | ||
|
|
1f4017a33f | ||
|
|
2d53488404 | ||
|
|
5926c3175e | ||
|
|
761cb777f6 | ||
|
|
e868637587 | ||
|
|
ea6f4c8780 | ||
|
|
ab42a1bef2 | ||
|
|
943b80bbb4 | ||
|
|
6ad16aaf7b | ||
|
|
db7d39f622 | ||
|
|
acb80bac95 | ||
|
|
b15636e3e9 | ||
|
|
8a3507cfa7 | ||
|
|
2707e5101c | ||
|
|
cc045ab53c | ||
|
|
29befb95d2 | ||
|
|
3f9465edcb | ||
|
|
2c463d9167 | ||
|
|
5cffc45428 | ||
|
|
6fc64e2115 | ||
|
|
a1c948df9f | ||
|
|
bf5ced7354 | ||
|
|
a045531ca7 | ||
|
|
b66c93a864 | ||
|
|
ea0504b17e | ||
|
|
f2a49b1c27 | ||
|
|
c189e5c263 | ||
|
|
0f23c4ff17 | ||
|
|
342febde58 | ||
|
|
4034201640 | ||
|
|
4a61a4ca74 | ||
|
|
b862290aec | ||
|
|
52d910be41 | ||
|
|
3a670a697a | ||
|
|
0f136af41d | ||
|
|
32d4085105 | ||
|
|
3be911d0e6 | ||
|
|
c34d593d8f | ||
|
|
9a0d711cf6 | ||
|
|
9adfe986a3 | ||
|
|
084a0a46b4 | ||
|
|
a62ed1dd2a | ||
|
|
ff400e9a31 | ||
|
|
24242be595 | ||
|
|
502565b317 | ||
|
|
f355dc4c5c | ||
|
|
73c9c1cbe5 | ||
|
|
9f62822de7 | ||
|
|
2b67b00996 | ||
|
|
4559cad6db | ||
|
|
28904f850f | ||
|
|
84692d8155 | ||
|
|
f78c465bdd | ||
|
|
60e3e405a5 | ||
|
|
7f96a4a0a3 | ||
|
|
396c4c61eb | ||
|
|
428d483f1e | ||
|
|
10d5aa7f56 | ||
|
|
756bed0be0 | ||
|
|
49e3626e26 | ||
|
|
701d1f5443 | ||
|
|
ae5848b215 | ||
|
|
87d1df3eeb | ||
|
|
92e1593bc0 | ||
|
|
de464cea30 | ||
|
|
e7287d1cdb | ||
|
|
06a511df31 | ||
|
|
4d6d8a1edc | ||
|
|
8e0e429231 | ||
|
|
e0b27485db | ||
|
|
643138321b | ||
|
|
b1b556ad63 | ||
|
|
7671288210 | ||
|
|
287eadf4f6 | ||
|
|
4534e8d1a0 | ||
|
|
a40dc56d38 | ||
|
|
7af1d025f9 | ||
|
|
848aecccda | ||
|
|
e8faf7c46b | ||
|
|
4ec77dd283 | ||
|
|
c51253c40f | ||
|
|
ae42568b26 | ||
|
|
58b12baed2 | ||
|
|
eb65e93e1d | ||
|
|
d90bfe093c | ||
|
|
08367def47 | ||
|
|
450215c4b8 | ||
|
|
99baae676b | ||
|
|
f2a6b6d8b4 | ||
|
|
2b1f61874e | ||
|
|
17f2e4634c | ||
|
|
b3c4c49430 | ||
|
|
dff00c86d6 | ||
|
|
0da98b06f8 | ||
|
|
a2883f3d20 | ||
|
|
d2556d453b | ||
|
|
b2254b9b94 | ||
|
|
f1322a0c5a | ||
|
|
23dae2bcd8 | ||
|
|
46c2c30f47 | ||
|
|
73a24f02d9 | ||
|
|
ae8352d9f9 | ||
|
|
32aa36d821 | ||
|
|
944533826b | ||
|
|
753330dd99 | ||
|
|
8a82a3eeb2 | ||
|
|
570915e028 | ||
|
|
83f712467a | ||
|
|
b2ef09b7fd | ||
|
|
d39e015487 | ||
|
|
cd01ba9bc1 | ||
|
|
97af5d1f52 | ||
|
|
873e27233b | ||
|
|
80be730dcd | ||
|
|
19945d909f | ||
|
|
23eff6672f |
@@ -13,7 +13,7 @@
|
||||
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {
|
||||
"version": "latest",
|
||||
"moby": true
|
||||
"moby": false
|
||||
}
|
||||
},
|
||||
// Configure tool-specific properties.
|
||||
|
||||
69
.github/workflows/mill-plugin-tests.yaml
vendored
Normal file
69
.github/workflows/mill-plugin-tests.yaml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Mill plugin tests
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- modules/openapi-generator-mill-plugin/**
|
||||
pull_request:
|
||||
paths:
|
||||
- modules/openapi-generator-mill-plugin/**
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Mill plugin tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'temurin'
|
||||
- name: Restore cache (read-only)
|
||||
# only use restore keys, no save key because we need to clear the cache before running the examples
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
path: |
|
||||
~/.m2/repository
|
||||
~/.gradle
|
||||
~/.cache/coursier
|
||||
!~/.gradle/caches/*/plugin-resolution/
|
||||
!~/.m2/repository/org/openapitools/
|
||||
!~/.cache/coursier/v1/https/repo1.maven.org/maven2/org/openapitools/
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
|
||||
|
||||
- name: Maven Clean Install
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
run: |
|
||||
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
|
||||
|
||||
# This is needed because of differences in how Maven and Coursier download artifacts
|
||||
# Maven will only download the pom when the transitive dependency is not needed in the current projects compile classpath
|
||||
# whereas Coursier expects the artifact (jar) to be present in a Maven repository. When Coursier encounters a
|
||||
# artifact folder with a pom it considers the artifact to be available and will then crash when the jar is missing.
|
||||
- name: Clear m2 cache except openapitools (because otherwise coursier will fail to resolve artifacts where only poms are downloaded)
|
||||
run: |
|
||||
mv ~/.m2/repository/org/openapitools /tmp/openapitools-backup || true
|
||||
rm -rf ~/.m2/repository/*
|
||||
mkdir -p ~/.m2/repository/org
|
||||
mv /tmp/openapitools-backup ~/.m2/repository/org/openapitools || true
|
||||
|
||||
- name: Mill Example - Test Validation Command
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
run: |
|
||||
(cd modules/openapi-generator-mill-plugin/example/ && ./mill validateOpenapiSpec $(pwd)/api/petstore-invalid.yaml)
|
||||
|
||||
- name: Mill Example - Test Validation Task
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
run: |
|
||||
(cd modules/openapi-generator-mill-plugin/example/ && ./mill openapi.validate)
|
||||
|
||||
- name: Mill Example - Test Compile Task
|
||||
env:
|
||||
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
||||
run: |
|
||||
(cd modules/openapi-generator-mill-plugin/example/ && ./mill __.compile)
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- samples/server/petstore/aspnet/fastendpoints-useValidators
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- samples/client/petstore/csharp/restsharp/standard2.0/Petstore/
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '7.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -28,7 +28,7 @@ jobs:
|
||||
# - samples/client/petstore/csharp/unityWebRequest/standard2.0/Petstore/
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: 3.1.*
|
||||
- name: Build
|
||||
|
||||
2
.github/workflows/samples-dotnet10.yaml
vendored
2
.github/workflows/samples-dotnet10.yaml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
# - samples/client/petstore/csharp/unityWebRequest/net10/Petstore
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.0
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '10.x'
|
||||
- name: Build
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- samples/server/petstore/aspnetcore-6.0-useSwashBuckle
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
- name: Build
|
||||
|
||||
2
.github/workflows/samples-dotnet7-client.yml
vendored
2
.github/workflows/samples-dotnet7-client.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
||||
- samples/client/petstore/csharp/restsharp/standard2.0/ConditionalSerialization/
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '7.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
- samples/client/echo_api/csharp/restsharp/net8/EchoApi
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Run echo server
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
- samples/client/petstore/csharp/restsharp/net8/useVirtualForHooks/
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
- samples/server/petstore/aspnetcore-8.0-use-centralized-package-version-management
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
2
.github/workflows/samples-dotnet8.yaml
vendored
2
.github/workflows/samples-dotnet8.yaml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
- samples/client/petstore/csharp/generichost/net8/UseDateTimeForDate
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
|
||||
2
.github/workflows/samples-dotnet9.yaml
vendored
2
.github/workflows/samples-dotnet9.yaml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
#- samples/client/petstore/csharp/unityWebRequest/net9/Petstore
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-dotnet@v5.0.1
|
||||
- uses: actions/setup-dotnet@v5.1.0
|
||||
with:
|
||||
dotnet-version: '9.0.x'
|
||||
- name: Build
|
||||
|
||||
@@ -7,6 +7,7 @@ on:
|
||||
- samples/client/petstore/java/webclient-jakarta/**
|
||||
- samples/client/petstore/java/restclient-*/**
|
||||
- samples/client/others/java/webclient-sealedInterface/**
|
||||
- samples/client/others/java/webclient-sealedInterface_3_1/**
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||
- samples/client/others/java/restclient-enum-in-multipart/**
|
||||
pull_request:
|
||||
@@ -15,6 +16,7 @@ on:
|
||||
- samples/client/petstore/java/webclient-jakarta/**
|
||||
- samples/client/petstore/java/restclient-*/**
|
||||
- samples/client/others/java/webclient-sealedInterface/**
|
||||
- samples/client/others/java/webclient-sealedInterface_3_1/**
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter/**
|
||||
- samples/client/others/java/restclient-enum-in-multipart/**
|
||||
jobs:
|
||||
@@ -34,6 +36,7 @@ jobs:
|
||||
- samples/client/petstore/java/restclient-useSingleRequestParameter
|
||||
- samples/client/petstore/java/restclient-useSingleRequestParameter-static
|
||||
- samples/client/others/java/webclient-sealedInterface
|
||||
- samples/client/others/java/webclient-sealedInterface_3_1
|
||||
- samples/client/petstore/java/webclient-useSingleRequestParameter
|
||||
- samples/client/others/java/restclient-enum-in-multipart
|
||||
steps:
|
||||
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
- samples/server/petstore/java-play-framework-fake-endpoints
|
||||
- samples/server/petstore/java-play-framework-fake-endpoints-with-security
|
||||
- samples/server/petstore/java-play-framework-no-bean-validation
|
||||
- samples/server/petstore/java-play-framework-no-exception-handling
|
||||
- samples/server/petstore/java-play-framework-no-excp-handling
|
||||
- samples/server/petstore/java-play-framework-no-interface
|
||||
- samples/server/petstore/java-play-framework-no-nullable
|
||||
- samples/server/petstore/java-play-framework-no-swagger-ui
|
||||
|
||||
69
.github/workflows/samples-r.yaml
vendored
Normal file
69
.github/workflows/samples-r.yaml
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
name: Samples R clients
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/R/**
|
||||
- samples/client/petstore/R-httr2/**
|
||||
- samples/client/petstore/R-httr2-wrapper/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/R/**
|
||||
- samples/client/petstore/R-httr2/**
|
||||
- samples/client/petstore/R-httr2-wrapper/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build R projects
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/petstore/R/
|
||||
- samples/client/petstore/R-httr2/
|
||||
- samples/client/petstore/R-httr2-wrapper/
|
||||
services:
|
||||
petstore-api:
|
||||
image: swaggerapi/petstore
|
||||
ports:
|
||||
- 80:8080
|
||||
env:
|
||||
SWAGGER_HOST: http://petstore.swagger.io
|
||||
SWAGGER_BASE_PATH: /v2
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Add hosts to /etc/hosts
|
||||
run: |
|
||||
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
|
||||
- uses: r-lib/actions/setup-r@v2
|
||||
with:
|
||||
use-public-rspm: true
|
||||
|
||||
- name: Install devtools
|
||||
run: install.packages("devtools")
|
||||
shell: Rscript {0}
|
||||
working-directory: ${{ matrix.sample }}
|
||||
|
||||
- name: Build
|
||||
run: devtools::build()
|
||||
shell: Rscript {0}
|
||||
working-directory: ${{ matrix.sample }}
|
||||
|
||||
- uses: r-lib/actions/setup-r-dependencies@v2
|
||||
with:
|
||||
working-directory: ${{ matrix.sample }}
|
||||
extra-packages: any::rcmdcheck
|
||||
needs: check
|
||||
|
||||
- uses: r-lib/actions/check-r-package@v2
|
||||
with:
|
||||
working-directory: ${{ matrix.sample }}
|
||||
upload-snapshots: true
|
||||
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
|
||||
error-on: '"error"'
|
||||
|
||||
- name: Install local package
|
||||
run: R CMD INSTALL .
|
||||
shell: bash # Ensure correct shell for command execution
|
||||
working-directory: ${{ matrix.sample }}
|
||||
2
.github/workflows/samples-spring.yaml
vendored
2
.github/workflows/samples-spring.yaml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
- samples/openapi3/server/petstore/springboot-delegate
|
||||
- samples/openapi3/server/petstore/spring-boot-oneof
|
||||
- samples/server/petstore/spring-boot-nullable-set
|
||||
- samples/server/petstore/spring-boot-defaultInterface-unhandledException
|
||||
- samples/server/petstore/spring-boot-defaultInterface-unhandledExcp
|
||||
- samples/server/petstore/springboot
|
||||
- samples/server/petstore/springboot-beanvalidation
|
||||
- samples/server/petstore/springboot-builtin-validation
|
||||
|
||||
@@ -15,6 +15,7 @@ on:
|
||||
- samples/client/petstore/typescript-angular-v18-provided-in-root/**
|
||||
- samples/client/petstore/typescript-angular-v19-provided-in-root/**
|
||||
- samples/client/petstore/typescript-angular-v20-provided-in-root/**
|
||||
- samples/client/petstore/typescript-angular-v21-provided-in-root/**
|
||||
- samples/openapi3/client/petstore/typescript/builds/default/**
|
||||
# comment out due to build failure
|
||||
#- samples/openapi3/client/petstore/typescript/tests/default/**
|
||||
@@ -54,6 +55,7 @@ on:
|
||||
- samples/client/petstore/typescript-angular-v18-provided-in-root/**
|
||||
- samples/client/petstore/typescript-angular-v19-provided-in-root/**
|
||||
- samples/client/petstore/typescript-angular-v20-provided-in-root/**
|
||||
- samples/client/petstore/typescript-angular-v21-provided-in-root/**
|
||||
- samples/openapi3/client/petstore/typescript/builds/default/**
|
||||
#- samples/openapi3/client/petstore/typescript/tests/default/**
|
||||
- samples/openapi3/client/petstore/typescript/builds/jquery/**
|
||||
@@ -104,6 +106,7 @@ jobs:
|
||||
- samples/client/petstore/typescript-angular-v18-provided-in-root/
|
||||
- samples/client/petstore/typescript-angular-v19-provided-in-root/
|
||||
- samples/client/petstore/typescript-angular-v20-provided-in-root/
|
||||
- samples/client/petstore/typescript-angular-v21-provided-in-root/
|
||||
- samples/openapi3/client/petstore/typescript/builds/default/
|
||||
#- samples/openapi3/client/petstore/typescript/tests/default/
|
||||
- samples/openapi3/client/petstore/typescript/builds/jquery/
|
||||
|
||||
@@ -13,6 +13,7 @@ COPY ./google_checkstyle.xml ${GEN_DIR}
|
||||
# All poms are copied, then we go offline, to allow for better caching of code changes without fetching all dependencies each time
|
||||
COPY ./modules/openapi-generator-gradle-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-gradle-plugin/
|
||||
COPY ./modules/openapi-generator-maven-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-maven-plugin/
|
||||
COPY ./modules/openapi-generator-mill-plugin/pom.xml ${GEN_DIR}/modules/openapi-generator-mill-plugin/
|
||||
COPY ./modules/openapi-generator-online/pom.xml ${GEN_DIR}/modules/openapi-generator-online/
|
||||
COPY ./modules/openapi-generator-cli/pom.xml ${GEN_DIR}/modules/openapi-generator-cli/
|
||||
COPY ./modules/openapi-generator-core/pom.xml ${GEN_DIR}/modules/openapi-generator-core/
|
||||
@@ -23,6 +24,7 @@ RUN mvn dependency:go-offline
|
||||
# Modules are copied individually here to allow for caching of docker layers between major.minor versions
|
||||
COPY ./modules/openapi-generator-gradle-plugin ${GEN_DIR}/modules/openapi-generator-gradle-plugin
|
||||
COPY ./modules/openapi-generator-maven-plugin ${GEN_DIR}/modules/openapi-generator-maven-plugin
|
||||
COPY ./modules/openapi-generator-mill-plugin ${GEN_DIR}/modules/openapi-generator-mill-plugin
|
||||
COPY ./modules/openapi-generator-online ${GEN_DIR}/modules/openapi-generator-online
|
||||
COPY ./modules/openapi-generator-cli ${GEN_DIR}/modules/openapi-generator-cli
|
||||
COPY ./modules/openapi-generator-core ${GEN_DIR}/modules/openapi-generator-core
|
||||
|
||||
19
README.md
19
README.md
@@ -15,7 +15,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.18.0`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.20.0`):
|
||||
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
|
||||
[](https://app.bitrise.io/app/4a2b10a819d12b67)
|
||||
|
||||
@@ -148,8 +148,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
|
||||
|
||||
| OpenAPI Generator Version | Release Date | Notes |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
|
||||
| 7.18.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 10.12.2025 | Minor release with breaking changes (with fallback) |
|
||||
| [7.17.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.17.0) (latest stable release) | 29.10.2025 | Minor release with breaking changes (with fallback) |
|
||||
| 7.20.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 20.02.2026 | Minor release with breaking changes (with fallback) |
|
||||
| [7.19.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.19.0) (latest stable release) | 20.01.2026 | Minor release with breaking changes (with fallback) |
|
||||
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
|
||||
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
|
||||
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
|
||||
@@ -212,16 +212,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
|
||||
<!-- RELEASE_VERSION -->
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
|
||||
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||
```
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar
|
||||
```
|
||||
|
||||
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
|
||||
@@ -456,7 +456,7 @@ openapi-generator-cli version
|
||||
To use a specific version of "openapi-generator-cli"
|
||||
|
||||
```sh
|
||||
openapi-generator-cli version-manager set 7.17.0
|
||||
openapi-generator-cli version-manager set 7.19.0
|
||||
```
|
||||
|
||||
Or install it as dev-dependency:
|
||||
@@ -480,7 +480,7 @@ pip install openapi-generator-cli
|
||||
|
||||
To install a specific version
|
||||
```
|
||||
pip install openapi-generator-cli==7.17.0
|
||||
pip install openapi-generator-cli==7.19.0
|
||||
```
|
||||
|
||||
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
|
||||
@@ -506,7 +506,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
|
||||
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
|
||||
|
||||
<!-- RELEASE_VERSION -->
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar)
|
||||
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar)
|
||||
<!-- /RELEASE_VERSION -->
|
||||
|
||||
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
|
||||
@@ -757,6 +757,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in
|
||||
- [REST United](https://restunited.com)
|
||||
- [Robocorp](https://www.robocorp.com)
|
||||
- [Robotinfra](https://www.robotinfra.com)
|
||||
- [Sarvika Technologies Pvt. Ltd.](https://www.sarvika.com)
|
||||
- [SearchApi](https://www.searchapi.io/)
|
||||
- [SmartHR](https://smarthr.co.jp/)
|
||||
- [Sony Interactive Entertainment](https://www.sie.com/en/index.html)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
generatorName: go
|
||||
outputDir: samples/client/others/go/allof_multiple_ref_and_discriminator
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/go/allof_multiple_ref_and_discriminator.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
generatorName: go
|
||||
outputDir: samples/client/others/go/oneof-anyof-required
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/go/spec-with-oneof-anyof-required.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
generatorName: go
|
||||
outputDir: samples/client/others/go/oneof-discriminator-lookup
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/go/spec-with-oneof-discriminator.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/go
|
||||
additionalProperties:
|
||||
useOneOfDiscriminatorLookup: "true"
|
||||
hideGenerationTimestamp: "true"
|
||||
|
||||
6
bin/configs/html.yaml
Normal file
6
bin/configs/html.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
generatorName: html
|
||||
outputDir: samples/documentation/html
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/htmlDocs
|
||||
additionalProperties:
|
||||
hideGenerationTimestamp: "true"
|
||||
@@ -7,3 +7,4 @@ additionalProperties:
|
||||
artifactId: petstore-native-useGzipFeature
|
||||
hideGenerationTimestamp: "true"
|
||||
useJakartaEe: "true"
|
||||
useGzipFeature: "true"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
generatorName: java-play-framework
|
||||
outputDir: samples/server/petstore/java-play-framework-no-exception-handling
|
||||
outputDir: samples/server/petstore/java-play-framework-no-excp-handling
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework
|
||||
additionalProperties:
|
||||
10
bin/configs/java-webclient-sealedInterface-3.1.yaml
Normal file
10
bin/configs/java-webclient-sealedInterface-3.1.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
generatorName: java
|
||||
outputDir: samples/client/others/java/webclient-sealedInterface_3_1
|
||||
library: webclient
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_1/oneof_polymorphism_and_inheritance.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/Java
|
||||
additionalProperties:
|
||||
artifactId: sealed-interface-webclient
|
||||
hideGenerationTimestamp: "true"
|
||||
useOneOfInterfaces: true
|
||||
useSealedOneOfInterfaces: true
|
||||
9
bin/configs/rust-reqwest-multipart-async.yaml
Normal file
9
bin/configs/rust-reqwest-multipart-async.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
generatorName: rust
|
||||
outputDir: samples/client/others/rust/reqwest/multipart-async
|
||||
library: reqwest
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/multipart-file-upload.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/rust
|
||||
additionalProperties:
|
||||
supportAsync: true
|
||||
useSingleRequestParameter: true
|
||||
packageName: multipart-upload-reqwest-async
|
||||
@@ -1,5 +1,5 @@
|
||||
generatorName: spring
|
||||
outputDir: samples/server/petstore/spring-boot-defaultInterface-unhandledException
|
||||
outputDir: samples/server/petstore/spring-boot-defaultInterface-unhandledExcp
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/spring/petstore-with-fake-endpoints-models-for-testing.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
|
||||
additionalProperties:
|
||||
@@ -7,6 +7,6 @@ generateAliasAsModel: true
|
||||
additionalProperties:
|
||||
projectName: PetstoreClient
|
||||
useSPMFileStructure: true
|
||||
useClasses: true
|
||||
useClasses: false
|
||||
useBacktickEscapes: true
|
||||
mapFileBinaryToData: true
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v12-oneOf/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOfArrayMapImport.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 12.2.0
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 12.2.0
|
||||
providedIn: any
|
||||
@@ -1,10 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 12.2.0
|
||||
npmVersion: 1.0.0
|
||||
npmName: '@openapitools/typescript-angular-petstore'
|
||||
npmRepository: https://skimdb.npmjs.com/registry
|
||||
snapshot: false
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 12.2.0
|
||||
@@ -1,6 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v13-oneOf/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOfArrayMapImport.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 13.0.1
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 13.0.1
|
||||
providedIn: any
|
||||
@@ -1,11 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 13.0.1
|
||||
npmVersion: 1.0.0
|
||||
npmName: '@openapitools/typescript-angular-petstore'
|
||||
npmRepository: https://skimdb.npmjs.com/registry
|
||||
snapshot: false
|
||||
supportsES6: true
|
||||
@@ -1,8 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v14-query-param-object-format
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 14.0.5
|
||||
supportsES6: true
|
||||
queryParamObjectFormat: json
|
||||
@@ -1,7 +0,0 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v15-provided-in-root/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 15.0.3
|
||||
supportsES6: true
|
||||
@@ -1,7 +1,10 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default
|
||||
outputDir: samples/client/petstore/typescript-angular-v21-provided-in-root/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 13.0.1
|
||||
ngVersion: 21.0.0
|
||||
supportsES6: true
|
||||
ngVersion21: true
|
||||
enumNameMappings:
|
||||
delivered: SHIPPED
|
||||
@@ -1,7 +1,9 @@
|
||||
generatorName: typescript-angular
|
||||
outputDir: samples/client/petstore/typescript-angular-v14-provided-in-root/builds/default
|
||||
outputDir: samples/client/petstore/typescript-angular-v21/builds/default
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-angular
|
||||
additionalProperties:
|
||||
ngVersion: 14.0.5
|
||||
ngVersion: 21.0.0
|
||||
npmName: sample-angular-21-0-0
|
||||
supportsES6: true
|
||||
ngVersion21: true
|
||||
@@ -47,19 +47,26 @@ For example:
|
||||
|
||||
echo "$header"
|
||||
|
||||
if [[ ${#files[@]} -eq 1 && "${files[0]}" != *'*'* ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2068
|
||||
java ${JAVA_OPTS} -jar "$executable" generate -c ${files[0]} ${args[@]}
|
||||
else
|
||||
echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
|
||||
#sleep 5
|
||||
if [ ${#files[@]} -eq 0 ]; then
|
||||
files=("${root}"/bin/configs/*.yaml)
|
||||
fi
|
||||
tmpfile=$(mktemp)
|
||||
trap "rm -f $tmpfile" EXIT
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2068
|
||||
java ${JAVA_OPTS} -jar "$executable" batch ${BATCH_OPTS} --includes-base-dir "${root}" --fail-fast -- ${files[@]}
|
||||
if [[ ${#files[@]} -eq 1 && "${files[0]}" != *'*'* ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2068
|
||||
java ${JAVA_OPTS} -jar "$executable" generate -c ${files[0]} ${args[@]} 2>&1 | tee "$tmpfile"
|
||||
retcode=${PIPESTATUS[0]}
|
||||
else
|
||||
if [ ${#files[@]} -eq 0 ]; then
|
||||
files=("${root}"/bin/configs/*.yaml)
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2068
|
||||
java ${JAVA_OPTS} -jar "$executable" batch ${BATCH_OPTS} --includes-base-dir "${root}" --fail-fast -- ${files[@]} 2>&1 | tee "$tmpfile"
|
||||
retcode=${PIPESTATUS[0]}
|
||||
fi
|
||||
|
||||
if [[ $retcode -ne 0 ]] || grep -q -i "at org.openapitools" "$tmpfile"; then
|
||||
echo "Found exception(s) when running the generator(s) to update the samples."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -93,6 +93,7 @@ declare -a xml_files=(
|
||||
declare -a properties_files=(
|
||||
"${root}/modules/openapi-generator-gradle-plugin/gradle.properties"
|
||||
"${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
|
||||
"${root}/modules/openapi-generator-mill-plugin/example/mill-build/version.properties"
|
||||
)
|
||||
|
||||
${cwd}/bump.sh -f ${version} -i ${inc} ${xml_files[@]}
|
||||
|
||||
@@ -62,3 +62,7 @@
|
||||
sha256: b2093528aac971193f2863a70f46eea45cf8bda79120b133a614599e80d8b46d
|
||||
- filename: "samples/server/petstore/rust-axum/output/openapi-v3/tests/oneof_untagged.rs"
|
||||
sha256: 1d3fb01f65e98290b1d3eece28014c7d3e3f2fdf18e7110249d3c591cc4642ab
|
||||
- filename: "samples/client/petstore/kotlin-jvm-spring-3-restclient/src/test/kotlin/org/openapitools/integration/PetApiTest.kt"
|
||||
sha256: 82a6be39c1ed3dada96dfa1833a6709834cb3f9f9d50a19cbd9d49699e46df4f
|
||||
- filename: "samples/client/petstore/kotlin-jvm-spring-3-restclient/src/test/kotlin/org/openapitools/integration/UserApiTest.kt"
|
||||
sha256: bc64fb94857a3598e1332f1278307c3078ea9ec4b4aa75690e6eda86e9729a8d
|
||||
|
||||
11
bitrise.yml
11
bitrise.yml
@@ -27,15 +27,6 @@ workflows:
|
||||
set -e
|
||||
|
||||
./samples/client/petstore/swift6/swift6_test_all.sh
|
||||
- script@1.2.0:
|
||||
title: Run Swift5 tests
|
||||
inputs:
|
||||
- content: |
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
./samples/client/petstore/swift5/swift5_test_all.sh
|
||||
- script@1.2.0:
|
||||
title: Run swift-combine tests
|
||||
inputs:
|
||||
@@ -48,4 +39,4 @@ workflows:
|
||||
|
||||
meta:
|
||||
bitrise.io:
|
||||
stack: osx-xcode-16.3.x
|
||||
stack: osx-xcode-26.2.x
|
||||
|
||||
@@ -68,7 +68,7 @@ The following generators are available:
|
||||
* [scala-sttp4-jsoniter (beta)](generators/scala-sttp4-jsoniter.md)
|
||||
* [scalaz](generators/scalaz.md)
|
||||
* [swift-combine](generators/swift-combine.md)
|
||||
* [swift5](generators/swift5.md)
|
||||
* [swift5 (deprecated)](generators/swift5.md)
|
||||
* [swift6](generators/swift6.md)
|
||||
* [typescript (experimental)](generators/typescript.md)
|
||||
* [typescript-angular](generators/typescript-angular.md)
|
||||
|
||||
@@ -94,7 +94,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>if</li>
|
||||
<li>in</li>
|
||||
<li>include</li>
|
||||
<li>instance</li>
|
||||
<li>instance_sizeof</li>
|
||||
<li>is_a?</li>
|
||||
<li>lib</li>
|
||||
<li>macro</li>
|
||||
@@ -102,9 +102,11 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
<li>next</li>
|
||||
<li>nil</li>
|
||||
<li>nil?</li>
|
||||
<li>object_id</li>
|
||||
<li>of</li>
|
||||
<li>out</li>
|
||||
<li>pointerof</li>
|
||||
<li>previous_def</li>
|
||||
<li>private</li>
|
||||
<li>protected</li>
|
||||
<li>require</li>
|
||||
|
||||
@@ -34,6 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -49,6 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -38,6 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -33,6 +33,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|configKey|Config key in @RegisterRestClient. Default to none.| |null|
|
||||
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|
||||
@@ -32,6 +32,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|camelCaseDollarSign|Fix camelCase when starting with $ sign. when true : $Value when false : $value| |false|
|
||||
|containerDefaultToNull|Set containers (array, set, map) default to null| |false|
|
||||
|dateLibrary|Option. Date library to use|<dl><dt>**joda**</dt><dd>Joda (for legacy app only)</dd><dt>**legacy**</dt><dd>Legacy java.util.Date</dd><dt>**java8-localdatetime**</dt><dd>Java 8 using LocalDateTime (for legacy app only)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (preferred for jdk 1.8+)</dd></dl>|java8|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -45,6 +45,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -37,6 +37,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -39,6 +39,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -41,6 +41,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -37,6 +37,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -38,6 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -38,6 +38,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -36,6 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -42,6 +42,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|developerName|developer name in generated pom.xml| |OpenAPI-Generator Contributors|
|
||||
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|
||||
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|
||||
|disableDiscriminatorJsonIgnoreProperties|Ignore discriminator field type for Jackson serialization| |false|
|
||||
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
|
||||
|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|
|
||||
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|
||||
|
||||
@@ -7,7 +7,7 @@ title: Documentation for the swift5 Generator
|
||||
| Property | Value | Notes |
|
||||
| -------- | ----- | ----- |
|
||||
| generator name | swift5 | pass this to the generate command after -g |
|
||||
| generator stability | STABLE | |
|
||||
| generator stability | DEPRECATED | |
|
||||
| generator type | CLIENT | |
|
||||
| generator language | Swift | |
|
||||
| generator default templating engine | mustache | |
|
||||
|
||||
@@ -11,7 +11,7 @@ title: Documentation for the typescript-angular Generator
|
||||
| generator type | CLIENT | |
|
||||
| generator language | Typescript | |
|
||||
| generator default templating engine | mustache | |
|
||||
| helpTxt | Generates a TypeScript Angular (9.x - 20.x) client library. | |
|
||||
| helpTxt | Generates a TypeScript Angular (9.x - 21.x) client library. | |
|
||||
|
||||
## CONFIG OPTIONS
|
||||
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
|
||||
@@ -34,7 +34,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name. Only change it if you provide your own run-time code for (de-)serialization of models| |original|
|
||||
|modelSuffix|The suffix of the generated model.| |null|
|
||||
|ngPackagrVersion|The version of ng-packagr compatible with Angular (see ngVersion option).| |null|
|
||||
|ngVersion|The version of Angular. (At least 9.0.0)| |20.0.0|
|
||||
|ngVersion|The version of Angular. (At least 9.0.0)| |21.0.0|
|
||||
|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null|
|
||||
|npmRepository|Use this property to set an url your private npmRepo in the package.json| |null|
|
||||
|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0|
|
||||
|
||||
@@ -22,7 +22,7 @@ npm install @openapitools/openapi-generator-cli -g
|
||||
To install a specific version of the tool, pass the version during installation:
|
||||
<!-- RELEASE_VERSION -->
|
||||
```bash
|
||||
openapi-generator-cli version-manager set 7.17.0
|
||||
openapi-generator-cli version-manager set 7.19.0
|
||||
```
|
||||
<!-- /RELEASE_VERSION -->
|
||||
To install the tool as a dev dependency in your current project:
|
||||
@@ -119,18 +119,18 @@ docker run --rm \
|
||||
<!-- RELEASE_VERSION -->
|
||||
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
|
||||
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
|
||||
```bash
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar -O openapi-generator-cli.jar
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar -O openapi-generator-cli.jar
|
||||
```
|
||||
|
||||
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
|
||||
|
||||
```powershell
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar
|
||||
```
|
||||
<!-- /RELEASE_VERSION -->
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<plugin>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<version>7.17.0</version>
|
||||
<version>7.19.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -120,3 +120,56 @@ openApiGenerate {
|
||||
```
|
||||
|
||||
*If you want to create separate tasks (for example when you have more than one api spec and require different parameters for each), this is how to do so in Gradle 7+: `tasks.register('taskName', org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { ... }`.*
|
||||
|
||||
## Mill
|
||||
|
||||
This Mill library provides a Mill module that can be used to generate code from OpenAPI specifications.
|
||||
|
||||
### Example
|
||||
|
||||
```scala
|
||||
//| mill-version: 1.0.6
|
||||
//| mvnDeps:
|
||||
//| - org.openapitools:openapi-generator-mill-plugin:7.20.0 # 1.
|
||||
|
||||
import mill.*
|
||||
|
||||
import org.openapitools.generator.mill.OpenApiModule // 2.
|
||||
|
||||
object `package` extends JavaModule with MavenModule with OpenApiModule { // 3.
|
||||
|
||||
// other Mill config...
|
||||
|
||||
object openapi extends OpenApiConfig { // 4.
|
||||
def inputSpec: T[PathRef] = Task.Source(BuildCtx.workspaceRoot / "api" / "petstore.yaml")
|
||||
// other config options...
|
||||
}
|
||||
|
||||
override def generatedSources: T[Seq[PathRef]] = Seq(
|
||||
PathRef(Task.dest),
|
||||
openapi.generate(), // 5.
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
1. Add the plugin to your `build.mill` as `mvnDeps` in the header section
|
||||
2. import `org.openapitools.generator.mill.OpenApiModule`
|
||||
3. add `OpenApiModule` to the module definition
|
||||
4. configure 1-n `OpenApiConfig` as sub-modules
|
||||
5. run the generation as part of the `compile` task
|
||||
|
||||
This gives access to the following tasks:
|
||||
|
||||
| Task | Description |
|
||||
|---------------------------|---------------------------------------------------------------------------------------------|
|
||||
| <configName>.generate | Generate code via Open API Tools Generator for Open API 2.0 or 3.x specification documents. |
|
||||
| <configName>.validateSpec | Validates the configured spec |
|
||||
|
||||
and a command
|
||||
|
||||
| Command | Description |
|
||||
|---------------------|------------------------------------------------|
|
||||
| validateOpenapiSpec | Takes the path to a spec file and validates it |
|
||||
|
||||
|
||||
For full details of all options, see the [plugin README](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-mill-plugin).
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -97,7 +97,7 @@ task validateGoodSpec(type: org.openapitools.generator.gradle.plugin.tasks.Valid
|
||||
[source,group]
|
||||
----
|
||||
plugins {
|
||||
id "org.openapi.generator" version "7.17.0"
|
||||
id "org.openapi.generator" version "7.19.0"
|
||||
}
|
||||
----
|
||||
|
||||
@@ -113,7 +113,7 @@ buildscript {
|
||||
// url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.17.0"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.17.0') {
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.19.0') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.18.0
|
||||
openApiGeneratorVersion=7.20.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
# BEGIN placeholders
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.18.0
|
||||
openApiGeneratorVersion=7.20.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
@@ -12,7 +12,7 @@ Add to your `build->plugins` section (default phase is `generate-sources` phase)
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.17.0</version>
|
||||
<version>7.19.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.18.0</version>
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
173
modules/openapi-generator-mill-plugin/README.md
Normal file
173
modules/openapi-generator-mill-plugin/README.md
Normal file
@@ -0,0 +1,173 @@
|
||||
openapi-generator-mill-plugin
|
||||
============================
|
||||
|
||||
A [Mill](https://mill-build.org) library to support the OpenAPI generator project.
|
||||
|
||||
Usage
|
||||
============================
|
||||
|
||||
1. Add the plugin to your `build.mill` as `mvnDeps` in the header section
|
||||
2. import `org.openapitools.generator.mill.OpenApiModule`
|
||||
3. add `OpenApiModule` to the module definition
|
||||
4. configure 1-n `OpenApiConfig` as sub-modules
|
||||
|
||||
```scala
|
||||
//| mill-version: 1.0.6
|
||||
//| mvnDeps:
|
||||
//| - org.openapitools:openapi-generator-mill-plugin:7.19.0 # 1.
|
||||
|
||||
import mill.*
|
||||
|
||||
import org.openapitools.generator.mill.OpenApiModule // 2.
|
||||
|
||||
object `package` extends JavaModule with MavenModule with OpenApiModule { // 3.
|
||||
|
||||
override def mvnDeps = Seq(
|
||||
mvn"jakarta.platform:jakarta.jakartaee-api:11.0.0",
|
||||
mvn"com.fasterxml.jackson.core:jackson-databind:2.20.0",
|
||||
)
|
||||
|
||||
object openapi extends OpenApiConfig { // 4.
|
||||
def inputSpec: T[PathRef] = Task.Source(BuildCtx.workspaceRoot / "api" / "petstore.yaml")
|
||||
def apiPackage: T[String] = "com.acme.foo.boundary.web.api"
|
||||
def modelPackage: T[String] = "com.acme.foo.boundary.web.model"
|
||||
def generatorName: T[String] = "jaxrs-spec"
|
||||
def sourceFolder: T[String] = "src/main/java"
|
||||
|
||||
def additionalProperties: T[Map[String, String]] = Map(
|
||||
"dateLibrary" -> "java8",
|
||||
"useJakartaEe" -> "true",
|
||||
"useSwaggerAnnotations" -> "false",
|
||||
"interfaceOnly" -> "true",
|
||||
"useTags" -> "true",
|
||||
)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Followed by:
|
||||
|
||||
```bash
|
||||
mill openapi.generate
|
||||
```
|
||||
|
||||
Usually you want to include the generation to the `compile` phase and have the sources in your source-tree which can
|
||||
be achieved by adding the generation task to the `generatedSources`.
|
||||
|
||||
```scala
|
||||
override def generatedSources: T[Seq[PathRef]] = Seq(
|
||||
PathRef(Task.dest),
|
||||
openapi.generate(),
|
||||
)
|
||||
```
|
||||
|
||||
Followed by:
|
||||
|
||||
```bash
|
||||
mill __.compile
|
||||
```
|
||||
|
||||
This works because `generatedSources` expects a list of `PathRef`s which constitute all folders that contain additional
|
||||
(generated) sources and the `generate` task from each `OpenApiConfig` returns a `PathRef` to the folder where it put the sources.
|
||||
|
||||
|
||||
### General Configuration parameters for OpenApiConfig
|
||||
|
||||
| Option | Description |
|
||||
|------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `verbose` | verbose mode (`false` by default) |
|
||||
| `inputSpec` | OpenAPI Spec file path |
|
||||
| `inputSpecRootDirectory` | Local root folder with spec file(s) |
|
||||
| `mergedFileName` | Name of the file that will contain all merged specs |
|
||||
| `generatorName` | target generator name |
|
||||
| `cleanupOutput` | Defines whether the output directory should be cleaned up before generating the output (`false` by default). |
|
||||
| `cleanup` | Defines a task which contains an `Option[Path => Unit]` which is called after the generation completed. Useful for instance to delete generated Types which are already replaced by import/type-mappings. |
|
||||
| `gitSettings` | sets Git information of the project (with `host`, `userId` and `repoId`) |
|
||||
| `templateDirectory` | directory with mustache templates |
|
||||
| `engine` | The name of templating engine to use, "mustache" (default) or "handlebars" (beta) |
|
||||
| `auth` | adds authorization headers when fetching the OpenAPI definitions remotely. Pass in a URL-encoded string of `name:header` with a comma separating multiple values |
|
||||
| `skipOverwrite` | Specifies if the existing files should be overwritten during the generation. (`false` by default) |
|
||||
| `apiPackage` | the package to use for generated api objects/classes |
|
||||
| `modelPackage` | the package to use for generated model objects/classes |
|
||||
| `invokerPackage` | the package to use for the generated invoker objects |
|
||||
| `packageName` | the default package name to use for the generated objects |
|
||||
| `artifactSettings` | sets project information in generated pom.xml/build.gradle or other build script. Language-specific conversions occur in non-jvm generators |
|
||||
| `library` | library template (sub-template) |
|
||||
| `modelNamePrefix` | Sets the prefix for model classes and enums |
|
||||
| `modelNameSuffix` | Sets the suffix for model classes and enums |
|
||||
| `apiNameSuffix` | Sets the suffix for api classes |
|
||||
| `ignoreFileOverride` | specifies the full path to a `.openapi-generator-ignore` used for pattern based overrides of generated outputs |
|
||||
| `httpUserAgent` | Sets custom User-Agent header value |
|
||||
| `removeOperationIdPrefix` | remove operationId prefix (e.g. user_getName => getName) |
|
||||
| `skipOperationExample` | skip examples defined in the operation |
|
||||
| `logToStderr` | write all log messages (not just errors) to STDERR |
|
||||
| `enablePostProcessFile` | post-processing hook |
|
||||
| `skipValidateSpec` | Whether or not to skip validating the input spec prior to generation. By default, invalid specifications will result in an error. |
|
||||
| `strictSpec` | Whether or not to treat an input document strictly against the spec. 'MUST' and 'SHALL' wording in OpenAPI spec is strictly adhered to. e.g. when false, no fixes will be applied to documents which pass validation but don't follow the spec. |
|
||||
| `openapiNormalizer` | specifies the rules to be enabled in OpenAPI normalizer in the form of RULE_1=true,RULE_2=original. |
|
||||
| `generateAliasAsModel` | generate alias (array, map) as model |
|
||||
| `configOptions` | N/A | a **map** of generator-specific parameters. To show a full list of generator-specified parameters (options), please use `configHelp` (explained below)
|
||||
| `importMappings` | specifies mappings between a given class and the import that should be used for that class in the format of type=import,type=import. You can also have multiple occurrences of this option |
|
||||
| `typeMappings` | sets mappings between OpenAPI spec types and generated code types in the format of OpenAPIType=generatedType,OpenAPIType=generatedType. For example: `array=List,map=Map,string=String`. You can also have multiple occurrences of this option. To map a specified format, use type+format, e.g. string+password=EncryptedString will map `type: string, format: password` to `EncryptedString`. |
|
||||
| `schemaMappings` | specifies mappings between the schema and the new name in the format of schema_a=Cat,schema_b=Bird. https://openapi-generator.tech/docs/customization/#schema-mapping |
|
||||
| `nameMappings` | specifies mappings between the property name and the new name in the format of property_a=firstProperty,property_b=secondProperty. https://openapi-generator.tech/docs/customization/#name-mapping |
|
||||
| `modelNameMappings` | specifies mappings between the model name and the new name in the format of model_a=FirstModel,model_b=SecondModel. https://openapi-generator.tech/docs/customization/#name-mapping |
|
||||
| `parameterNameMappings` | specifies mappings between the parameter name and the new name in the format of param_a=first_parameter,param_b=second_parameter. https://openapi-generator.tech/docs/customization/#name-mapping |
|
||||
| `inlineSchemaNameMappings` | specifies mappings between the inline schema name and the new name in the format of inline_object_2=Cat,inline_object_5=Bird. |
|
||||
| `inlineSchemaOptions` | specifies the options used when naming inline schema in inline model resolver |
|
||||
| `languageSpecificPrimitives` | specifies additional language specific primitive types in the format of type1,type2,type3,type3. For example: `String,boolean,Boolean,Double`. You can also have multiple occurrences of this option |
|
||||
| `additionalProperties` | sets additional properties that can be referenced by the mustache templates in the format of name=value,name=value. You can also have multiple occurrences of this option |
|
||||
| `reservedWordsMappings` | specifies how a reserved name should be escaped to. Otherwise, the default `_<name>` is used. For example `id=identifier`. You can also have multiple occurrences of this option |
|
||||
| `generateApis` | generate the apis (`true` by default). To generate only a subset, define via `apiFilesConstrainedTo`. |
|
||||
| `apiFilesConstrainedTo` | A comma separated list of apis to generate. All apis is the default. |
|
||||
| `generateModels` | generate the models (`true` by default). To generate only a subset, define via `modelFilesConstrainedTo`. |
|
||||
| `modelFilesConstrainedTo` | A comma separated list of models to generate. All models is the default. |
|
||||
| `generateRecursiveDependentModels` | Enables dependent Models to be generated when `modelFilesConstrainedTo` is used. Default depends on `modelFilesConstrainedTo` (true when nonEmpty) |
|
||||
| `generateSupportingFiles` | generate the supporting files (`true` by default). To generate only a subset, define via `supportingFilesConstrainedTo`. |
|
||||
| `supportingFilesConstrainedTo` | A list of supporting files to generate. When not defined, all files will be generated. |
|
||||
| `generateModelTests` | generate the model tests (currently disabled) |
|
||||
| `generateModelDocumentation` | generate the model documentation (`true` by default) |
|
||||
| `generateApiTests` | generate the api tests (currently disabled) |
|
||||
| `generateApiDocumentation` | generate the api documentation (`true` by default) |
|
||||
| `dryRun` | Defines whether the generator should run in dry-run mode. In dry-run mode no files are written and a summary about file states is output ( `false` by default). |
|
||||
|
||||
### Type and import mappings
|
||||
|
||||
To override the mappings between OpenAPI spec types and the types used in the generated code, set `typeMappings`.
|
||||
|
||||
```scala
|
||||
def typeMappings: T[Map[String, String]] = Map(
|
||||
"time" -> "LocalTime"
|
||||
)
|
||||
```
|
||||
|
||||
For types that are not already included in the generator configuration, you may need to add a corresponding `importMapping` too.
|
||||
|
||||
```scala
|
||||
def typeMappings: T[Map[String, String]] = Map(
|
||||
"binary" -> "StreamingOutput",
|
||||
"file" -> "StreamingOutput"
|
||||
)
|
||||
def importMappings: T[Map[String, String]] = Map(
|
||||
"StreamingOutput" -> "javax.ws.rs.core.StreamingOutput",
|
||||
)
|
||||
```
|
||||
|
||||
### Validate Command
|
||||
|
||||
You can validate any OpenAPI spec file by calling `validateOpenapiSpec` on the `OpenApiModule`.
|
||||
|
||||
```bash
|
||||
mill validateOpenapiSpec $(pwd)/api/petstore-v3.0-invalid.yaml
|
||||
```
|
||||
|
||||
This command has two additional parameters:
|
||||
* `--failOnWarnings true` enable failing the check already on warnings
|
||||
* `--recommend false`
|
||||
|
||||
You can also validate your `OpenApiConfig` object by calling `validate` on it.
|
||||
|
||||
```bash
|
||||
mill yourConfigObject.validate
|
||||
```
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
openapi: "3.0.0"
|
||||
servers:
|
||||
- url: http://petstore.swagger.io/v1
|
||||
paths:
|
||||
/pets:
|
||||
get:
|
||||
summary: List all pets
|
||||
operationId: listPets
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: limit
|
||||
in: query
|
||||
description: How many items to return at one time (max 100)
|
||||
required: false
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
responses:
|
||||
'200':
|
||||
description: A paged array of pets
|
||||
headers:
|
||||
x-next:
|
||||
description: A link to the next page of responses
|
||||
schema:
|
||||
type: string
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
post:
|
||||
summary: Create a pet
|
||||
tags:
|
||||
- pets
|
||||
responses:
|
||||
'201':
|
||||
description: Null response
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/pets/{petId}:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
operationId: showPetById
|
||||
tags:
|
||||
- pets
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
required: true
|
||||
description: The id of the pet to retrieve
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: Expected response to a valid request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
Error:
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
message:
|
||||
type: string
|
||||
736
modules/openapi-generator-mill-plugin/example/api/petstore.yaml
Normal file
736
modules/openapi-generator-mill-plugin/example/api/petstore.yaml
Normal file
@@ -0,0 +1,736 @@
|
||||
openapi: 3.0.0
|
||||
servers:
|
||||
- url: 'http://petstore.swagger.io/v2'
|
||||
info:
|
||||
description: >-
|
||||
This is a sample server Petstore server. For this sample, you can use the api key
|
||||
`special-key` to test the authorization filters.
|
||||
version: 1.0.0
|
||||
title: OpenAPI Petstore
|
||||
license:
|
||||
name: Apache-2.0
|
||||
url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
|
||||
tags:
|
||||
- name: pet
|
||||
description: Everything about your Pets
|
||||
- name: store
|
||||
description: Access to Petstore orders
|
||||
- name: user
|
||||
description: Operations about user
|
||||
paths:
|
||||
/pet:
|
||||
post:
|
||||
tags:
|
||||
- pet
|
||||
summary: Add a new pet to the store
|
||||
description: ''
|
||||
operationId: addPet
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
'405':
|
||||
description: Invalid input
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/Pet'
|
||||
put:
|
||||
tags:
|
||||
- pet
|
||||
summary: Update an existing pet
|
||||
description: ''
|
||||
operationId: updatePet
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
'400':
|
||||
description: Invalid ID supplied
|
||||
'404':
|
||||
description: Pet not found
|
||||
'405':
|
||||
description: Validation exception
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/Pet'
|
||||
/pet/findByStatus:
|
||||
get:
|
||||
tags:
|
||||
- pet
|
||||
summary: Finds Pets by status
|
||||
description: Multiple status values can be provided with comma separated strings
|
||||
operationId: findPetsByStatus
|
||||
parameters:
|
||||
- name: status
|
||||
in: query
|
||||
description: Status values that need to be considered for filter
|
||||
required: true
|
||||
style: form
|
||||
explode: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
enum:
|
||||
- available
|
||||
- pending
|
||||
- sold
|
||||
default: available
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
'400':
|
||||
description: Invalid status value
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'read:pets'
|
||||
/pet/findByTags:
|
||||
get:
|
||||
tags:
|
||||
- pet
|
||||
summary: Finds Pets by tags
|
||||
description: >-
|
||||
Multiple tags can be provided with comma separated strings. Use tag1,
|
||||
tag2, tag3 for testing.
|
||||
operationId: findPetsByTags
|
||||
parameters:
|
||||
- name: tags
|
||||
in: query
|
||||
description: Tags to filter by
|
||||
required: true
|
||||
style: form
|
||||
explode: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
'400':
|
||||
description: Invalid tag value
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'read:pets'
|
||||
deprecated: true
|
||||
'/pet/{petId}':
|
||||
get:
|
||||
tags:
|
||||
- pet
|
||||
summary: Find pet by ID
|
||||
description: Returns a single pet
|
||||
operationId: getPetById
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
description: ID of pet to return
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
'400':
|
||||
description: Invalid ID supplied
|
||||
'404':
|
||||
description: Pet not found
|
||||
security:
|
||||
- api_key: []
|
||||
post:
|
||||
tags:
|
||||
- pet
|
||||
summary: Updates a pet in the store with form data
|
||||
description: ''
|
||||
operationId: updatePetWithForm
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
description: ID of pet that needs to be updated
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
'405':
|
||||
description: Invalid input
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
requestBody:
|
||||
content:
|
||||
application/x-www-form-urlencoded:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
description: Updated name of the pet
|
||||
type: string
|
||||
status:
|
||||
description: Updated status of the pet
|
||||
type: string
|
||||
delete:
|
||||
tags:
|
||||
- pet
|
||||
summary: Deletes a pet
|
||||
description: ''
|
||||
operationId: deletePet
|
||||
parameters:
|
||||
- name: api_key
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: petId
|
||||
in: path
|
||||
description: Pet id to delete
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
'400':
|
||||
description: Invalid pet value
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
'/pet/{petId}/uploadImage':
|
||||
post:
|
||||
tags:
|
||||
- pet
|
||||
summary: uploads an image
|
||||
description: ''
|
||||
operationId: uploadFile
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
description: ID of pet to update
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ApiResponse'
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
requestBody:
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
description: file to upload
|
||||
type: string
|
||||
format: binary
|
||||
/store/inventory:
|
||||
get:
|
||||
tags:
|
||||
- store
|
||||
summary: Returns pet inventories by status
|
||||
description: Returns a map of status codes to quantities
|
||||
operationId: getInventory
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: integer
|
||||
format: int32
|
||||
security:
|
||||
- api_key: []
|
||||
/store/order:
|
||||
post:
|
||||
tags:
|
||||
- store
|
||||
summary: Place an order for a pet
|
||||
description: ''
|
||||
operationId: placeOrder
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Order'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Order'
|
||||
'400':
|
||||
description: Invalid Order
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Order'
|
||||
description: order placed for purchasing the pet
|
||||
required: true
|
||||
'/store/order/{orderId}':
|
||||
get:
|
||||
tags:
|
||||
- store
|
||||
summary: Find purchase order by ID
|
||||
description: >-
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values
|
||||
will generate exceptions
|
||||
operationId: getOrderById
|
||||
parameters:
|
||||
- name: orderId
|
||||
in: path
|
||||
description: ID of pet that needs to be fetched
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
maximum: 5
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Order'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Order'
|
||||
'400':
|
||||
description: Invalid ID supplied
|
||||
'404':
|
||||
description: Order not found
|
||||
delete:
|
||||
tags:
|
||||
- store
|
||||
summary: Delete purchase order by ID
|
||||
description: >-
|
||||
For valid response try integer IDs with value < 1000. Anything above
|
||||
1000 or nonintegers will generate API errors
|
||||
operationId: deleteOrder
|
||||
parameters:
|
||||
- name: orderId
|
||||
in: path
|
||||
description: ID of the order that needs to be deleted
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'400':
|
||||
description: Invalid ID supplied
|
||||
'404':
|
||||
description: Order not found
|
||||
/user:
|
||||
post:
|
||||
tags:
|
||||
- user
|
||||
summary: Create user
|
||||
description: This can only be done by the logged in user.
|
||||
operationId: createUser
|
||||
responses:
|
||||
default:
|
||||
description: successful operation
|
||||
security:
|
||||
- api_key: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
description: Created user object
|
||||
required: true
|
||||
/user/createWithArray:
|
||||
post:
|
||||
tags:
|
||||
- user
|
||||
summary: Creates list of users with given input array
|
||||
description: ''
|
||||
operationId: createUsersWithArrayInput
|
||||
responses:
|
||||
default:
|
||||
description: successful operation
|
||||
security:
|
||||
- api_key: []
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/UserArray'
|
||||
/user/createWithList:
|
||||
post:
|
||||
tags:
|
||||
- user
|
||||
summary: Creates list of users with given input array
|
||||
description: ''
|
||||
operationId: createUsersWithListInput
|
||||
responses:
|
||||
default:
|
||||
description: successful operation
|
||||
security:
|
||||
- api_key: []
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/UserArray'
|
||||
/user/login:
|
||||
get:
|
||||
tags:
|
||||
- user
|
||||
summary: Logs user into the system
|
||||
description: ''
|
||||
operationId: loginUser
|
||||
parameters:
|
||||
- name: username
|
||||
in: query
|
||||
description: The user name for login
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$'
|
||||
- name: password
|
||||
in: query
|
||||
description: The password for login in clear text
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
headers:
|
||||
Set-Cookie:
|
||||
description: >-
|
||||
Cookie authentication key for use with the `api_key`
|
||||
apiKey authentication.
|
||||
schema:
|
||||
type: string
|
||||
example: AUTH_KEY=abcde12345; Path=/; HttpOnly
|
||||
X-Rate-Limit:
|
||||
description: calls per hour allowed by the user
|
||||
schema:
|
||||
type: integer
|
||||
format: int32
|
||||
X-Expires-After:
|
||||
description: date in UTC when token expires
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
type: string
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
'400':
|
||||
description: Invalid username/password supplied
|
||||
/user/logout:
|
||||
get:
|
||||
tags:
|
||||
- user
|
||||
summary: Logs out current logged in user session
|
||||
description: ''
|
||||
operationId: logoutUser
|
||||
responses:
|
||||
default:
|
||||
description: successful operation
|
||||
security:
|
||||
- api_key: []
|
||||
'/user/{username}':
|
||||
get:
|
||||
tags:
|
||||
- user
|
||||
summary: Get user by user name
|
||||
description: ''
|
||||
operationId: getUserByName
|
||||
parameters:
|
||||
- name: username
|
||||
in: path
|
||||
description: The name that needs to be fetched. Use user1 for testing.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
content:
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
'400':
|
||||
description: Invalid username supplied
|
||||
'404':
|
||||
description: User not found
|
||||
put:
|
||||
tags:
|
||||
- user
|
||||
summary: Updated user
|
||||
description: This can only be done by the logged in user.
|
||||
operationId: updateUser
|
||||
parameters:
|
||||
- name: username
|
||||
in: path
|
||||
description: name that need to be deleted
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'400':
|
||||
description: Invalid user supplied
|
||||
'404':
|
||||
description: User not found
|
||||
security:
|
||||
- api_key: []
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
description: Updated user object
|
||||
required: true
|
||||
delete:
|
||||
tags:
|
||||
- user
|
||||
summary: Delete user
|
||||
description: This can only be done by the logged in user.
|
||||
operationId: deleteUser
|
||||
parameters:
|
||||
- name: username
|
||||
in: path
|
||||
description: The name that needs to be deleted
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'400':
|
||||
description: Invalid username supplied
|
||||
'404':
|
||||
description: User not found
|
||||
security:
|
||||
- api_key: []
|
||||
externalDocs:
|
||||
description: Find out more about Swagger
|
||||
url: 'http://swagger.io'
|
||||
components:
|
||||
requestBodies:
|
||||
UserArray:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/User'
|
||||
description: List of user object
|
||||
required: true
|
||||
Pet:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
application/xml:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
description: Pet object that needs to be added to the store
|
||||
required: true
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
type: oauth2
|
||||
flows:
|
||||
implicit:
|
||||
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
|
||||
scopes:
|
||||
'write:pets': modify pets in your account
|
||||
'read:pets': read your pets
|
||||
api_key:
|
||||
type: apiKey
|
||||
name: api_key
|
||||
in: header
|
||||
schemas:
|
||||
Order:
|
||||
title: Pet Order
|
||||
description: An order for a pets from the pet store
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
petId:
|
||||
type: integer
|
||||
format: int64
|
||||
quantity:
|
||||
type: integer
|
||||
format: int32
|
||||
shipDate:
|
||||
type: string
|
||||
format: date-time
|
||||
status:
|
||||
type: string
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
complete:
|
||||
type: boolean
|
||||
default: false
|
||||
xml:
|
||||
name: Order
|
||||
Category:
|
||||
title: Pet category
|
||||
description: A category for a pet
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
pattern: '^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$'
|
||||
xml:
|
||||
name: Category
|
||||
User:
|
||||
title: a User
|
||||
description: A User who is purchasing from the pet store
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
username:
|
||||
type: string
|
||||
firstName:
|
||||
type: string
|
||||
lastName:
|
||||
type: string
|
||||
email:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
phone:
|
||||
type: string
|
||||
userStatus:
|
||||
type: integer
|
||||
format: int32
|
||||
description: User Status
|
||||
xml:
|
||||
name: User
|
||||
Tag:
|
||||
title: Pet Tag
|
||||
description: A tag for a pet
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
xml:
|
||||
name: Tag
|
||||
Pet:
|
||||
title: a Pet
|
||||
description: A pet for sale in the pet store
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- photoUrls
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
category:
|
||||
$ref: '#/components/schemas/Category'
|
||||
name:
|
||||
type: string
|
||||
example: doggie
|
||||
photoUrls:
|
||||
type: array
|
||||
xml:
|
||||
name: photoUrl
|
||||
wrapped: true
|
||||
items:
|
||||
type: string
|
||||
tags:
|
||||
type: array
|
||||
xml:
|
||||
name: tag
|
||||
wrapped: true
|
||||
items:
|
||||
$ref: '#/components/schemas/Tag'
|
||||
status:
|
||||
type: string
|
||||
description: pet status in the store
|
||||
enum:
|
||||
- available
|
||||
- pending
|
||||
- sold
|
||||
xml:
|
||||
name: Pet
|
||||
ApiResponse:
|
||||
title: An uploaded response
|
||||
description: Describes the result of uploading an image resource
|
||||
type: object
|
||||
properties:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
type:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
51
modules/openapi-generator-mill-plugin/example/build.mill
Normal file
51
modules/openapi-generator-mill-plugin/example/build.mill
Normal file
@@ -0,0 +1,51 @@
|
||||
//| mill-version: 1.0.6
|
||||
//| # usually you would add the plugin dependency like the following,
|
||||
//| # but for testing with SNAPSHOT versions, the plugin dependency is added in the meta-build
|
||||
//| # mvnDeps:
|
||||
//| # - org.openapitools:openapi-generator-mill-plugin:$MILL_OPENAPITOOLS_PLUGIN_VERSION
|
||||
//|
|
||||
package build
|
||||
|
||||
import mill.*
|
||||
import mill.api.BuildCtx
|
||||
import mill.javalib.publish.{Developer, License, VersionControl}
|
||||
import mill.scalalib.publish.PomSettings
|
||||
import mill.util.BuildInfo.{millBinPlatform, millVersion}
|
||||
import javalib.*
|
||||
|
||||
import org.openapitools.generator.mill.OpenApiModule
|
||||
|
||||
object `package` extends JavaModule with MavenModule with OpenApiModule {
|
||||
|
||||
override def mvnDeps = Seq(
|
||||
mvn"jakarta.platform:jakarta.jakartaee-api:10.0.0",
|
||||
mvn"com.fasterxml.jackson.core:jackson-databind:2.20.0",
|
||||
mvn"org.openapitools:jackson-databind-nullable:0.2.8"
|
||||
)
|
||||
|
||||
object openapi extends OpenApiConfig {
|
||||
override def inputSpec: T[PathRef] = Task.Source(BuildCtx.workspaceRoot / "api" / "petstore.yaml")
|
||||
override def apiPackage: T[String] = "com.acme.foo.boundary.web.api"
|
||||
override def modelPackage: T[String] = "com.acme.foo.boundary.web.model"
|
||||
override def generatorName: T[String] = "jaxrs-spec"
|
||||
override def sourceFolder: T[String] = "src/gen/java"
|
||||
|
||||
override def gitSettings: T[Option[GitSettings]] = Some(GitSettings("host", "userid", "repoid"))
|
||||
override def artifactSettings: T[Option[ArtifactSettings]] = Some(ArtifactSettings("groupid", "artifactid", None))
|
||||
|
||||
override def cleanupOutput: T[Boolean] = true
|
||||
|
||||
def additionalProperties: T[Map[String, String]] = Map(
|
||||
"dateLibrary" -> "java8",
|
||||
"useJakartaEe" -> "true",
|
||||
"useSwaggerAnnotations" -> "false",
|
||||
"interfaceOnly" -> "true",
|
||||
"useTags" -> "true",
|
||||
)
|
||||
}
|
||||
|
||||
override def generatedSources: T[Seq[PathRef]] = Seq(
|
||||
PathRef(Task.dest),
|
||||
openapi.generate(),
|
||||
)
|
||||
}
|
||||
333
modules/openapi-generator-mill-plugin/example/mill
Executable file
333
modules/openapi-generator-mill-plugin/example/mill
Executable file
@@ -0,0 +1,333 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# This is a wrapper script, that automatically selects or downloads Mill from Maven Central or GitHub release pages.
|
||||
#
|
||||
# This script determines the Mill version to use by trying these sources
|
||||
# - env-variable `MILL_VERSION`
|
||||
# - local file `.mill-version`
|
||||
# - local file `.config/mill-version`
|
||||
# - `mill-version` from YAML fronmatter of current buildfile
|
||||
# - if accessible, find the latest stable version available on Maven Central (https://repo1.maven.org/maven2)
|
||||
# - env-variable `DEFAULT_MILL_VERSION`
|
||||
#
|
||||
# If a version has the suffix '-native' a native binary will be used.
|
||||
# If a version has the suffix '-jvm' an executable jar file will be used, requiring an already installed Java runtime.
|
||||
# If no such suffix is found, the script will pick a default based on version and platform.
|
||||
#
|
||||
# Once a version was determined, it tries to use either
|
||||
# - a system-installed mill, if found and it's version matches
|
||||
# - an already downloaded version under ~/.cache/mill/download
|
||||
#
|
||||
# If no working mill version was found on the system,
|
||||
# this script downloads a binary file from Maven Central or Github Pages (this is version dependent)
|
||||
# into a cache location (~/.cache/mill/download).
|
||||
#
|
||||
# Mill Project URL: https://github.com/com-lihaoyi/mill
|
||||
# Script Version: 1.0.0-M1-21-7b6fae-DIRTY892b63e8
|
||||
#
|
||||
# If you want to improve this script, please also contribute your changes back!
|
||||
# This script was generated from: dist/scripts/src/mill.sh
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "--setup-completions" ] ; then
|
||||
# Need to preserve the first position of those listed options
|
||||
MILL_FIRST_ARG=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ -z "${DEFAULT_MILL_VERSION}" ] ; then
|
||||
DEFAULT_MILL_VERSION="0.12.10"
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "${GITHUB_RELEASE_CDN}" ] ; then
|
||||
GITHUB_RELEASE_CDN=""
|
||||
fi
|
||||
|
||||
|
||||
MILL_REPO_URL="https://github.com/com-lihaoyi/mill"
|
||||
|
||||
if [ -z "${CURL_CMD}" ] ; then
|
||||
CURL_CMD=curl
|
||||
fi
|
||||
|
||||
# Explicit commandline argument takes precedence over all other methods
|
||||
if [ "$1" = "--mill-version" ] ; then
|
||||
echo "The --mill-version option is no longer supported." 1>&2
|
||||
fi
|
||||
|
||||
MILL_BUILD_SCRIPT=""
|
||||
|
||||
if [ -f "build.mill" ] ; then
|
||||
MILL_BUILD_SCRIPT="build.mill"
|
||||
elif [ -f "build.mill.scala" ] ; then
|
||||
MILL_BUILD_SCRIPT="build.mill.scala"
|
||||
elif [ -f "build.sc" ] ; then
|
||||
MILL_BUILD_SCRIPT="build.sc"
|
||||
fi
|
||||
|
||||
# Please note, that if a MILL_VERSION is already set in the environment,
|
||||
# We reuse it's value and skip searching for a value.
|
||||
|
||||
# If not already set, read .mill-version file
|
||||
if [ -z "${MILL_VERSION}" ] ; then
|
||||
if [ -f ".mill-version" ] ; then
|
||||
MILL_VERSION="$(tr '\r' '\n' < .mill-version | head -n 1 2> /dev/null)"
|
||||
elif [ -f ".config/mill-version" ] ; then
|
||||
MILL_VERSION="$(tr '\r' '\n' < .config/mill-version | head -n 1 2> /dev/null)"
|
||||
elif [ -n "${MILL_BUILD_SCRIPT}" ] ; then
|
||||
MILL_VERSION="$(cat ${MILL_BUILD_SCRIPT} | grep '//[|] *mill-version: *' | sed 's;//| *mill-version: *;;')"
|
||||
fi
|
||||
fi
|
||||
|
||||
MILL_USER_CACHE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/mill"
|
||||
|
||||
if [ -z "${MILL_DOWNLOAD_PATH}" ] ; then
|
||||
MILL_DOWNLOAD_PATH="${MILL_USER_CACHE_DIR}/download"
|
||||
fi
|
||||
|
||||
# If not already set, try to fetch newest from Github
|
||||
if [ -z "${MILL_VERSION}" ] ; then
|
||||
# TODO: try to load latest version from release page
|
||||
echo "No mill version specified." 1>&2
|
||||
echo "You should provide a version via a '//| mill-version: ' comment or a '.mill-version' file." 1>&2
|
||||
|
||||
mkdir -p "${MILL_DOWNLOAD_PATH}"
|
||||
LANG=C touch -d '1 hour ago' "${MILL_DOWNLOAD_PATH}/.expire_latest" 2>/dev/null || (
|
||||
# we might be on OSX or BSD which don't have -d option for touch
|
||||
# but probably a -A [-][[hh]mm]SS
|
||||
touch "${MILL_DOWNLOAD_PATH}/.expire_latest"; touch -A -010000 "${MILL_DOWNLOAD_PATH}/.expire_latest"
|
||||
) || (
|
||||
# in case we still failed, we retry the first touch command with the intention
|
||||
# to show the (previously suppressed) error message
|
||||
LANG=C touch -d '1 hour ago' "${MILL_DOWNLOAD_PATH}/.expire_latest"
|
||||
)
|
||||
|
||||
# POSIX shell variant of bash's -nt operator, see https://unix.stackexchange.com/a/449744/6993
|
||||
# if [ "${MILL_DOWNLOAD_PATH}/.latest" -nt "${MILL_DOWNLOAD_PATH}/.expire_latest" ] ; then
|
||||
if [ -n "$(find -L "${MILL_DOWNLOAD_PATH}/.latest" -prune -newer "${MILL_DOWNLOAD_PATH}/.expire_latest")" ]; then
|
||||
# we know a current latest version
|
||||
MILL_VERSION=$(head -n 1 "${MILL_DOWNLOAD_PATH}"/.latest 2> /dev/null)
|
||||
fi
|
||||
|
||||
if [ -z "${MILL_VERSION}" ] ; then
|
||||
# we don't know a current latest version
|
||||
echo "Retrieving latest mill version ..." 1>&2
|
||||
LANG=C ${CURL_CMD} -s -i -f -I ${MILL_REPO_URL}/releases/latest 2> /dev/null | grep --ignore-case Location: | sed s'/^.*tag\///' | tr -d '\r\n' > "${MILL_DOWNLOAD_PATH}/.latest"
|
||||
MILL_VERSION=$(head -n 1 "${MILL_DOWNLOAD_PATH}"/.latest 2> /dev/null)
|
||||
fi
|
||||
|
||||
if [ -z "${MILL_VERSION}" ] ; then
|
||||
# Last resort
|
||||
MILL_VERSION="${DEFAULT_MILL_VERSION}"
|
||||
echo "Falling back to hardcoded mill version ${MILL_VERSION}" 1>&2
|
||||
else
|
||||
echo "Using mill version ${MILL_VERSION}" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
MILL_NATIVE_SUFFIX="-native"
|
||||
MILL_JVM_SUFFIX="-jvm"
|
||||
FULL_MILL_VERSION=$MILL_VERSION
|
||||
ARTIFACT_SUFFIX=""
|
||||
set_artifact_suffix(){
|
||||
if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" = "Linux" ]; then
|
||||
if [ "$(uname -m)" = "aarch64" ]; then
|
||||
ARTIFACT_SUFFIX="-native-linux-aarch64"
|
||||
else
|
||||
ARTIFACT_SUFFIX="-native-linux-amd64"
|
||||
fi
|
||||
elif [ "$(uname)" = "Darwin" ]; then
|
||||
if [ "$(uname -m)" = "arm64" ]; then
|
||||
ARTIFACT_SUFFIX="-native-mac-aarch64"
|
||||
else
|
||||
ARTIFACT_SUFFIX="-native-mac-amd64"
|
||||
fi
|
||||
else
|
||||
echo "This native mill launcher supports only Linux and macOS." 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$MILL_VERSION" in
|
||||
*"$MILL_NATIVE_SUFFIX")
|
||||
MILL_VERSION=${MILL_VERSION%"$MILL_NATIVE_SUFFIX"}
|
||||
set_artifact_suffix
|
||||
;;
|
||||
|
||||
*"$MILL_JVM_SUFFIX")
|
||||
MILL_VERSION=${MILL_VERSION%"$MILL_JVM_SUFFIX"}
|
||||
;;
|
||||
|
||||
*)
|
||||
case "$MILL_VERSION" in
|
||||
0.1.*) ;;
|
||||
0.2.*) ;;
|
||||
0.3.*) ;;
|
||||
0.4.*) ;;
|
||||
0.5.*) ;;
|
||||
0.6.*) ;;
|
||||
0.7.*) ;;
|
||||
0.8.*) ;;
|
||||
0.9.*) ;;
|
||||
0.10.*) ;;
|
||||
0.11.*) ;;
|
||||
0.12.*) ;;
|
||||
*)
|
||||
set_artifact_suffix
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
MILL="${MILL_DOWNLOAD_PATH}/$MILL_VERSION$ARTIFACT_SUFFIX"
|
||||
|
||||
try_to_use_system_mill() {
|
||||
if [ "$(uname)" != "Linux" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
MILL_IN_PATH="$(command -v mill || true)"
|
||||
|
||||
if [ -z "${MILL_IN_PATH}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
SYSTEM_MILL_FIRST_TWO_BYTES=$(head --bytes=2 "${MILL_IN_PATH}")
|
||||
if [ "${SYSTEM_MILL_FIRST_TWO_BYTES}" = "#!" ]; then
|
||||
# MILL_IN_PATH is (very likely) a shell script and not the mill
|
||||
# executable, ignore it.
|
||||
return 0
|
||||
fi
|
||||
|
||||
SYSTEM_MILL_PATH=$(readlink -e "${MILL_IN_PATH}")
|
||||
SYSTEM_MILL_SIZE=$(stat --format=%s "${SYSTEM_MILL_PATH}")
|
||||
SYSTEM_MILL_MTIME=$(stat --format=%y "${SYSTEM_MILL_PATH}")
|
||||
|
||||
if [ ! -d "${MILL_USER_CACHE_DIR}" ]; then
|
||||
mkdir -p "${MILL_USER_CACHE_DIR}"
|
||||
fi
|
||||
|
||||
SYSTEM_MILL_INFO_FILE="${MILL_USER_CACHE_DIR}/system-mill-info"
|
||||
if [ -f "${SYSTEM_MILL_INFO_FILE}" ]; then
|
||||
parseSystemMillInfo() {
|
||||
LINE_NUMBER="${1}"
|
||||
# Select the line number of the SYSTEM_MILL_INFO_FILE, cut the
|
||||
# variable definition in that line in two halves and return
|
||||
# the value, and finally remove the quotes.
|
||||
sed -n "${LINE_NUMBER}p" "${SYSTEM_MILL_INFO_FILE}" |\
|
||||
cut -d= -f2 |\
|
||||
sed 's/"\(.*\)"/\1/'
|
||||
}
|
||||
|
||||
CACHED_SYSTEM_MILL_PATH=$(parseSystemMillInfo 1)
|
||||
CACHED_SYSTEM_MILL_VERSION=$(parseSystemMillInfo 2)
|
||||
CACHED_SYSTEM_MILL_SIZE=$(parseSystemMillInfo 3)
|
||||
CACHED_SYSTEM_MILL_MTIME=$(parseSystemMillInfo 4)
|
||||
|
||||
if [ "${SYSTEM_MILL_PATH}" = "${CACHED_SYSTEM_MILL_PATH}" ] \
|
||||
&& [ "${SYSTEM_MILL_SIZE}" = "${CACHED_SYSTEM_MILL_SIZE}" ] \
|
||||
&& [ "${SYSTEM_MILL_MTIME}" = "${CACHED_SYSTEM_MILL_MTIME}" ]; then
|
||||
if [ "${CACHED_SYSTEM_MILL_VERSION}" = "${MILL_VERSION}" ]; then
|
||||
MILL="${SYSTEM_MILL_PATH}"
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
SYSTEM_MILL_VERSION=$(${SYSTEM_MILL_PATH} --version | head -n1 | sed -n 's/^Mill.*version \(.*\)/\1/p')
|
||||
|
||||
cat <<EOF > "${SYSTEM_MILL_INFO_FILE}"
|
||||
CACHED_SYSTEM_MILL_PATH="${SYSTEM_MILL_PATH}"
|
||||
CACHED_SYSTEM_MILL_VERSION="${SYSTEM_MILL_VERSION}"
|
||||
CACHED_SYSTEM_MILL_SIZE="${SYSTEM_MILL_SIZE}"
|
||||
CACHED_SYSTEM_MILL_MTIME="${SYSTEM_MILL_MTIME}"
|
||||
EOF
|
||||
|
||||
if [ "${SYSTEM_MILL_VERSION}" = "${MILL_VERSION}" ]; then
|
||||
MILL="${SYSTEM_MILL_PATH}"
|
||||
fi
|
||||
}
|
||||
try_to_use_system_mill
|
||||
|
||||
# If not already downloaded, download it
|
||||
if [ ! -s "${MILL}" ] || [ "$MILL_TEST_DRY_RUN_LAUNCHER_SCRIPT" = "1" ] ; then
|
||||
case $MILL_VERSION in
|
||||
0.0.* | 0.1.* | 0.2.* | 0.3.* | 0.4.* )
|
||||
DOWNLOAD_SUFFIX=""
|
||||
DOWNLOAD_FROM_MAVEN=0
|
||||
;;
|
||||
0.5.* | 0.6.* | 0.7.* | 0.8.* | 0.9.* | 0.10.* | 0.11.0-M* )
|
||||
DOWNLOAD_SUFFIX="-assembly"
|
||||
DOWNLOAD_FROM_MAVEN=0
|
||||
;;
|
||||
*)
|
||||
DOWNLOAD_SUFFIX="-assembly"
|
||||
DOWNLOAD_FROM_MAVEN=1
|
||||
;;
|
||||
esac
|
||||
case $MILL_VERSION in
|
||||
0.12.0 | 0.12.1 | 0.12.2 | 0.12.3 | 0.12.4 | 0.12.5 | 0.12.6 | 0.12.7 | 0.12.8 | 0.12.9 | 0.12.10 | 0.12.11 )
|
||||
DOWNLOAD_EXT="jar"
|
||||
;;
|
||||
0.12.* )
|
||||
DOWNLOAD_EXT="exe"
|
||||
;;
|
||||
0.* )
|
||||
DOWNLOAD_EXT="jar"
|
||||
;;
|
||||
*)
|
||||
DOWNLOAD_EXT="exe"
|
||||
;;
|
||||
esac
|
||||
|
||||
DOWNLOAD_FILE=$(mktemp mill.XXXXXX)
|
||||
if [ "$DOWNLOAD_FROM_MAVEN" = "1" ] ; then
|
||||
DOWNLOAD_URL="https://repo1.maven.org/maven2/com/lihaoyi/mill-dist${ARTIFACT_SUFFIX}/${MILL_VERSION}/mill-dist${ARTIFACT_SUFFIX}-${MILL_VERSION}.${DOWNLOAD_EXT}"
|
||||
else
|
||||
MILL_VERSION_TAG=$(echo "$MILL_VERSION" | sed -E 's/([^-]+)(-M[0-9]+)?(-.*)?/\1\2/')
|
||||
DOWNLOAD_URL="${GITHUB_RELEASE_CDN}${MILL_REPO_URL}/releases/download/${MILL_VERSION_TAG}/${MILL_VERSION}${DOWNLOAD_SUFFIX}"
|
||||
unset MILL_VERSION_TAG
|
||||
fi
|
||||
|
||||
if [ "$MILL_TEST_DRY_RUN_LAUNCHER_SCRIPT" = "1" ] ; then
|
||||
echo $DOWNLOAD_URL
|
||||
echo $MILL
|
||||
exit 0
|
||||
fi
|
||||
# TODO: handle command not found
|
||||
echo "Downloading mill ${MILL_VERSION} from ${DOWNLOAD_URL} ..." 1>&2
|
||||
${CURL_CMD} -f -L -o "${DOWNLOAD_FILE}" "${DOWNLOAD_URL}"
|
||||
chmod +x "${DOWNLOAD_FILE}"
|
||||
mkdir -p "${MILL_DOWNLOAD_PATH}"
|
||||
mv "${DOWNLOAD_FILE}" "${MILL}"
|
||||
|
||||
unset DOWNLOAD_FILE
|
||||
unset DOWNLOAD_SUFFIX
|
||||
fi
|
||||
|
||||
if [ -z "$MILL_MAIN_CLI" ] ; then
|
||||
MILL_MAIN_CLI="${0}"
|
||||
fi
|
||||
|
||||
MILL_FIRST_ARG=""
|
||||
if [ "$1" = "--bsp" ] || [ "${1#"-i"}" != "$1" ] || [ "$1" = "--interactive" ] || [ "$1" = "--no-server" ] || [ "$1" = "--no-daemon" ] || [ "$1" = "--repl" ] || [ "$1" = "--help" ] ; then
|
||||
# Need to preserve the first position of those listed options
|
||||
MILL_FIRST_ARG=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
unset MILL_DOWNLOAD_PATH
|
||||
unset MILL_OLD_DOWNLOAD_PATH
|
||||
unset OLD_MILL
|
||||
unset MILL_VERSION
|
||||
unset MILL_REPO_URL
|
||||
|
||||
# -D mill.main.cli is for compatibility with Mill 0.10.9 - 0.13.0-M2
|
||||
# We don't quote MILL_FIRST_ARG on purpose, so we can expand the empty value without quotes
|
||||
# shellcheck disable=SC2086
|
||||
exec "${MILL}" $MILL_FIRST_ARG -D "mill.main.cli=${MILL_MAIN_CLI}" "$@"
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
import coursier.LocalRepositories.Dangerous
|
||||
import coursier.Repositories
|
||||
import mill.scalalib.DepSyntax
|
||||
import mill.*
|
||||
import mill.api.Task
|
||||
import mill.meta.MillBuildRootModule
|
||||
import java.util.Properties
|
||||
import java.io.FileInputStream
|
||||
import scala.util.Using
|
||||
|
||||
object `package` extends MillBuildRootModule {
|
||||
|
||||
override def repositories = Task {
|
||||
Seq(
|
||||
// central needed for default deps
|
||||
Repositories.central.root,
|
||||
// the previously installed snapshot is in local maven
|
||||
// see docs on Coursier, why m2 is considered dangerous
|
||||
Dangerous.maven2Local.root)
|
||||
}
|
||||
|
||||
def propsFile = Task.Source("version.properties")
|
||||
|
||||
def readOpenapiSnapshotVersion: Task[String] = Task {
|
||||
val props = new Properties()
|
||||
Using(new FileInputStream(propsFile().path.toIO)) { fis =>
|
||||
props.load(fis)
|
||||
props.getProperty("openApiGeneratorVersion")
|
||||
}.get
|
||||
}
|
||||
|
||||
override def mvnDeps = Seq(
|
||||
mvn"org.openapitools:openapi-generator-mill-plugin:${readOpenapiSnapshotVersion()}"
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.20.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
299
modules/openapi-generator-mill-plugin/example/mill.bat
Normal file
299
modules/openapi-generator-mill-plugin/example/mill.bat
Normal file
@@ -0,0 +1,299 @@
|
||||
@echo off
|
||||
|
||||
rem This is a wrapper script, that automatically selects or downloads Mill from Maven Central or GitHub release pages.
|
||||
rem
|
||||
rem This script determines the Mill version to use by trying these sources
|
||||
rem - env-variable `MILL_VERSION`
|
||||
rem - local file `.mill-version`
|
||||
rem - local file `.config/mill-version`
|
||||
rem - `mill-version` from YAML fronmatter of current buildfile
|
||||
rem - if accessible, find the latest stable version available on Maven Central (https://repo1.maven.org/maven2)
|
||||
rem - env-variable `DEFAULT_MILL_VERSION`
|
||||
rem
|
||||
rem If a version has the suffix '-native' a native binary will be used.
|
||||
rem If a version has the suffix '-jvm' an executable jar file will be used, requiring an already installed Java runtime.
|
||||
rem If no such suffix is found, the script will pick a default based on version and platform.
|
||||
rem
|
||||
rem Once a version was determined, it tries to use either
|
||||
rem - a system-installed mill, if found and it's version matches
|
||||
rem - an already downloaded version under %USERPROFILE%\.mill\download
|
||||
rem
|
||||
rem If no working mill version was found on the system,
|
||||
rem this script downloads a binary file from Maven Central or Github Pages (this is version dependent)
|
||||
rem into a cache location (%USERPROFILE%\.mill\download).
|
||||
rem
|
||||
rem Mill Project URL: https://github.com/com-lihaoyi/mill
|
||||
rem Script Version: 1.0.0-M1-21-7b6fae-DIRTY892b63e8
|
||||
rem
|
||||
rem If you want to improve this script, please also contribute your changes back!
|
||||
rem This script was generated from: dist/scripts/src/mill.bat
|
||||
rem
|
||||
rem Licensed under the Apache License, Version 2.0
|
||||
|
||||
rem setlocal seems to be unavailable on Windows 95/98/ME
|
||||
rem but I don't think we need to support them in 2019
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
if [!DEFAULT_MILL_VERSION!]==[] ( set "DEFAULT_MILL_VERSION=0.12.10" )
|
||||
|
||||
if [!MILL_GITHUB_RELEASE_CDN!]==[] ( set "MILL_GITHUB_RELEASE_CDN=" )
|
||||
|
||||
if [!MILL_MAIN_CLI!]==[] ( set "MILL_MAIN_CLI=%~f0" )
|
||||
|
||||
set "MILL_REPO_URL=https://github.com/com-lihaoyi/mill"
|
||||
|
||||
SET MILL_BUILD_SCRIPT=
|
||||
|
||||
if exist "build.mill" (
|
||||
set MILL_BUILD_SCRIPT=build.mill
|
||||
) else (
|
||||
if exist "build.mill.scala" (
|
||||
set MILL_BUILD_SCRIPT=build.mill.scala
|
||||
) else (
|
||||
if exist "build.sc" (
|
||||
set MILL_BUILD_SCRIPT=build.sc
|
||||
) else (
|
||||
rem no-op
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if [!MILL_VERSION!]==[] (
|
||||
if exist .mill-version (
|
||||
set /p MILL_VERSION=<.mill-version
|
||||
) else (
|
||||
if exist .config\mill-version (
|
||||
set /p MILL_VERSION=<.config\mill-version
|
||||
) else (
|
||||
if not "%MILL_BUILD_SCRIPT%"=="" (
|
||||
for /f "tokens=1-2*" %%a in ('findstr /C:"//| mill-version:" %MILL_BUILD_SCRIPT%') do (
|
||||
set "MILL_VERSION=%%c"
|
||||
)
|
||||
) else (
|
||||
rem no-op
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
if [!MILL_VERSION!]==[] set MILL_VERSION=%DEFAULT_MILL_VERSION%
|
||||
|
||||
if [!MILL_DOWNLOAD_PATH!]==[] set MILL_DOWNLOAD_PATH=%USERPROFILE%\.mill\download
|
||||
|
||||
rem without bat file extension, cmd doesn't seem to be able to run it
|
||||
|
||||
set "MILL_NATIVE_SUFFIX=-native"
|
||||
set "MILL_JVM_SUFFIX=-jvm"
|
||||
set "FULL_MILL_VERSION=%MILL_VERSION%"
|
||||
set "MILL_EXT=.bat"
|
||||
set "ARTIFACT_SUFFIX="
|
||||
REM Check if MILL_VERSION contains MILL_NATIVE_SUFFIX
|
||||
echo !MILL_VERSION! | findstr /C:"%MILL_NATIVE_SUFFIX%" >nul
|
||||
if !errorlevel! equ 0 (
|
||||
set "MILL_VERSION=%MILL_VERSION:-native=%"
|
||||
REM -native images compiled with graal do not support windows-arm
|
||||
REM https://github.com/oracle/graal/issues/9215
|
||||
IF /I NOT "%PROCESSOR_ARCHITECTURE%"=="ARM64" (
|
||||
set "ARTIFACT_SUFFIX=-native-windows-amd64"
|
||||
set "MILL_EXT=.exe"
|
||||
) else (
|
||||
rem no-op
|
||||
)
|
||||
) else (
|
||||
echo !MILL_VERSION! | findstr /C:"%MILL_JVM_SUFFIX%" >nul
|
||||
if !errorlevel! equ 0 (
|
||||
set "MILL_VERSION=%MILL_VERSION:-jvm=%"
|
||||
) else (
|
||||
set "SKIP_VERSION=false"
|
||||
set "MILL_PREFIX=%MILL_VERSION:~0,4%"
|
||||
if "!MILL_PREFIX!"=="0.1." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.2." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.3." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.4." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.5." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.6." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.7." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.8." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.9." set "SKIP_VERSION=true"
|
||||
set "MILL_PREFIX=%MILL_VERSION:~0,5%"
|
||||
if "!MILL_PREFIX!"=="0.10." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.11." set "SKIP_VERSION=true"
|
||||
if "!MILL_PREFIX!"=="0.12." set "SKIP_VERSION=true"
|
||||
|
||||
if "!SKIP_VERSION!"=="false" (
|
||||
IF /I NOT "%PROCESSOR_ARCHITECTURE%"=="ARM64" (
|
||||
set "ARTIFACT_SUFFIX=-native-windows-amd64"
|
||||
set "MILL_EXT=.exe"
|
||||
)
|
||||
) else (
|
||||
rem no-op
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
set MILL=%MILL_DOWNLOAD_PATH%\!FULL_MILL_VERSION!!MILL_EXT!
|
||||
|
||||
set MILL_RESOLVE_DOWNLOAD=
|
||||
|
||||
if not exist "%MILL%" (
|
||||
set MILL_RESOLVE_DOWNLOAD=true
|
||||
) else (
|
||||
if defined MILL_TEST_DRY_RUN_LAUNCHER_SCRIPT (
|
||||
set MILL_RESOLVE_DOWNLOAD=true
|
||||
) else (
|
||||
rem no-op
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
if [!MILL_RESOLVE_DOWNLOAD!]==[true] (
|
||||
set MILL_VERSION_PREFIX=%MILL_VERSION:~0,4%
|
||||
set MILL_SHORT_VERSION_PREFIX=%MILL_VERSION:~0,2%
|
||||
rem Since 0.5.0
|
||||
set MILL_DOWNLOAD_SUFFIX=-assembly
|
||||
rem Since 0.11.0
|
||||
set MILL_DOWNLOAD_FROM_MAVEN=1
|
||||
if [!MILL_VERSION_PREFIX!]==[0.0.] (
|
||||
set MILL_DOWNLOAD_SUFFIX=
|
||||
set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
)
|
||||
if [!MILL_VERSION_PREFIX!]==[0.1.] (
|
||||
set MILL_DOWNLOAD_SUFFIX=
|
||||
set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
)
|
||||
if [!MILL_VERSION_PREFIX!]==[0.2.] (
|
||||
set MILL_DOWNLOAD_SUFFIX=
|
||||
set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
)
|
||||
if [!MILL_VERSION_PREFIX!]==[0.3.] (
|
||||
set MILL_DOWNLOAD_SUFFIX=
|
||||
set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
)
|
||||
if [!MILL_VERSION_PREFIX!]==[0.4.] (
|
||||
set MILL_DOWNLOAD_SUFFIX=
|
||||
set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
)
|
||||
if [!MILL_VERSION_PREFIX!]==[0.5.] set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
if [!MILL_VERSION_PREFIX!]==[0.6.] set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
if [!MILL_VERSION_PREFIX!]==[0.7.] set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
if [!MILL_VERSION_PREFIX!]==[0.8.] set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
if [!MILL_VERSION_PREFIX!]==[0.9.] set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
|
||||
set MILL_VERSION_PREFIX=%MILL_VERSION:~0,5%
|
||||
if [!MILL_VERSION_PREFIX!]==[0.10.] set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
|
||||
set MILL_VERSION_PREFIX=%MILL_VERSION:~0,8%
|
||||
if [!MILL_VERSION_PREFIX!]==[0.11.0-M] set MILL_DOWNLOAD_FROM_MAVEN=0
|
||||
|
||||
set MILL_VERSION_PREFIX=%MILL_VERSION:~0,5%
|
||||
set DOWNLOAD_EXT=exe
|
||||
if [!MILL_SHORT_VERSION_PREFIX!]==[0.] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION_PREFIX!]==[0.12.] set DOWNLOAD_EXT=exe
|
||||
if [!MILL_VERSION!]==[0.12.0] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.1] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.2] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.3] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.4] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.5] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.6] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.7] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.8] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.9] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.10] set DOWNLOAD_EXT=jar
|
||||
if [!MILL_VERSION!]==[0.12.11] set DOWNLOAD_EXT=jar
|
||||
|
||||
set MILL_VERSION_PREFIX=
|
||||
set MILL_SHORT_VERSION_PREFIX=
|
||||
|
||||
for /F "delims=- tokens=1" %%A in ("!MILL_VERSION!") do set MILL_VERSION_BASE=%%A
|
||||
set MILL_VERSION_MILESTONE=
|
||||
for /F "delims=- tokens=2" %%A in ("!MILL_VERSION!") do set MILL_VERSION_MILESTONE=%%A
|
||||
set MILL_VERSION_MILESTONE_START=!MILL_VERSION_MILESTONE:~0,1!
|
||||
if [!MILL_VERSION_MILESTONE_START!]==[M] (
|
||||
set MILL_VERSION_TAG=!MILL_VERSION_BASE!-!MILL_VERSION_MILESTONE!
|
||||
) else (
|
||||
set MILL_VERSION_TAG=!MILL_VERSION_BASE!
|
||||
)
|
||||
if [!MILL_DOWNLOAD_FROM_MAVEN!]==[1] (
|
||||
set MILL_DOWNLOAD_URL=https://repo1.maven.org/maven2/com/lihaoyi/mill-dist!ARTIFACT_SUFFIX!/!MILL_VERSION!/mill-dist!ARTIFACT_SUFFIX!-!MILL_VERSION!.!DOWNLOAD_EXT!
|
||||
) else (
|
||||
set MILL_DOWNLOAD_URL=!MILL_GITHUB_RELEASE_CDN!%MILL_REPO_URL%/releases/download/!MILL_VERSION_TAG!/!MILL_VERSION!!MILL_DOWNLOAD_SUFFIX!
|
||||
)
|
||||
|
||||
if defined MILL_TEST_DRY_RUN_LAUNCHER_SCRIPT (
|
||||
echo !MILL_DOWNLOAD_URL!
|
||||
echo !MILL!
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
rem there seems to be no way to generate a unique temporary file path (on native Windows)
|
||||
set MILL_DOWNLOAD_FILE=%MILL%.tmp
|
||||
|
||||
echo Downloading mill !MILL_VERSION! from !MILL_DOWNLOAD_URL! ... 1>&2
|
||||
|
||||
if not exist "%MILL_DOWNLOAD_PATH%" mkdir "%MILL_DOWNLOAD_PATH%"
|
||||
rem curl is bundled with recent Windows 10
|
||||
rem but I don't think we can expect all the users to have it in 2019
|
||||
where /Q curl
|
||||
if !ERRORLEVEL! EQU 0 (
|
||||
curl -f -L "!MILL_DOWNLOAD_URL!" -o "!MILL_DOWNLOAD_FILE!"
|
||||
) else (
|
||||
rem bitsadmin seems to be available on Windows 7
|
||||
rem without /dynamic, github returns 403
|
||||
rem bitsadmin is sometimes needlessly slow but it looks better with /priority foreground
|
||||
bitsadmin /transfer millDownloadJob /dynamic /priority foreground "!MILL_DOWNLOAD_URL!" "!MILL_DOWNLOAD_FILE!"
|
||||
)
|
||||
if not exist "!MILL_DOWNLOAD_FILE!" (
|
||||
echo Could not download mill !MILL_VERSION! 1>&2
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
move /y "!MILL_DOWNLOAD_FILE!" "%MILL%"
|
||||
|
||||
set MILL_DOWNLOAD_FILE=
|
||||
set MILL_DOWNLOAD_SUFFIX=
|
||||
)
|
||||
|
||||
set MILL_DOWNLOAD_PATH=
|
||||
set MILL_VERSION=
|
||||
set MILL_REPO_URL=
|
||||
|
||||
rem Need to preserve the first position of those listed options
|
||||
set MILL_FIRST_ARG=
|
||||
if [%~1%]==[--bsp] (
|
||||
set MILL_FIRST_ARG=%1%
|
||||
) else (
|
||||
if [%~1%]==[-i] (
|
||||
set MILL_FIRST_ARG=%1%
|
||||
) else (
|
||||
if [%~1%]==[--interactive] (
|
||||
set MILL_FIRST_ARG=%1%
|
||||
) else (
|
||||
if [%~1%]==[--no-server] (
|
||||
set MILL_FIRST_ARG=%1%
|
||||
) else (
|
||||
if [%~1%]==[--no-daemon] (
|
||||
set MILL_FIRST_ARG=%1%
|
||||
) else (
|
||||
if [%~1%]==[--repl] (
|
||||
set MILL_FIRST_ARG=%1%
|
||||
) else (
|
||||
if [%~1%]==[--help] (
|
||||
set MILL_FIRST_ARG=%1%
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
set "MILL_PARAMS=%*%"
|
||||
|
||||
if not [!MILL_FIRST_ARG!]==[] (
|
||||
for /f "tokens=1*" %%a in ("%*") do (
|
||||
set "MILL_PARAMS=%%b"
|
||||
)
|
||||
)
|
||||
|
||||
rem -D mill.main.cli is for compatibility with Mill 0.10.9 - 0.13.0-M2
|
||||
"%MILL%" %MILL_FIRST_ARG% -D "mill.main.cli=%MILL_MAIN_CLI%" %MILL_PARAMS%
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.acme.foo.boundary.web;
|
||||
|
||||
import com.acme.foo.boundary.web.api.PetApi;
|
||||
import com.acme.foo.boundary.web.model.ModelApiResponse;
|
||||
import com.acme.foo.boundary.web.model.Pet;
|
||||
import jakarta.enterprise.context.RequestScoped;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
@RequestScoped
|
||||
public class TestController implements PetApi {
|
||||
@Override
|
||||
public Pet addPet(Pet pet) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePet(Long petId, String apiKey) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pet> findPetsByStatus(List<String> status) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pet> findPetsByTags(List<String> tags) {
|
||||
return List.of();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pet getPetById(Long petId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pet updatePet(Pet pet) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePetWithForm(Long petId, String name, String status) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, InputStream _fileInputStream) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user