mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-01-25 18:50:50 +00:00
Compare commits
4 Commits
master
...
r-workflow
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
165549d099 | ||
|
|
2a31b78b1f | ||
|
|
7e620032a1 | ||
|
|
d3377590ee |
@@ -13,7 +13,7 @@
|
||||
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
|
||||
"ghcr.io/devcontainers/features/docker-in-docker:2": {
|
||||
"version": "latest",
|
||||
"moby": false
|
||||
"moby": true
|
||||
}
|
||||
},
|
||||
// Configure tool-specific properties.
|
||||
|
||||
69
.github/workflows/mill-plugin-tests.yaml
vendored
69
.github/workflows/mill-plugin-tests.yaml
vendored
@@ -1,69 +0,0 @@
|
||||
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)
|
||||
|
||||
18
README.md
18
README.md
@@ -15,7 +15,7 @@
|
||||
|
||||
<div align="center">
|
||||
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.20.0`):
|
||||
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.19.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.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) |
|
||||
| 7.19.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 22.01.2026 | Minor release with breaking changes (with fallback) |
|
||||
| [7.18.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.18.0) (latest stable release) | 22.12.2025 | 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.19.0/openapi-generator-cli-7.19.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.18.0/openapi-generator-cli-7.18.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
```sh
|
||||
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
|
||||
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.18.0/openapi-generator-cli-7.18.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.19.0/openapi-generator-cli-7.19.0.jar
|
||||
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.18.0/openapi-generator-cli-7.18.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.19.0
|
||||
openapi-generator-cli version-manager set 7.18.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.19.0
|
||||
pip install openapi-generator-cli==7.18.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.19.0/openapi-generator-cli-7.19.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.18.0/openapi-generator-cli-7.18.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`
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
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,4 +7,3 @@ additionalProperties:
|
||||
artifactId: petstore-native-useGzipFeature
|
||||
hideGenerationTimestamp: "true"
|
||||
useJakartaEe: "true"
|
||||
useGzipFeature: "true"
|
||||
|
||||
@@ -7,6 +7,6 @@ generateAliasAsModel: true
|
||||
additionalProperties:
|
||||
projectName: PetstoreClient
|
||||
useSPMFileStructure: true
|
||||
useClasses: false
|
||||
useClasses: true
|
||||
useBacktickEscapes: true
|
||||
mapFileBinaryToData: true
|
||||
|
||||
@@ -47,26 +47,26 @@ For example:
|
||||
|
||||
echo "$header"
|
||||
|
||||
tmpfile=$(mktemp)
|
||||
trap "rm -f $tmpfile" EXIT
|
||||
|
||||
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]}
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2068
|
||||
java ${JAVA_OPTS} -jar "$executable" generate -c ${files[0]} ${args[@]}
|
||||
else
|
||||
if [ ${#files[@]} -eq 0 ]; then
|
||||
files=("${root}"/bin/configs/*.yaml)
|
||||
fi
|
||||
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
|
||||
|
||||
# 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]}
|
||||
# shellcheck disable=SC2086
|
||||
# shellcheck disable=SC2068
|
||||
if java ${JAVA_OPTS} -jar "$executable" batch ${BATCH_OPTS} --includes-base-dir "${root}" --fail-fast -- ${files[@]} 2>&1 | tee /dev/pts/0 | grep -q -i "exception"; then
|
||||
echo "Found exception(s) when running the generator(s) to update the samples."
|
||||
export GENERATE_ERROR=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $retcode -ne 0 ]] || grep -q -i "at org.openapitools" "$tmpfile"; then
|
||||
if [[ -n "$GENERATE_ERROR" ]]; then
|
||||
echo "Found exception(s) when running the generator(s) to update the samples."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -93,7 +93,6 @@ 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[@]}
|
||||
|
||||
@@ -27,6 +27,15 @@ 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:
|
||||
|
||||
@@ -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 (deprecated)](generators/swift5.md)
|
||||
* [swift5](generators/swift5.md)
|
||||
* [swift6](generators/swift6.md)
|
||||
* [typescript (experimental)](generators/typescript.md)
|
||||
* [typescript-angular](generators/typescript-angular.md)
|
||||
|
||||
@@ -34,7 +34,6 @@ 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,7 +49,6 @@ 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,7 +38,6 @@ 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,7 +33,6 @@ 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,7 +32,6 @@ 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,7 +36,6 @@ 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,7 +45,6 @@ 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,7 +40,6 @@ 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,7 +41,6 @@ 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,7 +36,6 @@ 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,7 +37,6 @@ 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,7 +39,6 @@ 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,7 +36,6 @@ 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,7 +36,6 @@ 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,7 +36,6 @@ 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,7 +36,6 @@ 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,7 +41,6 @@ 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,7 +36,6 @@ 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,7 +37,6 @@ 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,7 +38,6 @@ 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,7 +38,6 @@ 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,7 +36,6 @@ 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,7 +36,6 @@ 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,7 +36,6 @@ 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,7 +36,6 @@ 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,7 +42,6 @@ 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 | DEPRECATED | |
|
||||
| generator stability | STABLE | |
|
||||
| generator type | CLIENT | |
|
||||
| generator language | Swift | |
|
||||
| generator default templating engine | mustache | |
|
||||
|
||||
@@ -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.19.0
|
||||
openapi-generator-cli version-manager set 7.17.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.19.0/openapi-generator-cli-7.19.0.jar`
|
||||
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.17.0/openapi-generator-cli-7.17.0.jar`
|
||||
|
||||
For **Mac/Linux** users:
|
||||
|
||||
```bash
|
||||
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
|
||||
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
|
||||
```
|
||||
|
||||
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.19.0/openapi-generator-cli-7.19.0.jar
|
||||
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
|
||||
```
|
||||
<!-- /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.19.0</version>
|
||||
<version>7.17.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -130,7 +130,7 @@ This Mill library provides a Mill module that can be used to generate code from
|
||||
```scala
|
||||
//| mill-version: 1.0.6
|
||||
//| mvnDeps:
|
||||
//| - org.openapitools:openapi-generator-mill-plugin:7.20.0 # 1.
|
||||
//| - org.openapitools:openapi-generator-mill-plugin:7.19.0 # 1.
|
||||
|
||||
import mill.*
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<version>7.19.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.20.0-SNAPSHOT</version>
|
||||
<version>7.19.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.19.0"
|
||||
id "org.openapi.generator" version "7.17.0"
|
||||
}
|
||||
----
|
||||
|
||||
@@ -113,7 +113,7 @@ buildscript {
|
||||
// url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.19.0"
|
||||
classpath "org.openapitools:openapi-generator-gradle-plugin:7.17.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ buildscript {
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.2.1'
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.19.0') {
|
||||
classpath('org.openapitools:openapi-generator-gradle-plugin:7.17.0') {
|
||||
exclude group: 'com.google.guava'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.20.0-SNAPSHOT
|
||||
openApiGeneratorVersion=7.19.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
|
||||
# BEGIN placeholders
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<version>7.19.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.20.0-SNAPSHOT
|
||||
openApiGeneratorVersion=7.19.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.19.0</version>
|
||||
<version>7.17.0</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-maven-plugin</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<version>7.19.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.20.0-SNAPSHOT</version>
|
||||
<version>7.19.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.20.0-SNAPSHOT</version>
|
||||
<version>7.19.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.20.0-SNAPSHOT</version>
|
||||
<version>7.19.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.20.0-SNAPSHOT</version>
|
||||
<version>7.19.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.20.0-SNAPSHOT</version>
|
||||
<version>7.19.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<executions>
|
||||
<execution>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<version>7.19.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
|
||||
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()}"
|
||||
)
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# RELEASE_VERSION
|
||||
openApiGeneratorVersion=7.20.0-SNAPSHOT
|
||||
# /RELEASE_VERSION
|
||||
@@ -0,0 +1,9 @@
|
||||
To test the Mill plugin, this project can be used.
|
||||
|
||||
> ![NOTE]
|
||||
> The `mill-build` folder is only needed to look up the plugin from the local Maven repository for development purposes.
|
||||
|
||||
It requires that the current SNAPSHOT version of the plugin is installed in the local Maven repository.
|
||||
Replace the version in `build.mill` or set the environment variable `$MILL_OPENAPITOOLS_PLUGIN_VERSION` to the desired version.
|
||||
|
||||
Run `./mill __.compile` to test if the plugin works or some of the modules tasks like `./mill openapi.validate`.
|
||||
@@ -1,8 +1,7 @@
|
||||
//| 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
|
||||
//| mvnDeps:
|
||||
//| - com.lihaoyi::mill-contrib-versionfile:$MILL_VERSION
|
||||
//| - org.openapitools:openapi-generator-mill-plugin:$MILL_OPENAPITOOLS_PLUGIN_VERSION
|
||||
//|
|
||||
package build
|
||||
|
||||
@@ -13,12 +12,15 @@ import mill.scalalib.publish.PomSettings
|
||||
import mill.util.BuildInfo.{millBinPlatform, millVersion}
|
||||
import javalib.*
|
||||
|
||||
import mill.contrib.versionfile.VersionFileModule
|
||||
import org.openapitools.generator.mill.OpenApiModule
|
||||
|
||||
object `package` extends JavaModule with MavenModule with OpenApiModule {
|
||||
|
||||
// dependency on openapi-generator is set in Mills meta-build
|
||||
// this is needed to point to a local maven repo
|
||||
override def mvnDeps = Seq(
|
||||
mvn"jakarta.platform:jakarta.jakartaee-api:10.0.0",
|
||||
mvn"jakarta.platform:jakarta.jakartaee-api:11.0.0",
|
||||
mvn"com.fasterxml.jackson.core:jackson-databind:2.20.0",
|
||||
mvn"org.openapitools:jackson-databind-nullable:0.2.8"
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
import coursier.LocalRepositories.Dangerous
|
||||
import coursier.Repositories
|
||||
import mill.api.Task
|
||||
import mill.meta.MillBuildRootModule
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
1
modules/openapi-generator-mill-plugin/mill-test/version
Normal file
1
modules/openapi-generator-mill-plugin/mill-test/version
Normal file
@@ -0,0 +1 @@
|
||||
7.16.0-SNAPSHOT
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<version>7.19.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
@@ -139,28 +139,6 @@
|
||||
<goal>testCompile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<!-- see https://github.com/davidB/scala-maven-plugin/issues/604 why a workaround is needed -->
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>doc-jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<scaladocClassName>dotty.tools.scaladoc.Main</scaladocClassName>
|
||||
<sourceDir>${project.build.outputDirectory}</sourceDir>
|
||||
<args>-nobootcp</args>
|
||||
<includes>
|
||||
<include>**/*.tasty</include>
|
||||
</includes>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.scala-lang</groupId>
|
||||
<artifactId>scaladoc_3</artifactId>
|
||||
<version>3.7.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<version>7.19.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator-project</artifactId>
|
||||
<!-- RELEASE_VERSION -->
|
||||
<version>7.20.0-SNAPSHOT</version>
|
||||
<version>7.19.0-SNAPSHOT</version>
|
||||
<!-- /RELEASE_VERSION -->
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -1854,7 +1854,7 @@ public class OpenAPINormalizer {
|
||||
schema.addAnyOfItem(new BooleanSchema());
|
||||
break;
|
||||
default:
|
||||
LOGGER.error("Type {} not yet supported in openapi-normalizer to process OpenAPI 3.1 spec with multiple types.", String.valueOf(type));
|
||||
LOGGER.error("Type {} not yet supported in openapi-normalizer to process OpenAPI 3.1 spec with multiple types.");
|
||||
LOGGER.error("Please report the issue via https://github.com/OpenAPITools/openapi-generator/issues/new/.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
@@ -50,6 +51,7 @@ import org.openapitools.codegen.model.ModelMap;
|
||||
import org.openapitools.codegen.model.ModelsMap;
|
||||
import org.openapitools.codegen.model.OperationMap;
|
||||
import org.openapitools.codegen.model.OperationsMap;
|
||||
import org.openapitools.codegen.templating.mustache.ReplaceAllLambda;
|
||||
import org.openapitools.codegen.utils.CamelizeOption;
|
||||
import org.openapitools.codegen.utils.ModelUtils;
|
||||
import org.slf4j.Logger;
|
||||
@@ -101,7 +103,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
public static final String JAVAX_PACKAGE = "javaxPackage";
|
||||
public static final String USE_JAKARTA_EE = "useJakartaEe";
|
||||
public static final String CONTAINER_DEFAULT_TO_NULL = "containerDefaultToNull";
|
||||
public static final String DISABLE_DISCRIMINATOR_JSON_IGNORE_PROPERTIES = "disableDiscriminatorJsonIgnoreProperties";
|
||||
|
||||
public static final String CAMEL_CASE_DOLLAR_SIGN = "camelCaseDollarSign";
|
||||
public static final String USE_ONE_OF_INTERFACES = "useOneOfInterfaces";
|
||||
@@ -198,8 +199,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
protected boolean jackson = false;
|
||||
@Getter @Setter
|
||||
protected boolean generateBuilders;
|
||||
@Getter @Setter
|
||||
protected boolean disableDiscriminatorJsonIgnoreProperties = false;
|
||||
/**
|
||||
* useBeanValidation has been moved from child generators to AbstractJavaCodegen.
|
||||
* The reason is that getBeanValidation needs it
|
||||
@@ -347,7 +346,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
cliOptions.add(CliOption.newBoolean(CONTAINER_DEFAULT_TO_NULL, "Set containers (array, set, map) default to null"));
|
||||
cliOptions.add(CliOption.newBoolean(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, "whether to generate a constructor for all arguments").defaultValue(Boolean.FALSE.toString()));
|
||||
cliOptions.add(CliOption.newBoolean(GENERATE_BUILDERS, "Whether to generate builders for models").defaultValue(Boolean.FALSE.toString()));
|
||||
cliOptions.add(CliOption.newBoolean(DISABLE_DISCRIMINATOR_JSON_IGNORE_PROPERTIES, "Ignore discriminator field type for Jackson serialization", disableDiscriminatorJsonIgnoreProperties));
|
||||
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_GROUP_ID, CodegenConstants.PARENT_GROUP_ID_DESC));
|
||||
cliOptions.add(CliOption.newString(CodegenConstants.PARENT_ARTIFACT_ID, CodegenConstants.PARENT_ARTIFACT_ID_DESC));
|
||||
@@ -427,7 +425,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
|
||||
convertPropertyToBooleanAndWriteBack(GENERATE_CONSTRUCTOR_WITH_ALL_ARGS, this::setGenerateConstructorWithAllArgs);
|
||||
convertPropertyToBooleanAndWriteBack(GENERATE_BUILDERS, this::setGenerateBuilders);
|
||||
convertPropertyToBooleanAndWriteBack(DISABLE_DISCRIMINATOR_JSON_IGNORE_PROPERTIES, this::setDisableDiscriminatorJsonIgnoreProperties);
|
||||
if (StringUtils.isEmpty(System.getenv("JAVA_POST_PROCESS_FILE"))) {
|
||||
LOGGER.info("Environment variable JAVA_POST_PROCESS_FILE not defined so the Java code may not be properly formatted. To define it, try 'export JAVA_POST_PROCESS_FILE=\"/usr/local/bin/clang-format -i\"' (Linux/Mac)");
|
||||
LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).");
|
||||
|
||||
@@ -152,7 +152,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
@Setter protected boolean supportVertxFuture = false;
|
||||
@Setter protected boolean useSealedOneOfInterfaces = false;
|
||||
@Setter protected boolean useUnaryInterceptor = false;
|
||||
|
||||
protected String authFolder;
|
||||
/**
|
||||
* Serialization library.
|
||||
|
||||
@@ -442,19 +442,7 @@ public class ProtobufSchemaCodegen extends DefaultCodegen implements CodegenConf
|
||||
List<Schema> oneOfs = schema.getOneOf();
|
||||
List<Schema> newOneOfs = new ArrayList<>();
|
||||
for (Schema oneOf : oneOfs) {
|
||||
Schema oneOfSchema = oneOf;
|
||||
if (ModelUtils.isAllOf(oneOf) && oneOf.getAllOf() != null && oneOf.getAllOf().size() == 1) {
|
||||
Object allOfObj = oneOf.getAllOf().get(0);
|
||||
if (allOfObj instanceof Schema) {
|
||||
Schema allOfItem = (Schema) allOfObj;
|
||||
if (StringUtils.isNotEmpty(allOfItem.get$ref())) {
|
||||
oneOfSchema = ModelUtils.getReferencedSchema(openAPI, allOfItem);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
oneOfSchema = ModelUtils.getReferencedSchema(openAPI, oneOf);
|
||||
}
|
||||
|
||||
Schema oneOfSchema = ModelUtils.getReferencedSchema(openAPI, oneOf);
|
||||
if (ModelUtils.isArraySchema(oneOfSchema)) {
|
||||
Schema innerSchema = generateNestedSchema(oneOfSchema, visitedSchemas);
|
||||
innerSchema.setTitle(oneOf.getTitle());
|
||||
|
||||
@@ -134,7 +134,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
this.useOneOfInterfaces = true;
|
||||
|
||||
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
|
||||
.stability(Stability.DEPRECATED)
|
||||
.stability(Stability.STABLE)
|
||||
.build();
|
||||
|
||||
outputFolder = "generated-code" + File.separator + "swift";
|
||||
@@ -430,8 +430,6 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
public void processOpts() {
|
||||
super.processOpts();
|
||||
|
||||
LOGGER.warn("IMPORTANT: This generator has been deprecated. Please use `swift6` instead");
|
||||
|
||||
if (StringUtils.isEmpty(System.getenv("SWIFT_POST_PROCESS_FILE"))) {
|
||||
LOGGER.info("Environment variable SWIFT_POST_PROCESS_FILE not defined so the Swift code may not be properly formatted. To define it, try 'export SWIFT_POST_PROCESS_FILE=/usr/local/bin/swiftformat' (Linux/Mac)");
|
||||
LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).");
|
||||
|
||||
@@ -491,9 +491,6 @@ public class Swift6ClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
additionalProperties.put(RESPONSE_AS, responseAs);
|
||||
if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_PROMISE_KIT)) {
|
||||
additionalProperties.put("usePromiseKit", true);
|
||||
LOGGER.warn("NOTICE: We are considering deprecating PromiseKit support in the Swift 6 generator. " +
|
||||
"If you are still using it, please share your use case here: " +
|
||||
"https://github.com/OpenAPITools/openapi-generator/issues/22791");
|
||||
}
|
||||
if (ArrayUtils.contains(responseAs, RESPONSE_LIBRARY_RX_SWIFT)) {
|
||||
additionalProperties.put("useRxSwift", true);
|
||||
|
||||
@@ -235,7 +235,7 @@ public class URLPathUtils {
|
||||
public static boolean isRelativeUrl(List<Server> servers) {
|
||||
if (servers != null && servers.size() > 0) {
|
||||
final Server firstServer = servers.get(0);
|
||||
return Pattern.matches("^(\\/[\\w\\d.~@-]+)+", firstServer.getUrl());
|
||||
return Pattern.matches("^(\\/[\\w\\d]+)+", firstServer.getUrl());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ public class ApiClient {
|
||||
if (encoding.isPresent()) {
|
||||
for (String token : encoding.get().split(",")) {
|
||||
if ("gzip".equalsIgnoreCase(token.trim())) {
|
||||
return new GZIPInputStream(body, 8192);
|
||||
return new GZIPInputStream(body);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -531,9 +531,9 @@ public class ApiClient {
|
||||
}
|
||||
|
||||
private boolean fillBuffer() throws IOException {
|
||||
ensureInitialized();
|
||||
while (chunkPosition >= currentChunk.length) {
|
||||
buffer.reset();
|
||||
ensureInitialized();
|
||||
if (finished) {
|
||||
return false;
|
||||
}
|
||||
@@ -570,9 +570,6 @@ public class ApiClient {
|
||||
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
if (len == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (!fillBuffer()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{{#jackson}}
|
||||
|
||||
{{^disableDiscriminatorJsonIgnoreProperties}}
|
||||
@JsonIgnoreProperties(
|
||||
value = "{{{discriminator.propertyBaseName}}}", // ignore manually set {{{discriminator.propertyBaseName}}}, it will be automatically generated by Jackson during serialization
|
||||
allowSetters = true // allows the {{{discriminator.propertyBaseName}}} to be set during deserialization
|
||||
){{/disableDiscriminatorJsonIgnoreProperties}}
|
||||
)
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true)
|
||||
{{#discriminator.mappedModels}}
|
||||
{{#-first}}
|
||||
|
||||
@@ -220,7 +220,7 @@ for this project used jakarta.validation-api -->
|
||||
<swagger-core-version>1.5.22</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.25</logback-version>
|
||||
<logback-version>1.5.19</logback-version>
|
||||
{{#useBeanValidation}}
|
||||
<beanvalidation-version>2.0.2</beanvalidation-version>
|
||||
{{/useBeanValidation}}
|
||||
|
||||
@@ -342,7 +342,7 @@ for this project used jakarta.validation-api -->
|
||||
{{/generateSpringApplication}}
|
||||
{{^generateSpringBootApplication}}
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.25</logback-version>
|
||||
<logback-version>1.5.19</logback-version>
|
||||
{{/generateSpringBootApplication}}
|
||||
<cxf-version>3.5.9</cxf-version>
|
||||
<jackson-jaxrs-version>2.17.1</jackson-jaxrs-version>
|
||||
|
||||
@@ -255,7 +255,7 @@ for this project used jakarta.validation-api -->
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.25</logback-version>
|
||||
<logback-version>1.5.19</logback-version>
|
||||
{{#useBeanValidation}}
|
||||
<beanvalidation-version>2.0.2</beanvalidation-version>
|
||||
{{/useBeanValidation}}
|
||||
|
||||
@@ -311,7 +311,7 @@ for this project used jakarta.validation-api -->
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.25</logback-version>
|
||||
<logback-version>1.5.19</logback-version>
|
||||
{{#useBeanValidation}}
|
||||
<beanvalidation-version>2.0.2</beanvalidation-version>
|
||||
{{/useBeanValidation}}
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
<jersey3-version>3.1.3</jersey3-version>
|
||||
<jackson-version>2.17.1</jackson-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.25</logback-version>
|
||||
<logback-version>1.5.19</logback-version>
|
||||
<servlet-api-version>5.0.0</servlet-api-version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
@@ -222,7 +222,7 @@ for this project used jakarta.validation-api -->
|
||||
<jersey2-version>2.35</jersey2-version>
|
||||
<jackson-version>2.17.1</jackson-version>
|
||||
<junit-version>4.13.2</junit-version>
|
||||
<logback-version>1.5.25</logback-version>
|
||||
<logback-version>1.5.19</logback-version>
|
||||
<servlet-api-version>4.0.4</servlet-api-version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
@@ -133,13 +133,6 @@ If your endpoint has multiple server objects in the servers array, you can set t
|
||||
void setServerIndex(const QString &operation, int serverIndex);
|
||||
```
|
||||
Parameter "operation" should be your operationid. "serverIndex" is the index you want to set as your default server. The function will check if there is a server with your index.
|
||||
|
||||
Alternatively, to set the server index globally for all operations:
|
||||
```c++
|
||||
void setServerIndex(int serverIndex);
|
||||
```
|
||||
This will apply the specified server index to all operations in the API.
|
||||
|
||||
Here is an example of multiple servers in the servers array. The first server will have index 0 and the second will have index 1.
|
||||
```yaml
|
||||
servers:
|
||||
|
||||
@@ -57,9 +57,9 @@ void {{classname}}::initializeServerConfigs() {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns 0 on success and -1, -2 or -3 on failure.
|
||||
* -1 when the variable does not exist and -2 if the value is not defined in the enum and -3 if the operation or server index is not found
|
||||
*/
|
||||
* returns 0 on success and -1, -2 or -3 on failure.
|
||||
* -1 when the variable does not exist and -2 if the value is not defined in the enum and -3 if the operation or server index is not found
|
||||
*/
|
||||
int {{classname}}::setDefaultServerValue(int serverIndex, const QString &operation, const QString &variable, const QString &value) {
|
||||
auto it = _serverConfigs.find(operation);
|
||||
if (it != _serverConfigs.end() && serverIndex < it.value().size()) {
|
||||
@@ -67,24 +67,12 @@ int {{classname}}::setDefaultServerValue(int serverIndex, const QString &operati
|
||||
}
|
||||
return -3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the server index.
|
||||
* @param operation The id to the target operation.
|
||||
* @param serverIndex The server index.
|
||||
*/
|
||||
void {{classname}}::setServerIndex(const QString &operation, int serverIndex) {
|
||||
if (_serverIndices.contains(operation) && serverIndex < _serverConfigs.find(operation).value().size()) {
|
||||
_serverIndices[operation] = serverIndex;
|
||||
}
|
||||
}
|
||||
|
||||
void {{classname}}::setServerIndex(int serverIndex) {
|
||||
for (auto keyIt = _serverIndices.keyBegin(); keyIt != _serverIndices.keyEnd(); keyIt++) {
|
||||
setServerIndex(*keyIt, serverIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void {{classname}}::setApiKey(const QString &apiKeyName, const QString &apiKey) {
|
||||
_apiKeys.insert(apiKeyName, apiKey);
|
||||
}
|
||||
@@ -115,13 +103,13 @@ void {{classname}}::setNetworkAccessManager(QNetworkAccessManager* manager) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a new ServerConfiguration to the config map for a specific operation.
|
||||
* @param operation The id to the target operation.
|
||||
* @param url A string that contains the URL of the server
|
||||
* @param description A String that describes the server
|
||||
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
|
||||
* returns the index of the new server config on success and -1 if the operation is not found
|
||||
*/
|
||||
* Appends a new ServerConfiguration to the config map for a specific operation.
|
||||
* @param operation The id to the target operation.
|
||||
* @param url A string that contains the URL of the server
|
||||
* @param description A String that describes the server
|
||||
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
|
||||
* returns the index of the new server config on success and -1 if the operation is not found
|
||||
*/
|
||||
int {{classname}}::addServerConfiguration(const QString &operation, const QUrl &url, const QString &description, const QMap<QString, {{prefix}}ServerVariable> &variables) {
|
||||
if (_serverConfigs.contains(operation)) {
|
||||
_serverConfigs[operation].append({{prefix}}ServerConfiguration(
|
||||
@@ -135,11 +123,11 @@ int {{classname}}::addServerConfiguration(const QString &operation, const QUrl &
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a new ServerConfiguration to the config map for a all operations and sets the index to that server.
|
||||
* @param url A string that contains the URL of the server
|
||||
* @param description A String that describes the server
|
||||
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
|
||||
*/
|
||||
* Appends a new ServerConfiguration to the config map for a all operations and sets the index to that server.
|
||||
* @param url A string that contains the URL of the server
|
||||
* @param description A String that describes the server
|
||||
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
|
||||
*/
|
||||
void {{classname}}::setNewServerForAllOperations(const QUrl &url, const QString &description, const QMap<QString, {{prefix}}ServerVariable> &variables) {
|
||||
for (auto keyIt = _serverIndices.keyBegin(); keyIt != _serverIndices.keyEnd(); keyIt++) {
|
||||
setServerIndex(*keyIt, addServerConfiguration(*keyIt, url, description, variables));
|
||||
@@ -147,11 +135,11 @@ void {{classname}}::setNewServerForAllOperations(const QUrl &url, const QString
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a new ServerConfiguration to the config map for an operations and sets the index to that server.
|
||||
* @param URL A string that contains the URL of the server
|
||||
* @param description A String that describes the server
|
||||
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
|
||||
*/
|
||||
* Appends a new ServerConfiguration to the config map for an operations and sets the index to that server.
|
||||
* @param URL A string that contains the URL of the server
|
||||
* @param description A String that describes the server
|
||||
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
|
||||
*/
|
||||
void {{classname}}::setNewServer(const QString &operation, const QUrl &url, const QString &description, const QMap<QString, {{prefix}}ServerVariable> &variables) {
|
||||
setServerIndex(operation, addServerConfiguration(operation, url, description, variables));
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ public:
|
||||
void initializeServerConfigs();
|
||||
int setDefaultServerValue(int serverIndex,const QString &operation, const QString &variable,const QString &val);
|
||||
void setServerIndex(const QString &operation, int serverIndex);
|
||||
void setServerIndex(int serverIndex);
|
||||
void setApiKey(const QString &apiKeyName, const QString &apiKey);
|
||||
void setBearerToken(const QString &token);
|
||||
void setUsername(const QString &username);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{{>partial_header}}
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using {{packageName}}.{{apiPackage}};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{partial_header}}
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -54,4 +53,4 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
parseQueryString[ClientUtils.ApiKeyHeaderToString(Header)] = Uri.EscapeDataString(_raw).ToString(){{nrt!}};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
|
||||
namespace {{packageName}}.{{clientPackage}}
|
||||
|
||||
@@ -49,11 +49,6 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// </summary>
|
||||
System.Net.Http.Headers.HttpResponseHeaders Headers { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The headers contained in the api response related to the content
|
||||
/// </summary>
|
||||
System.Net.Http.Headers.HttpContentHeaders ContentHeaders { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The path used when making the request.
|
||||
/// </summary>
|
||||
@@ -111,11 +106,6 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// </summary>
|
||||
public System.Net.Http.Headers.HttpResponseHeaders Headers { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The headers contained in the api response related to the content
|
||||
/// </summary>
|
||||
public System.Net.Http.Headers.HttpContentHeaders ContentHeaders { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The DateTime when the request was retrieved.
|
||||
/// </summary>
|
||||
@@ -154,7 +144,6 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
{
|
||||
StatusCode = httpResponseMessage.StatusCode;
|
||||
Headers = httpResponseMessage.Headers;
|
||||
ContentHeaders = httpResponseMessage.Content.Headers;
|
||||
IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode;
|
||||
ReasonPhrase = httpResponseMessage.ReasonPhrase;
|
||||
RawContent = rawContent;
|
||||
@@ -178,7 +167,6 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
{
|
||||
StatusCode = httpResponseMessage.StatusCode;
|
||||
Headers = httpResponseMessage.Headers;
|
||||
ContentHeaders = httpResponseMessage.Content.Headers;
|
||||
IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode;
|
||||
ReasonPhrase = httpResponseMessage.ReasonPhrase;
|
||||
ContentStream = contentStream;
|
||||
@@ -190,7 +178,6 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
OnCreated(httpRequestMessage, httpResponseMessage);
|
||||
}
|
||||
|
||||
|
||||
partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
|
||||
}
|
||||
{{#x-http-statuses-with-return}}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{partial_header}}
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -44,4 +43,4 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", {{packageName}}.Client.ClientUtils.Base64Encode(_username + ":" + _password));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{partial_header}}
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -39,4 +38,4 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ using {{packageName}}.{{modelPackage}};
|
||||
{{/-first}}
|
||||
{{/models}}
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Net.Http.Headers;
|
||||
|
||||
{{>Assembly}}namespace {{packageName}}.{{clientPackage}}
|
||||
{
|
||||
@@ -312,36 +311,6 @@ using System.Net.Http.Headers;
|
||||
return string.Join(",", accepts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Select the Accept header's value from the given accepts array:
|
||||
/// if JSON exists in the given array, use it;
|
||||
/// otherwise use all of them.
|
||||
/// </summary>
|
||||
/// <param name="accepts">The accepts array to select from.</param>
|
||||
/// <returns>The Accept header values to use.</returns>
|
||||
public static IEnumerable<MediaTypeWithQualityHeaderValue> SelectHeaderAcceptArray(string[] accepts)
|
||||
{
|
||||
if (accepts.Length == 0)
|
||||
{{#net80OrLater}}
|
||||
return [];
|
||||
{{/net80OrLater}}
|
||||
{{^net80OrLater}}
|
||||
return Enumerable.Empty<MediaTypeWithQualityHeaderValue>();
|
||||
{{/net80OrLater}}
|
||||
|
||||
if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase))
|
||||
{{#net80OrLater}}
|
||||
return [MediaTypeWithQualityHeaderValue.Parse("application/json")];
|
||||
{{/net80OrLater}}
|
||||
{{^net80OrLater}}
|
||||
return new [] { MediaTypeWithQualityHeaderValue.Parse("application/json") };
|
||||
{{/net80OrLater}}
|
||||
|
||||
return accepts.Select(MediaTypeWithQualityHeaderValue.Parse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a case-insensitive check that a provided content type is a known JSON-like content type.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{partial_header}}
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -20,4 +19,4 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// </summary>
|
||||
public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
{{>partial_header}}
|
||||
using System;
|
||||
|
||||
namespace {{packageName}}.{{clientPackage}}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{partial_header}}
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -43,4 +42,4 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
request.Headers.Add(signedHeader.Key, signedHeader.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
{{>partial_header}}
|
||||
using System.Net.Http;
|
||||
|
||||
namespace {{packageName}}.{{apiPackage}}
|
||||
@@ -13,4 +12,4 @@ namespace {{packageName}}.{{apiPackage}}
|
||||
/// </summary>
|
||||
HttpClient HttpClient { get; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{partial_header}}
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -27,4 +26,4 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
Options = options;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{partial_header}}
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -39,4 +38,4 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _raw);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
// <auto-generated>
|
||||
{{>partial_header}}
|
||||
|
||||
{{#nrt}}
|
||||
#nullable enable
|
||||
|
||||
@@ -16,21 +17,21 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
/// <typeparam name="TTokenBase"></typeparam>
|
||||
{{>visibility}} class RateLimitProvider<TTokenBase> : TokenProvider<TTokenBase> where TTokenBase : TokenBase
|
||||
{
|
||||
public Dictionary<string, global::System.Threading.Channels.Channel<TTokenBase>> AvailableTokens { get; } = new{{^net70OrLater}} Dictionary<string, global::System.Threading.Channels.Channel<TTokenBase>>{{/net70OrLater}}();
|
||||
internal Dictionary<string, global::System.Threading.Channels.Channel<TTokenBase>> AvailableTokens { get; } = new{{^net70OrLater}} Dictionary<string, global::System.Threading.Channels.Channel<TTokenBase>>{{/net70OrLater}}();
|
||||
|
||||
/// <summary>
|
||||
/// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout.
|
||||
/// </summary>
|
||||
/// <param name="container"></param>
|
||||
public RateLimitProvider(TokenContainer<TTokenBase> container) : base()
|
||||
public RateLimitProvider(TokenContainer<TTokenBase> container) : base(container.Tokens)
|
||||
{
|
||||
foreach(TTokenBase token in container.Tokens)
|
||||
foreach(TTokenBase token in _tokens)
|
||||
token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40));
|
||||
|
||||
{{#lambda.copy}}
|
||||
global::System.Threading.Channels.BoundedChannelOptions options = new global::System.Threading.Channels.BoundedChannelOptions(container.Tokens.Count)
|
||||
global::System.Threading.Channels.BoundedChannelOptions options = new global::System.Threading.Channels.BoundedChannelOptions(_tokens.Length)
|
||||
{
|
||||
FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropOldest
|
||||
FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropWrite
|
||||
};
|
||||
|
||||
AvailableTokens.Add(string.Empty, global::System.Threading.Channels.Channel.CreateBounded<TTokenBase>(options));
|
||||
@@ -44,7 +45,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
{
|
||||
global::System.Threading.Channels.BoundedChannelOptions options = new global::System.Threading.Channels.BoundedChannelOptions(apiKeyTokenContainer.Tokens.Count(t => ClientUtils.ApiKeyHeaderToString(t.Header).Equals(header)))
|
||||
{
|
||||
FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropOldest
|
||||
FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropWrite
|
||||
};
|
||||
|
||||
AvailableTokens.Add(header, global::System.Threading.Channels.Channel.CreateBounded<TTokenBase>(options));
|
||||
@@ -64,7 +65,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
{{/hasApiKeyMethods}}
|
||||
|
||||
foreach (var availableToken in AvailableTokens)
|
||||
foreach(TTokenBase token in container.Tokens)
|
||||
foreach(TTokenBase token in _tokens)
|
||||
{
|
||||
{{#hasApiKeyMethods}}
|
||||
if (token is ApiKeyToken apiKeyToken)
|
||||
@@ -85,7 +86,7 @@ namespace {{packageName}}.{{clientPackage}}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override async System.Threading.Tasks.ValueTask<TTokenBase> GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}})
|
||||
protected internal override async System.Threading.Tasks.ValueTask<TTokenBase> GetAsync(string header = "", System.Threading.CancellationToken cancellation = default{{^netstandard20OrLater}}(global::System.Threading.CancellationToken){{/netstandard20OrLater}})
|
||||
{
|
||||
if (!AvailableTokens.TryGetValue(header, out global::System.Threading.Channels.Channel<TTokenBase>{{nrt?}} tokens))
|
||||
throw new KeyNotFoundException($"Could not locate a token for header '{header}'.");
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user