Fix thousands of spelling typos (#10272)

This commit is contained in:
Nathan Baulch 2021-08-29 00:58:24 +10:00 committed by GitHub
parent 2d239271e5
commit 5d68bd6a03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1132 changed files with 2060 additions and 2060 deletions

View File

@ -1811,7 +1811,7 @@ function readBlockScalar(state, nodeIndent) {
} }
} }
// Break this `while` cycle and go to the funciton's epilogue. // Break this `while` cycle and go to the function's epilogue.
break; break;
} }
@ -2862,7 +2862,7 @@ module.exports = new Schema({
// //
// NOTE: JS-YAML does not support schema-specific tag resolution restrictions. // NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
// So, this schema is not such strict as defined in the YAML specification. // So, this schema is not such strict as defined in the YAML specification.
// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc. // It allows numbers in binary notation, use `Null` and `NULL` as `null`, etc.
'use strict'; 'use strict';
@ -3222,7 +3222,7 @@ function representYamlFloat(object, style) {
res = object.toString(10); res = object.toString(10);
// JS stringifier can build scientific format without dots: 5e-100, // JS stringifier can build scientific format without dots: 5e-100,
// while YAML requres dot: 5.e-100. Fix it with simple hack // while YAML requires dot: 5.e-100. Fix it with simple hack
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res; return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
} }
@ -3424,7 +3424,7 @@ var esprima;
// Browserified version does not have esprima // Browserified version does not have esprima
// //
// 1. For node.js just require module as deps // 1. For node.js just require module as deps
// 2. For browser try to require mudule via external AMD system. // 2. For browser try to require module via external AMD system.
// If not found - try to fallback to window.esprima. If not // If not found - try to fallback to window.esprima. If not
// found too - then fail to parse. // found too - then fail to parse.
// //
@ -3881,7 +3881,7 @@ function constructYamlTimestamp(data) {
if (match[9]) { if (match[9]) {
tz_hour = +(match[10]); tz_hour = +(match[10]);
tz_minute = +(match[11] || 0); tz_minute = +(match[11] || 0);
delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds delta = (tz_hour * 60 + tz_minute) * 60000; // delta in milliseconds
if (match[9] === '-') delta = -delta; if (match[9] === '-') delta = -delta;
} }

2
.github/CODEOWNERS vendored
View File

@ -18,7 +18,7 @@ scripts/**/* @jimschubert
website/**/* @jimschubert website/**/* @jimschubert
bin/ci/**/* @jimschubert bin/ci/**/* @jimschubert
## Bulid related ## Build related
CI/**/* @OpenAPITools/build CI/**/* @OpenAPITools/build
.mvn/**/* @OpenAPITools/build .mvn/**/* @OpenAPITools/build
bin/utils/**/* @OpenAPITools/build bin/utils/**/* @OpenAPITools/build

View File

@ -126,7 +126,7 @@ before_install:
# -- skip perl test to shorten build time # -- skip perl test to shorten build time
# perl dep # perl dep
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) #- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
#- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Igorned failure from cpanm" #- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Ignored failure from cpanm"
# -- skip perl test end # -- skip perl test end
# show host table to confirm petstore.swagger.io is mapped to localhost # show host table to confirm petstore.swagger.io is mapped to localhost
- cat /etc/hosts - cat /etc/hosts

View File

@ -95,7 +95,7 @@ test_script:
# generate all petstore clients (openapi3) # generate all petstore clients (openapi3)
# - .\bin\openapi3\windows\run-all-petstore.cmd # - .\bin\openapi3\windows\run-all-petstore.cmd
# test ps pestore # test ps petstore
- ps: | - ps: |
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
cd samples\client\petstore\powershell\ cd samples\client\petstore\powershell\

View File

@ -17,4 +17,4 @@ The last Dart version that was used to generate the keywords can be found in `da
1. run the dart app 1. run the dart app
- `./save-dart-keywords.exe` - `./save-dart-keywords.exe`
1. the ouput is `dart-keywords.txt` and `dart-version.txt` 1. the output is `dart-keywords.txt` and `dart-version.txt`

View File

@ -26,7 +26,7 @@ if [[ "--skip-docs" == "${1}" ]]; then
export SKIP_EXPORT_DOCS=true export SKIP_EXPORT_DOCS=true
fi fi
# Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath) # Some special case generators may expect to be run as a standalone process (e.g. modifying classpath)
# Docs should always be run, regardless of batch or operation. # Docs should always be run, regardless of batch or operation.
declare -a always_iterate=( declare -a always_iterate=(
"${root}/bin/meta-codegen.sh" "${root}/bin/meta-codegen.sh"

View File

@ -1,6 +1,6 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
# #
# release_chekcout.rb # release_checkout.rb
# #
require 'rubygems' require 'rubygems'
require 'open-uri' require 'open-uri'
@ -37,7 +37,7 @@ def check_npmjs
end end
def check_homebrew def check_homebrew
print "Checking homebrew forumla ... " print "Checking homebrew formula ... "
url = "https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/openapi-generator.rb" url = "https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/openapi-generator.rb"
new_maven_url = "https://search.maven.org/remotecontent?filepath=org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar" new_maven_url = "https://search.maven.org/remotecontent?filepath=org/openapitools/openapi-generator-cli/#{$version}/openapi-generator-cli-#{$version}.jar"

View File

@ -104,7 +104,7 @@ sidebar_label: "Release Notes: 3.0.0"
* 39fa375e3 \[kotlin] Fix NPE for POST/PUT/PATCH with empty request models. * 39fa375e3 \[kotlin] Fix NPE for POST/PUT/PATCH with empty request models.
* c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type * c599906f1 Kotlin: Correct data_class.mustache to use proper property for inner enum data type
* c69925b53 \[Kotlin] Fix issues with threetenbp * c69925b53 \[Kotlin] Fix issues with threetenbp
* a811a48c3 minor fix to kotlin client genrator due to merge conflict * a811a48c3 minor fix to kotlin client generator due to merge conflict
* 914275fe7 \[kotlin] support selection of datelibrary * 914275fe7 \[kotlin] support selection of datelibrary
* a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template * a61d23265 Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template
@ -141,7 +141,7 @@ sidebar_label: "Release Notes: 3.0.0"
* 82ee8656f \[java] Enum in array of array (#66) * 82ee8656f \[java] Enum in array of array (#66)
* bf7e4e7df Java gson: add @SerializedName value as constant (#22) * bf7e4e7df Java gson: add @SerializedName value as constant (#22)
* 30c1448d7 Fix build.gradle for Java RESTEasy client * 30c1448d7 Fix build.gradle for Java RESTEasy client
* 642c0566d \[Java] Use Rx2 Completalbe for Void Retrofit2 responses * 642c0566d \[Java] Use Rx2 Completable for Void Retrofit2 responses
* 72221b1cf Adding @Deprecated to retrofit2 client interfaces. * 72221b1cf Adding @Deprecated to retrofit2 client interfaces.
* 47111b324 \[Java] fix gson deserialize format byte * 47111b324 \[Java] fix gson deserialize format byte
* 9e06f7063 \[Java] Fix assignment of new object instance to variable * 9e06f7063 \[Java] Fix assignment of new object instance to variable
@ -183,7 +183,7 @@ sidebar_label: "Release Notes: 3.0.0"
* 61e58d649 Add R namespace file * 61e58d649 Add R namespace file
* ### Ruby * ### Ruby
* a08164592 fix ruby parameters in documentation, fix reuqiredParams, optionalParams * a08164592 fix ruby parameters in documentation, fix requiredParams, optionalParams
* 8e34f9a98 update to newer version of ruby * 8e34f9a98 update to newer version of ruby
* aa6b217bb \[Ruby] Add auto-generated rubocop config file * aa6b217bb \[Ruby] Add auto-generated rubocop config file
@ -238,15 +238,15 @@ sidebar_label: "Release Notes: 3.0.0"
* 866817587 \[aspnetcore] Fix string enum generation * 866817587 \[aspnetcore] Fix string enum generation
* ### Java * ### Java
* bd50d368e \[JAVA - jaxrs-reasteasy-eap] Add import to models (#179) * bd50d368e \[JAVA - jaxrs-resteasy-eap] Add import to models (#179)
* 7efda597c Fix issue with useBeanValidation option in Java server generators (#160) * 7efda597c Fix issue with useBeanValidation option in Java server generators (#160)
* 71b5de3ed Do not set contextPath for spring-boot (#104) * 71b5de3ed Do not set contextPath for spring-boot (#104)
* b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131) * b73ab0260 jaxrs-cxf-cdi: fix outer enum (#131)
* 4d7fc046f \[JaxRS] Add "validation-api" dependency in jetty (#30) * 4d7fc046f \[JaxRS] Add "validation-api" dependency in jetty (#30)
* ce930e7a6 \[Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid) * ce930e7a6 \[Jaxrs-cxf] Add bean-level cascaded beanvalidation for pojos (@Valid)
* 386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client" * 386b9f432 Modify "postProcessOperations" for "jaxrs-cxf-client"
* 5d92717dc update jaxrs to listent at port 10080 * 5d92717dc update jaxrs to listen at port 10080
* 7c2031675 update artifict id for jaxrs datelib j8 * 7c2031675 update artifact id for jaxrs datelib j8
* 88c5112f2 Adds support for returning response in jaxrs-spec interfaces * 88c5112f2 Adds support for returning response in jaxrs-spec interfaces
* 6bf84d5fa \[JAXRS-SPEC] Fix lowercase enums sent as uppercase * 6bf84d5fa \[JAXRS-SPEC] Fix lowercase enums sent as uppercase
* 3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85) * 3a1922bc9 Fix version for "spring-boot-maven-plugin" (#85)
@ -329,7 +329,7 @@ sidebar_label: "Release Notes: 3.0.0"
* 1492df6ce Override server port for Jetty configuration * 1492df6ce Override server port for Jetty configuration
* 622a75b2c Fix data type shadowing * 622a75b2c Fix data type shadowing
* 861d11d01 use vendor extension in operation to set the body parameter name * 861d11d01 use vendor extension in operation to set the body parameter name
* 80c8b92cb add postProcessParamter for body, form parameter * 80c8b92cb add postProcessParameter for body, form parameter
* 7fe555a51 Set collectionFormat default only for array * 7fe555a51 Set collectionFormat default only for array
* 16589de97 default collection format to csv according to the spec * 16589de97 default collection format to csv according to the spec
* edbe4902a Consider '$ref' for consumes and produces in CodegenOperation * edbe4902a Consider '$ref' for consumes and produces in CodegenOperation

View File

@ -360,7 +360,7 @@ import org.openapitools.codegen.languages.*;
public class MyObjcCodegen extends ObjcClientCodegen { public class MyObjcCodegen extends ObjcClientCodegen {
static { static {
PREFIX = "HELO"; PREFIX = "HELLO";
} }
} }
``` ```

View File

@ -5,7 +5,7 @@ title: "FAQ: General"
## Do you have a chat room? ## Do you have a chat room?
[![Jion the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM)
## What is the governance structure of the OpenAPI Generator project? ## What is the governance structure of the OpenAPI Generator project?

View File

@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|groupId|groupId for use in the generated build.gradle and pom.xml| |null| |groupId|groupId for use in the generated build.gradle and pom.xml| |null|
|invokerPackage|root package for generated code| |null| |invokerPackage|root package for generated code| |null|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|library|library template (sub-template) to use|<dl><dt>**volley**</dt><dd>HTTP client: Volley 1.0.19 (default)</dd><dt>**httpclient**</dt><dd>HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release.</dd></dl>|null| |library|library template (sub-template) to use|<dl><dt>**volley**</dt><dd>HTTP client: Volley 1.0.19 (default)</dd><dt>**httpclient**</dt><dd>HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be deprecated in the next major release.</dd></dl>|null|
|modelPackage|package for generated models| |null| |modelPackage|package for generated models| |null|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|serializableModel|boolean - toggle &quot;implements Serializable&quot; for generated models| |false| |serializableModel|boolean - toggle &quot;implements Serializable&quot; for generated models| |false|

View File

@ -14,7 +14,7 @@ sidebar_label: go-experimental
|packageVersion|Go package version.| |1.0.0| |packageVersion|Go package version.| |1.0.0|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts =&gt; PetApiDeletePetOpts| |false| |structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts =&gt; PetApiDeletePetOpts| |false|
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and onlye one match in oneOf's schemas) will be skipped.| |false| |useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false|
|skipReadonlyPropertiesInInt|Skip default values to the readOnly properties in the model init function./ /false/ |skipReadonlyPropertiesInInt|Skip default values to the readOnly properties in the model init function./ /false/
|withAWSV4Signature|whether to include AWS v4 signature support| |false| |withAWSV4Signature|whether to include AWS v4 signature support| |false|
|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffs| |false| |withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffs| |false|

View File

@ -36,7 +36,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|invokerPackage|root package for generated code| |org.openapitools.client| |invokerPackage|root package for generated code| |org.openapitools.client|
|java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|true| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|true|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true| |legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 1.x. JSON processing: JSON-B</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 4.x</dd></dl>|okhttp-gson| |library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libraries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2/3]=true'. (RxJava 1.x or 2.x or 3.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 1.x. JSON processing: JSON-B</dd><dt>**apache-httpclient**</dt><dd>HTTP client: Apache httpclient 4.x</dd></dl>|okhttp-gson|
|licenseName|The name of the license| |Unlicense| |licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org| |licenseUrl|The URL of the license| |http://unlicense.org|
|microprofileFramework|Framework for microprofile. Possible values &quot;kumuluzee&quot;| |null| |microprofileFramework|Framework for microprofile. Possible values &quot;kumuluzee&quot;| |null|

View File

@ -19,7 +19,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|moshiCodeGen|Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info.| |false| |moshiCodeGen|Whether to enable codegen with the Moshi library. Refer to the [official Moshi doc](https://github.com/square/moshi#codegen) for more info.| |false|
|packageName|Generated artifact package name.| |org.openapitools.client| |packageName|Generated artifact package name.| |org.openapitools.client|
|parcelizeModels|toggle &quot;@Parcelize&quot; for generated models| |null| |parcelizeModels|toggle &quot;@Parcelize&quot; for generated models| |null|
|requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|<dl><dt>**toJson**</dt><dd>[DEFAULT] Date formater option using a json converter.</dd><dt>**toString**</dt><dd>Use the 'toString'-method of the date-time object to retrieve the related string representation.</dd></dl>|toJson| |requestDateConverter|JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)|<dl><dt>**toJson**</dt><dd>[DEFAULT] Date formatter option using a json converter.</dd><dt>**toString**</dt><dd>Use the 'toString'-method of the date-time object to retrieve the related string representation.</dd></dl>|toJson|
|serializableModel|boolean - toggle &quot;implements Serializable&quot; for generated models| |null| |serializableModel|boolean - toggle &quot;implements Serializable&quot; for generated models| |null|
|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi| |serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null| |sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null|

View File

@ -166,7 +166,7 @@ You don't need to rename the file manually, OpenAPI Generator will do it when yo
## Metadata folder ## Metadata folder
The metatata folder (to store the `VERSION` file for example) is now called `.openapi-generator/` instead of `.swagger-codegen/`. The metadata folder (to store the `VERSION` file for example) is now called `.openapi-generator/` instead of `.swagger-codegen/`.

View File

@ -563,7 +563,7 @@ For C-like languages which also require header files, you may create two files p
apiTemplateFiles.put("api-header.mustache", ".h"); apiTemplateFiles.put("api-header.mustache", ".h");
apiTemplateFiles.put("api-body.mustache", ".m"); apiTemplateFiles.put("api-body.mustache", ".m");
``` ```
Here, an Operation with tag `Pet` will generate two files: `SWGPetApi.h` and `SWGPetApi.m`. The `SWG` prefix and `Api` suffix are options specific to the Objective-C geneator. Here, an Operation with tag `Pet` will generate two files: `SWGPetApi.h` and `SWGPetApi.m`. The `SWG` prefix and `Api` suffix are options specific to the Objective-C generator.
### Models ### Models

View File

@ -62,7 +62,7 @@ public interface TemplatingEngineAdapter {
* @param bundle The map of values to pass to the template * @param bundle The map of values to pass to the template
* @param templateFile The name of the template (e.g. model.mustache ) * @param templateFile The name of the template (e.g. model.mustache )
* @return the processed template result * @return the processed template result
* @throws IOException an error ocurred in the template processing * @throws IOException an error occurred in the template processing
*/ */
String compileTemplate(TemplatingExecutor executor, Map<String, Object> bundle, String compileTemplate(TemplatingExecutor executor, Map<String, Object> bundle,
String templateFile) throws IOException; String templateFile) throws IOException;

View File

@ -54,7 +54,7 @@ public class ValidationRule {
} }
/** /**
* Evalute an instance of an object against this rule. * Evaluate an instance of an object against this rule.
* *
* @param input The instance to be evaluated. * @param input The instance to be evaluated.
* *

View File

@ -677,7 +677,7 @@ You can run `gradle tasks --debug` to see this registration.
=== Android Studio === Android Studio
Android Studio may experience a Windows-specific Guava dependency conflict with openapig-enerator-gradle-plugin versions greater than 3.0.0. Android Studio may experience a Windows-specific Guava dependency conflict with openapi-generator-gradle-plugin versions greater than 3.0.0.
As a workaround, you may force exclude conflicting Guava dependencies. As a workaround, you may force exclude conflicting Guava dependencies.

View File

@ -80,7 +80,7 @@ test {
failFast = true failFast = true
onOutput { descriptor, event -> onOutput { descriptor, event ->
// SLF4J may complain about multiple bindings dependign on how this is run. // SLF4J may complain about multiple bindings depending on how this is run.
// This is just a warning, but can make test output less readable. So we ignore it specifically. // This is just a warning, but can make test output less readable. So we ignore it specifically.
if (!event.message.contains("SLF4J:")) { if (!event.message.contains("SLF4J:")) {
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message) logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message)

View File

@ -7,11 +7,11 @@ First, publish the openapi-generator-gradle-plugin locally via `./gradlew assemb
Then, run the following tasks in this example directory. Then, run the following tasks in this example directory.
```bash ```bash
gradle openApiGenerate # expected outcome: BUILD SCCESSFUL gradle openApiGenerate # expected outcome: BUILD SUCCESSFUL
gradle openApiMeta # expected outcome: BUILD SCCESSFUL gradle openApiMeta # expected outcome: BUILD SUCCESSFUL
gradle openApiValidate # expected outcome: BUILD FAILED gradle openApiValidate # expected outcome: BUILD FAILED
gradle buildGoSdk # expected outcome: BUILD SCCESSFUL gradle buildGoSdk # expected outcome: BUILD SUCCESSFUL
gradle buildDotnetSdk # expected outcome: BUILD SCCESSFUL gradle buildDotnetSdk # expected outcome: BUILD SUCCESSFUL
gradle generateGoWithInvalidSpec # expected outcome: BUILD FAILED gradle generateGoWithInvalidSpec # expected outcome: BUILD FAILED
``` ```

View File

@ -127,7 +127,7 @@
<version>${swagger-annotations-version}</version> <version>${swagger-annotations-version}</version>
</dependency> </dependency>
<!-- You can find the dependencies for the library configuation you chose by looking in JavaClientCodegen. <!-- You can find the dependencies for the library configuration you chose by looking in JavaClientCodegen.
Then find the corresponding dependency on Maven Central, and set the versions in the property section below --> Then find the corresponding dependency on Maven Central, and set the versions in the property section below -->
<!-- HTTP client: jersey-client --> <!-- HTTP client: jersey-client -->

View File

@ -81,7 +81,7 @@
<version>${swagger-annotations-version}</version> <version>${swagger-annotations-version}</version>
</dependency> </dependency>
<!-- You can find the dependencies for the library configuation you chose by looking in JavaClientCodegen. <!-- You can find the dependencies for the library configuration you chose by looking in JavaClientCodegen.
Then find the corresponding dependency on Maven Central, and set the versions in the property section below --> Then find the corresponding dependency on Maven Central, and set the versions in the property section below -->
<!-- HTTP client: jersey-client --> <!-- HTTP client: jersey-client -->

View File

@ -478,7 +478,7 @@ paths:
X-Expires-After: X-Expires-After:
type: "string" type: "string"
format: "date-time" format: "date-time"
description: "date in UTC when toekn expires" description: "date in UTC when token expires"
400: 400:
description: "Invalid username/password supplied" description: "Invalid username/password supplied"
/user/logout: /user/logout:

View File

@ -78,7 +78,7 @@
<version>${swagger-annotations-version}</version> <version>${swagger-annotations-version}</version>
</dependency> </dependency>
<!-- You can find the dependencies for the library configuation you chose by looking in JavaClientCodegen. <!-- You can find the dependencies for the library configuration you chose by looking in JavaClientCodegen.
Then find the corresponding dependency on Maven Central, and set the versions in the property section below --> Then find the corresponding dependency on Maven Central, and set the versions in the property section below -->
<dependency> <dependency>

View File

@ -478,7 +478,7 @@ paths:
X-Expires-After: X-Expires-After:
type: "string" type: "string"
format: "date-time" format: "date-time"
description: "date in UTC when toekn expires" description: "date in UTC when token expires"
400: 400:
description: "Invalid username/password supplied" description: "Invalid username/password supplied"
/user/logout: /user/logout:

View File

@ -637,7 +637,7 @@ public class CodeGenMojo extends AbstractMojo {
GlobalSettings.setProperty(CodegenConstants.WITH_XML, withXml.toString()); GlobalSettings.setProperty(CodegenConstants.WITH_XML, withXml.toString());
if (configOptions != null) { if (configOptions != null) {
// Retained for backwards-compataibility with configOptions -> instantiation-types // Retained for backwards-compatibility with configOptions -> instantiation-types
if (instantiationTypes == null && configOptions.containsKey("instantiation-types")) { if (instantiationTypes == null && configOptions.containsKey("instantiation-types")) {
applyInstantiationTypesKvp(configOptions.get("instantiation-types").toString(), applyInstantiationTypesKvp(configOptions.get("instantiation-types").toString(),
configurator); configurator);
@ -649,18 +649,18 @@ public class CodeGenMojo extends AbstractMojo {
configurator); configurator);
} }
// Retained for backwards-compataibility with configOptions -> type-mappings // Retained for backwards-compatibility with configOptions -> type-mappings
if (typeMappings == null && configOptions.containsKey("type-mappings")) { if (typeMappings == null && configOptions.containsKey("type-mappings")) {
applyTypeMappingsKvp(configOptions.get("type-mappings").toString(), configurator); applyTypeMappingsKvp(configOptions.get("type-mappings").toString(), configurator);
} }
// Retained for backwards-compataibility with configOptions -> language-specific-primitives // Retained for backwards-compatibility with configOptions -> language-specific-primitives
if (languageSpecificPrimitives == null && configOptions.containsKey("language-specific-primitives")) { if (languageSpecificPrimitives == null && configOptions.containsKey("language-specific-primitives")) {
applyLanguageSpecificPrimitivesCsv(configOptions applyLanguageSpecificPrimitivesCsv(configOptions
.get("language-specific-primitives").toString(), configurator); .get("language-specific-primitives").toString(), configurator);
} }
// Retained for backwards-compataibility with configOptions -> additional-properties // Retained for backwards-compatibility with configOptions -> additional-properties
if (additionalProperties == null && configOptions.containsKey("additional-properties")) { if (additionalProperties == null && configOptions.containsKey("additional-properties")) {
applyAdditionalPropertiesKvp(configOptions.get("additional-properties").toString(), applyAdditionalPropertiesKvp(configOptions.get("additional-properties").toString(),
configurator); configurator);
@ -670,7 +670,7 @@ public class CodeGenMojo extends AbstractMojo {
applyServerVariablesKvp(configOptions.get("server-variables").toString(), configurator); applyServerVariablesKvp(configOptions.get("server-variables").toString(), configurator);
} }
// Retained for backwards-compataibility with configOptions -> reserved-words-mappings // Retained for backwards-compatibility with configOptions -> reserved-words-mappings
if (reservedWordsMappings == null && configOptions.containsKey("reserved-words-mappings")) { if (reservedWordsMappings == null && configOptions.containsKey("reserved-words-mappings")) {
applyReservedWordsMappingsKvp(configOptions.get("reserved-words-mappings") applyReservedWordsMappingsKvp(configOptions.get("reserved-words-mappings")
.toString(), configurator); .toString(), configurator);

View File

@ -465,7 +465,7 @@ paths:
type: integer type: integer
format: int32 format: int32
X-Expires-After: X-Expires-After:
description: date in UTC when toekn expires description: date in UTC when token expires
schema: schema:
type: string type: string
format: date-time format: date-time

View File

@ -465,7 +465,7 @@ paths:
type: integer type: integer
format: int32 format: int32
X-Expires-After: X-Expires-After:
description: date in UTC when toekn expires description: date in UTC when token expires
schema: schema:
type: string type: string
format: date-time format: date-time

View File

@ -1,7 +1,7 @@
<!doctype html> <!-- Important: must specify --> <!doctype html> <!-- Important: must specify -->
<html> <html>
<head> <head>
<meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 charecters --> <meta charset="utf-8"> <!-- Important: rapi-doc uses utf8 characters -->
<script src="rapidoc-min.js"></script> <script src="rapidoc-min.js"></script>
</head> </head>
<body> <body>

View File

@ -207,7 +207,7 @@
<groupId>se.bjurr.violations</groupId> <groupId>se.bjurr.violations</groupId>
<artifactId>violations-maven-plugin</artifactId> <artifactId>violations-maven-plugin</artifactId>
<configuration> <configuration>
<!-- Should be decreased continuousle as issues are fixed, and will eventually <!-- Should be decreased continuously as issues are fixed, and will eventually
reach 0. --> reach 0. -->
<maxViolations>65</maxViolations> <maxViolations>65</maxViolations>
</configuration> </configuration>

View File

@ -229,7 +229,7 @@ public interface CodegenConfig {
/** /**
* Library template (sub-template). * Library template (sub-template).
* *
* @return libray template * @return library template
*/ */
String getLibrary(); String getLibrary();

View File

@ -928,7 +928,7 @@ public class DefaultCodegen implements CodegenConfig {
// remove \t, \n, \r // remove \t, \n, \r
// replace \ with \\ // replace \ with \\
// replace " with \" // replace " with \"
// outter unescape to retain the original multi-byte characters // outer unescape to retain the original multi-byte characters
// finally escalate characters avoiding code injection // finally escalate characters avoiding code injection
return escapeUnsafeCharacters( return escapeUnsafeCharacters(
StringEscapeUtils.unescapeJava( StringEscapeUtils.unescapeJava(
@ -954,7 +954,7 @@ public class DefaultCodegen implements CodegenConfig {
// remove \t // remove \t
// replace \ with \\ // replace \ with \\
// replace " with \" // replace " with \"
// outter unescape to retain the original multi-byte characters // outer unescape to retain the original multi-byte characters
// finally escalate characters avoiding code injection // finally escalate characters avoiding code injection
return escapeUnsafeCharacters( return escapeUnsafeCharacters(
StringEscapeUtils.unescapeJava( StringEscapeUtils.unescapeJava(
@ -1331,7 +1331,7 @@ public class DefaultCodegen implements CodegenConfig {
/** /**
* Return the variable name in the Api * Return the variable name in the Api
* *
* @param name the varible name of the Api * @param name the variable name of the Api
* @return the snake-cased variable name * @return the snake-cased variable name
*/ */
@Override @Override
@ -2317,7 +2317,7 @@ public class DefaultCodegen implements CodegenConfig {
/** /**
* Converts the OpenAPI schema name to a model name suitable for the current code generator. * Converts the OpenAPI schema name to a model name suitable for the current code generator.
* May be overriden for each programming language. * May be overridden for each programming language.
* In case the name belongs to the TypeSystem it won't be renamed. * In case the name belongs to the TypeSystem it won't be renamed.
* *
* @param name the name of the model * @param name the name of the model
@ -2453,7 +2453,7 @@ public class DefaultCodegen implements CodegenConfig {
final List<String> allParents = ModelUtils.getAllParentsName(composed, allDefinitions, false); final List<String> allParents = ModelUtils.getAllParentsName(composed, allDefinitions, false);
final Schema parent = StringUtils.isBlank(parentName) || allDefinitions == null ? null : allDefinitions.get(parentName); final Schema parent = StringUtils.isBlank(parentName) || allDefinitions == null ? null : allDefinitions.get(parentName);
// TODO revise the logic below to set dicriminator, xml attributes // TODO revise the logic below to set discriminator, xml attributes
if (supportsInheritance || supportsMixins) { if (supportsInheritance || supportsMixins) {
m.allVars = new ArrayList<CodegenProperty>(); m.allVars = new ArrayList<CodegenProperty>();
if (composed.getAllOf() != null) { if (composed.getAllOf() != null) {
@ -3851,13 +3851,13 @@ public class DefaultCodegen implements CodegenConfig {
// remove prefix in operationId // remove prefix in operationId
if (removeOperationIdPrefix) { if (removeOperationIdPrefix) {
// The prefix is everything before the removeOperationIdPrefixCount occurrence of removeOperationIdPrefixDelimiter // The prefix is everything before the removeOperationIdPrefixCount occurrence of removeOperationIdPrefixDelimiter
String[] componenets = operationId.split("[" + removeOperationIdPrefixDelimiter + "]"); String[] components = operationId.split("[" + removeOperationIdPrefixDelimiter + "]");
if (componenets.length > 1) { if (components.length > 1) {
// If removeOperationIdPrefixCount is -1 or bigger that the number of occurrences, uses the last one // If removeOperationIdPrefixCount is -1 or bigger that the number of occurrences, uses the last one
int componenet_number = removeOperationIdPrefixCount == -1 ? componenets.length - 1 : removeOperationIdPrefixCount; int component_number = removeOperationIdPrefixCount == -1 ? components.length - 1 : removeOperationIdPrefixCount;
componenet_number = Math.min(componenet_number, componenets.length - 1); component_number = Math.min(component_number, components.length - 1);
// Reconstruct the operationId from its split elements and the delimiter // Reconstruct the operationId from its split elements and the delimiter
operationId = String.join(removeOperationIdPrefixDelimiter, Arrays.copyOfRange(componenets, componenet_number, componenets.length)); operationId = String.join(removeOperationIdPrefixDelimiter, Arrays.copyOfRange(components, component_number, components.length));
} }
} }
operationId = removeNonNameElementToCamelCase(operationId); operationId = removeNonNameElementToCamelCase(operationId);
@ -4947,7 +4947,7 @@ public class DefaultCodegen implements CodegenConfig {
} }
/** /**
* Loop through propertiies and unalias the reference if $ref (reference) is defined * Loop through properties and unalias the reference if $ref (reference) is defined
* *
* @param properties model properties (schemas) * @param properties model properties (schemas)
* @return model properties with direct reference to schemas * @return model properties with direct reference to schemas
@ -6022,7 +6022,7 @@ public class DefaultCodegen implements CodegenConfig {
} else { } else {
LOGGER.warn("Could not compute datatypeWithEnum from {}, {}", codegenParameter.baseType, codegenParameter.enumName); LOGGER.warn("Could not compute datatypeWithEnum from {}, {}", codegenParameter.baseType, codegenParameter.enumName);
} }
//TODO fix collectformat for form parameters //TODO fix collectionFormat for form parameters
//collectionFormat = getCollectionFormat(s); //collectionFormat = getCollectionFormat(s);
String collectionFormat = getCollectionFormat(codegenParameter); String collectionFormat = getCollectionFormat(codegenParameter);
// default to csv: // default to csv:
@ -6577,7 +6577,7 @@ public class DefaultCodegen implements CodegenConfig {
} }
/** /**
* Boolean value indicating the state of the option for post-processing file using envirionment variables. * Boolean value indicating the state of the option for post-processing file using environment variables.
* *
* @return true if the option is enabled * @return true if the option is enabled
*/ */
@ -6587,7 +6587,7 @@ public class DefaultCodegen implements CodegenConfig {
} }
/** /**
* Set the boolean value indicating the state of the option for post-processing file using envirionment variables. * Set the boolean value indicating the state of the option for post-processing file using environment variables.
* *
* @param enablePostProcessFile true to enable post-processing file * @param enablePostProcessFile true to enable post-processing file
*/ */

View File

@ -458,7 +458,7 @@ public class DefaultGenerator implements Generator {
Schema schema = schemas.get(name); Schema schema = schemas.get(name);
if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { // check to see if it'a a free-form object if (ModelUtils.isFreeFormObject(this.openAPI, schema)) { // check to see if it's a free-form object
// there are 3 free form use cases // there are 3 free form use cases
// 1. free form with no validation that is not allOf included in any composed schemas // 1. free form with no validation that is not allOf included in any composed schemas
// 2. free form with validation // 2. free form with validation
@ -1320,8 +1320,8 @@ public class DefaultGenerator implements Generator {
if (securityScheme != null) { if (securityScheme != null) {
if (securityScheme.getType().equals(SecurityScheme.Type.OAUTH2)) { if (securityScheme.getType().equals(SecurityScheme.Type.OAUTH2)) {
OAuthFlows oautUpdatedFlows = new OAuthFlows(); OAuthFlows oauthUpdatedFlows = new OAuthFlows();
oautUpdatedFlows.extensions(securityScheme.getFlows().getExtensions()); oauthUpdatedFlows.extensions(securityScheme.getFlows().getExtensions());
SecurityScheme oauthUpdatedScheme = new SecurityScheme() SecurityScheme oauthUpdatedScheme = new SecurityScheme()
.type(securityScheme.getType()) .type(securityScheme.getType())
@ -1333,7 +1333,7 @@ public class DefaultGenerator implements Generator {
.bearerFormat(securityScheme.getBearerFormat()) .bearerFormat(securityScheme.getBearerFormat())
.openIdConnectUrl(securityScheme.getOpenIdConnectUrl()) .openIdConnectUrl(securityScheme.getOpenIdConnectUrl())
.extensions(securityScheme.getExtensions()) .extensions(securityScheme.getExtensions())
.flows(oautUpdatedFlows); .flows(oauthUpdatedFlows);
// Ensure inserted AuthMethod only contains scopes of actual operation, and not all of them defined in the Security Component // Ensure inserted AuthMethod only contains scopes of actual operation, and not all of them defined in the Security Component
// have to iterate through and create new SecurityScheme objects with the scopes 'fixed/updated' // have to iterate through and create new SecurityScheme objects with the scopes 'fixed/updated'
@ -1343,22 +1343,22 @@ public class DefaultGenerator implements Generator {
if (securitySchemeFlows.getAuthorizationCode() != null) { if (securitySchemeFlows.getAuthorizationCode() != null) {
OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getAuthorizationCode(), entry.getValue()); OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getAuthorizationCode(), entry.getValue());
oautUpdatedFlows.setAuthorizationCode(updatedFlow); oauthUpdatedFlows.setAuthorizationCode(updatedFlow);
} }
if (securitySchemeFlows.getImplicit() != null) { if (securitySchemeFlows.getImplicit() != null) {
OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getImplicit(), entry.getValue()); OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getImplicit(), entry.getValue());
oautUpdatedFlows.setImplicit(updatedFlow); oauthUpdatedFlows.setImplicit(updatedFlow);
} }
if (securitySchemeFlows.getPassword() != null) { if (securitySchemeFlows.getPassword() != null) {
OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getPassword(), entry.getValue()); OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getPassword(), entry.getValue());
oautUpdatedFlows.setPassword(updatedFlow); oauthUpdatedFlows.setPassword(updatedFlow);
} }
if (securitySchemeFlows.getClientCredentials() != null) { if (securitySchemeFlows.getClientCredentials() != null) {
OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getClientCredentials(), entry.getValue()); OAuthFlow updatedFlow = cloneOAuthFlow(securitySchemeFlows.getClientCredentials(), entry.getValue());
oautUpdatedFlows.setClientCredentials(updatedFlow); oauthUpdatedFlows.setClientCredentials(updatedFlow);
} }
authMethods.put(key, oauthUpdatedScheme); authMethods.put(key, oauthUpdatedScheme);

View File

@ -80,7 +80,7 @@ public class ExampleGenerator {
if (ModelUtils.isArraySchema(responseSchema)) { // array of schema if (ModelUtils.isArraySchema(responseSchema)) { // array of schema
ArraySchema as = (ArraySchema) responseSchema; ArraySchema as = (ArraySchema) responseSchema;
if (as.getItems() != null && StringUtils.isEmpty(as.getItems().get$ref())) { // arary of primtive types if (as.getItems() != null && StringUtils.isEmpty(as.getItems().get$ref())) { // array of primitive types
return generate((Map<String, Object>) responseSchema.getExample(), return generate((Map<String, Object>) responseSchema.getExample(),
new ArrayList<String>(producesInfo), as.getItems()); new ArrayList<String>(producesInfo), as.getItems());
} else if (as.getItems() != null && !StringUtils.isEmpty(as.getItems().get$ref())) { // array of model } else if (as.getItems() != null && !StringUtils.isEmpty(as.getItems().get$ref())) { // array of model
@ -90,7 +90,7 @@ public class ExampleGenerator {
// TODO log warning message as such case is not handled at the moment // TODO log warning message as such case is not handled at the moment
return null; return null;
} }
} else if (StringUtils.isEmpty(responseSchema.get$ref())) { // primtiive type (e.g. integer, string) } else if (StringUtils.isEmpty(responseSchema.get$ref())) { // primitive type (e.g. integer, string)
return generate((Map<String, Object>) responseSchema.getExample(), return generate((Map<String, Object>) responseSchema.getExample(),
new ArrayList<String>(producesInfo), responseSchema); new ArrayList<String>(producesInfo), responseSchema);
} else { // model } else { // model

View File

@ -96,7 +96,7 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code
name = "_u"; name = "_u";
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
if (isReservedWord(name)) { if (isReservedWord(name)) {
name = escapeReservedWord(name); name = escapeReservedWord(name);
@ -600,15 +600,15 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code
// Iterate over all of the parent model properties // Iterate over all of the parent model properties
boolean removedChildEnum = false; boolean removedChildEnum = false;
for (CodegenProperty parentModelCodegenPropery : parentModelCodegenProperties) { for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) {
// Look for enums // Look for enums
if (parentModelCodegenPropery.isEnum) { if (parentModelCodegenProperty.isEnum) {
// Now that we have found an enum in the parent class, // Now that we have found an enum in the parent class,
// and search the child class for the same enum. // and search the child class for the same enum.
Iterator<CodegenProperty> iterator = codegenProperties.iterator(); Iterator<CodegenProperty> iterator = codegenProperties.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
CodegenProperty codegenProperty = iterator.next(); CodegenProperty codegenProperty = iterator.next();
if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenPropery)) { if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) {
// We found an enum in the child class that is // We found an enum in the child class that is
// a duplicate of the one in the parent, so remove it. // a duplicate of the one in the parent, so remove it.
iterator.remove(); iterator.remove();

View File

@ -560,7 +560,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
model.vendorExtensions.put("x-enum-string", true); model.vendorExtensions.put("x-enum-string", true);
} }
// Since we iterate enumVars for modelnnerEnum and enumClass templates, and CodegenModel is missing some of CodegenProperty's properties, // Since we iterate enumVars for modelInnerEnum and enumClass templates, and CodegenModel is missing some of CodegenProperty's properties,
// we can take advantage of Mustache's contextual lookup to add the same "properties" to the model's enumVars scope rather than CodegenProperty's scope. // we can take advantage of Mustache's contextual lookup to add the same "properties" to the model's enumVars scope rather than CodegenProperty's scope.
List<Map<String, String>> enumVars = (ArrayList<Map<String, String>>) model.allowableValues.get("enumVars"); List<Map<String, String>> enumVars = (ArrayList<Map<String, String>>) model.allowableValues.get("enumVars");
List<Map<String, Object>> newEnumVars = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> newEnumVars = new ArrayList<Map<String, Object>>();
@ -837,7 +837,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
// sanitize name // sanitize name
name = sanitizeName(name); name = sanitizeName(name);
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }
@ -866,7 +866,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = name.replaceAll("-", "_"); name = name.replaceAll("-", "_");
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }

View File

@ -134,7 +134,7 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = sanitizeName(name.replaceAll("-", "_")); name = sanitizeName(name.replaceAll("-", "_"));
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }
@ -304,32 +304,32 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co
// Not using the supertype invocation, because we want to UpperCamelize // Not using the supertype invocation, because we want to UpperCamelize
// the type. // the type.
String scheamType = getSchemaType(p); String schemaType = getSchemaType(p);
if (typeMapping.containsKey(scheamType)) { if (typeMapping.containsKey(schemaType)) {
return typeMapping.get(scheamType); return typeMapping.get(schemaType);
} }
if (typeMapping.containsValue(scheamType)) { if (typeMapping.containsValue(schemaType)) {
return scheamType; return schemaType;
} }
if (languageSpecificPrimitives.contains(scheamType)) { if (languageSpecificPrimitives.contains(schemaType)) {
return scheamType; return schemaType;
} }
return toModelName(scheamType); return toModelName(schemaType);
} }
@Override @Override
public String getSchemaType(Schema p) { public String getSchemaType(Schema p) {
String scheamType = super.getSchemaType(p); String schemaType = super.getSchemaType(p);
String type = null; String type = null;
if (typeMapping.containsKey(scheamType)) { if (typeMapping.containsKey(schemaType)) {
type = typeMapping.get(scheamType); type = typeMapping.get(schemaType);
if (languageSpecificPrimitives.contains(type)) if (languageSpecificPrimitives.contains(type))
return (type); return (type);
} else } else
type = scheamType; type = schemaType;
return type; return type;
} }
@ -518,15 +518,15 @@ public abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co
// Iterate over all of the parent model properties // Iterate over all of the parent model properties
boolean removedChildEnum = false; boolean removedChildEnum = false;
for (CodegenProperty parentModelCodegenPropery : parentModelCodegenProperties) { for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) {
// Look for enums // Look for enums
if (parentModelCodegenPropery.isEnum) { if (parentModelCodegenProperty.isEnum) {
// Now that we have found an enum in the parent class, // Now that we have found an enum in the parent class,
// and search the child class for the same enum. // and search the child class for the same enum.
Iterator<CodegenProperty> iterator = codegenProperties.iterator(); Iterator<CodegenProperty> iterator = codegenProperties.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
CodegenProperty codegenProperty = iterator.next(); CodegenProperty codegenProperty = iterator.next();
if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenPropery)) { if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) {
// We found an enum in the child class that is // We found an enum in the child class that is
// a duplicate of the one in the parent, so remove it. // a duplicate of the one in the parent, so remove it.
iterator.remove(); iterator.remove();

View File

@ -452,7 +452,7 @@ public abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co
model.vendorExtensions.put("x-enum-string", true); model.vendorExtensions.put("x-enum-string", true);
} }
// Since we iterate enumVars for modelnnerEnum and enumClass templates, and CodegenModel is missing some of CodegenProperty's properties, // Since we iterate enumVars for modelInnerEnum and enumClass templates, and CodegenModel is missing some of CodegenProperty's properties,
// we can take advantage of Mustache's contextual lookup to add the same "properties" to the model's enumVars scope rather than CodegenProperty's scope. // we can take advantage of Mustache's contextual lookup to add the same "properties" to the model's enumVars scope rather than CodegenProperty's scope.
List<Map<String, String>> enumVars = (ArrayList<Map<String, String>>) model.allowableValues.get("enumVars"); List<Map<String, String>> enumVars = (ArrayList<Map<String, String>>) model.allowableValues.get("enumVars");
List<Map<String, Object>> newEnumVars = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> newEnumVars = new ArrayList<Map<String, Object>>();
@ -679,7 +679,7 @@ public abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co
// sanitize name // sanitize name
name = sanitizeName(name); name = sanitizeName(name);
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }
@ -701,7 +701,7 @@ public abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = name.replaceAll("-", "_"); name = name.replaceAll("-", "_");
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }

View File

@ -192,7 +192,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = sanitizeName(name); name = sanitizeName(name);
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) if (name.matches("^[A-Z_]*$"))
return name; return name;
@ -420,7 +420,7 @@ public abstract class AbstractGoCodegen extends DefaultCodegen implements Codege
* <p> * <p>
* Note the 'parent' attribute in the codegen model is used in the following scenarios: * Note the 'parent' attribute in the codegen model is used in the following scenarios:
* - Indicate a polymorphic association with some other type (e.g. class inheritance). * - Indicate a polymorphic association with some other type (e.g. class inheritance).
* - If the specification has a discriminator, cogegen create a parent based on the discriminator. * - If the specification has a discriminator, codegen create a parent based on the discriminator.
* - Use of the 'additionalProperties' attribute in the OAS specification. * - Use of the 'additionalProperties' attribute in the OAS specification.
* This is the specific scenario when codegen invokes this function. * This is the specific scenario when codegen invokes this function.
* *

View File

@ -153,7 +153,7 @@ public abstract class AbstractGraphQLCodegen extends DefaultCodegen implements C
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = sanitizeName(name.replaceAll("-", "_")); name = sanitizeName(name.replaceAll("-", "_"));
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) if (name.matches("^[A-Z_]*$"))
return name; return name;

View File

@ -756,7 +756,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
name = "_" + name; name = "_" + name;
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z0-9_]*$")) { if (name.matches("^[A-Z0-9_]*$")) {
return name; return name;
} }
@ -1529,15 +1529,15 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
// Iterate over all of the parent model properties // Iterate over all of the parent model properties
boolean removedChildEnum = false; boolean removedChildEnum = false;
for (CodegenProperty parentModelCodegenPropery : parentModelCodegenProperties) { for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) {
// Look for enums // Look for enums
if (parentModelCodegenPropery.isEnum) { if (parentModelCodegenProperty.isEnum) {
// Now that we have found an enum in the parent class, // Now that we have found an enum in the parent class,
// and search the child class for the same enum. // and search the child class for the same enum.
Iterator<CodegenProperty> iterator = codegenProperties.iterator(); Iterator<CodegenProperty> iterator = codegenProperties.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
CodegenProperty codegenProperty = iterator.next(); CodegenProperty codegenProperty = iterator.next();
if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenPropery)) { if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) {
// We found an enum in the child class that is // We found an enum in the child class that is
// a duplicate of the one in the parent, so remove it. // a duplicate of the one in the parent, so remove it.
iterator.remove(); iterator.remove();
@ -1942,7 +1942,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
@Override @Override
protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) {
if (!supportsAdditionalPropertiesWithComposedSchema) { if (!supportsAdditionalPropertiesWithComposedSchema) {
// The additional (undeclared) propertiees are modeled in Java as a HashMap. // The additional (undeclared) properties are modeled in Java as a HashMap.
// //
// 1. supportsAdditionalPropertiesWithComposedSchema is set to false: // 1. supportsAdditionalPropertiesWithComposedSchema is set to false:
// The generated model class extends from the HashMap. That does not work // The generated model class extends from the HashMap. That does not work

View File

@ -61,7 +61,7 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
apiPackage = "org.openapitools.api"; apiPackage = "org.openapitools.api";
modelPackage = "org.openapitools.model"; modelPackage = "org.openapitools.model";
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
updateOption(CodegenConstants.API_PACKAGE, apiPackage); updateOption(CodegenConstants.API_PACKAGE, apiPackage);

View File

@ -881,7 +881,7 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
name = "_u"; name = "_u";
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z0-9_]*$")) { if (name.matches("^[A-Z0-9_]*$")) {
return name; return name;
} }

View File

@ -441,7 +441,7 @@ public abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg
public String toModelName(String name) { public String toModelName(String name) {
name = toGenericName(name); name = toGenericName(name);
// add prefix and/or suffic only if name does not start wth \ (e.g. \DateTime) // add prefix and/or suffix only if name does not start wth \ (e.g. \DateTime)
if (!name.matches("^\\\\.*")) { if (!name.matches("^\\\\.*")) {
if (!StringUtils.isEmpty(modelNamePrefix)) { if (!StringUtils.isEmpty(modelNamePrefix)) {
name = modelNamePrefix + "_" + name; name = modelNamePrefix + "_" + name;

View File

@ -188,7 +188,7 @@ public abstract class AbstractPythonCodegen extends DefaultCodegen implements Co
// remove dollar sign // remove dollar sign
name = name.replaceAll("$", ""); name = name.replaceAll("$", "");
// if it's all uppper case, convert to lower case // if it's all upper case, convert to lower case
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
name = name.toLowerCase(Locale.ROOT); name = name.toLowerCase(Locale.ROOT);
} }

View File

@ -344,7 +344,7 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho
} }
if (!fixedPath.equals(pathname)) { if (!fixedPath.equals(pathname)) {
LOGGER.warn( LOGGER.warn(
"Path '{}' is not consistant with Python variable names. It will be replaced by '{}'", "Path '{}' is not consistent with Python variable names. It will be replaced by '{}'",
pathname, fixedPath); pathname, fixedPath);
paths.remove(pathname); paths.remove(pathname);
path.addExtension("x-python-connexion-openapi-name", pathname); path.addExtension("x-python-connexion-openapi-name", pathname);
@ -376,7 +376,7 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho
String pythonParameterName = this.toParamName(swaggerParameterName); String pythonParameterName = this.toParamName(swaggerParameterName);
if (!swaggerParameterName.equals(pythonParameterName)) { if (!swaggerParameterName.equals(pythonParameterName)) {
LOGGER.warn( LOGGER.warn(
"Parameter name '{}' is not consistant with Python variable names. It will be replaced by '{}'", "Parameter name '{}' is not consistent with Python variable names. It will be replaced by '{}'",
swaggerParameterName, pythonParameterName); swaggerParameterName, pythonParameterName);
parameter.addExtension("x-python-connexion-openapi-name", swaggerParameterName); parameter.addExtension("x-python-connexion-openapi-name", swaggerParameterName);
parameter.setName(pythonParameterName); parameter.setName(pythonParameterName);
@ -439,7 +439,7 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho
} }
break; break;
case OPENIDCONNECT: case OPENIDCONNECT:
LOGGER.warn("Security type {} is not supported by connextion yet", securityScheme.getType().toString()); LOGGER.warn("Security type {} is not supported by connexion yet", securityScheme.getType().toString());
case OAUTH2: case OAUTH2:
addSecurityExtension(securityScheme, "x-tokenInfoFunc", baseFunctionName + "info_from_" + securityName); addSecurityExtension(securityScheme, "x-tokenInfoFunc", baseFunctionName + "info_from_" + securityName);
addSecurityExtension(securityScheme, "x-scopeValidateFunc", baseFunctionName + "validate_scope_" + securityName); addSecurityExtension(securityScheme, "x-scopeValidateFunc", baseFunctionName + "validate_scope_" + securityName);
@ -503,7 +503,7 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho
String openapiPathname = (String) pathExtensions.remove("x-python-connexion-openapi-name"); String openapiPathname = (String) pathExtensions.remove("x-python-connexion-openapi-name");
if (openapiPathname != null && !openapiPathname.equals(pythonPathname)) { if (openapiPathname != null && !openapiPathname.equals(pythonPathname)) {
LOGGER.info( LOGGER.info(
"Path '{}' is not consistant with the original OpenAPI definition. It will be replaced back by '{}'", "Path '{}' is not consistent with the original OpenAPI definition. It will be replaced back by '{}'",
pythonPathname, openapiPathname); pythonPathname, openapiPathname);
paths.remove(pythonPathname); paths.remove(pythonPathname);
paths.put(openapiPathname, path); paths.put(openapiPathname, path);
@ -652,7 +652,7 @@ public abstract class AbstractPythonConnexionServerCodegen extends AbstractPytho
operation.vendorExtensions.put("x-prefered-consume", consume); operation.vendorExtensions.put("x-prefered-consume", consume);
} else if (operation.consumes.size() > 1) { } else if (operation.consumes.size() > 1) {
Map<String, String> consume = operation.consumes.get(0); Map<String, String> consume = operation.consumes.get(0);
skipTests.put("reason", "Connexion does not support multiple consummes. See https://github.com/zalando/connexion/pull/760"); skipTests.put("reason", "Connexion does not support multiple consumes. See https://github.com/zalando/connexion/pull/760");
operation.vendorExtensions.put("x-prefered-consume", consume); operation.vendorExtensions.put("x-prefered-consume", consume);
if ("multipart/form-data".equals(consume.get(MEDIA_TYPE))) { if ("multipart/form-data".equals(consume.get(MEDIA_TYPE))) {
operation.isMultipart = Boolean.TRUE; operation.isMultipart = Boolean.TRUE;

View File

@ -175,7 +175,7 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code
@Override @Override
public String toVarName(final String name) { public String toVarName(final String name) {
String varName = sanitizeName(name); String varName = sanitizeName(name);
// if it's all uppper case, convert to lower case // if it's all upper case, convert to lower case
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
varName = varName.toLowerCase(Locale.ROOT); varName = varName.toLowerCase(Locale.ROOT);
} }

View File

@ -244,7 +244,7 @@ public abstract class AbstractScalaCodegen extends DefaultCodegen {
varName = "_u"; varName = "_u";
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (!varName.matches("^[A-Z_0-9]*$")) { if (!varName.matches("^[A-Z_0-9]*$")) {
varName = getNameUsingModelPropertyNaming(varName); varName = getNameUsingModelPropertyNaming(varName);
} }

View File

@ -394,7 +394,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
sanName = camelize(sanName); sanName = camelize(sanName);
// model name cannot use reserved keyword, e.g. return // model name cannot use reserved keyword, e.g. return
// this is unlikely to happen, because we have just camelized the name, while reserved words are usually all lowcase // this is unlikely to happen, because we have just camelized the name, while reserved words are usually all lowercase
if (isReservedWord(sanName)) { if (isReservedWord(sanName)) {
String modelName = safePrefix + sanName; String modelName = safePrefix + sanName;
LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", sanName, modelName); LOGGER.warn("{} (reserved word) cannot be used as model name. Renamed to {}", sanName, modelName);

View File

@ -162,7 +162,7 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC)); cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC));
supportedLibraries.put("volley", "HTTP client: Volley 1.0.19 (default)"); supportedLibraries.put("volley", "HTTP client: Volley 1.0.19 (default)");
supportedLibraries.put("httpclient", "HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be depecreated in the next major release."); supportedLibraries.put("httpclient", "HTTP client: Apache HttpClient 4.3.6. JSON processing: Gson 2.3.1. IMPORTANT: Android client using HttpClient is not actively maintained and will be deprecated in the next major release.");
CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use"); CliOption library = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
library.setEnum(supportedLibraries); library.setEnum(supportedLibraries);
cliOptions.add(library); cliOptions.add(library);
@ -260,7 +260,7 @@ public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }

View File

@ -563,7 +563,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
if ("abstract".equals(classModifier.getOptValue())) { if ("abstract".equals(classModifier.getOptValue())) {
operationModifier.setOptValue(classModifier.getOptValue()); operationModifier.setOptValue(classModifier.getOptValue());
additionalProperties.put(OPERATION_MODIFIER, operationModifier.getOptValue()); additionalProperties.put(OPERATION_MODIFIER, operationModifier.getOptValue());
LOGGER.warn("classModifier is {} so forcing operatonModifier to {}", classModifier.getOptValue(), operationModifier.getOptValue()); LOGGER.warn("classModifier is {} so forcing operationModifier to {}", classModifier.getOptValue(), operationModifier.getOptValue());
} }
} }

View File

@ -182,7 +182,7 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig {
/** /**
* Allow the user to force the script to always include certain cURL * Allow the user to force the script to always include certain cURL
* comamnds * commands
*/ */
cliOptions.add(CliOption.newString(CURL_OPTIONS, "Default cURL options")); cliOptions.add(CliOption.newString(CURL_OPTIONS, "Default cURL options"));
cliOptions.add(CliOption.newBoolean(PROCESS_MARKDOWN, cliOptions.add(CliOption.newBoolean(PROCESS_MARKDOWN,
@ -529,7 +529,7 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig {
* remove standalone '\' * remove standalone '\'
* *
* replace " with \" * replace " with \"
* outter unescape to retain the original multi-byte characters * outer unescape to retain the original multi-byte characters
*/ */
result = escapeUnsafeCharacters( result = escapeUnsafeCharacters(
StringEscapeUtils.unescapeJava( StringEscapeUtils.unescapeJava(

View File

@ -553,7 +553,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
public String toVarName(String name) { public String toVarName(String name) {
// sanitize name // sanitize name
name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
// if it's all uppper case, convert to lower case // if it's all upper case, convert to lower case
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
name = name.toLowerCase(Locale.ROOT); name = name.toLowerCase(Locale.ROOT);
} }
@ -868,7 +868,7 @@ public class CLibcurlClientCodegen extends DefaultCodegen implements CodegenConf
return; // skip if C_POST_PROCESS_FILE env variable is not defined return; // skip if C_POST_PROCESS_FILE env variable is not defined
} }
// only procees the following type (or we can simply rely on the file extension to check if it's a .c or .h file) // only process the following type (or we can simply rely on the file extension to check if it's a .c or .h file)
Set<String> supportedFileType = new HashSet<String>( Set<String> supportedFileType = new HashSet<String>(
Arrays.asList( Arrays.asList(
"supporting-mustache", "supporting-mustache",

View File

@ -75,7 +75,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
// By default, generated code is considered public // By default, generated code is considered public
protected boolean nonPublicApi = Boolean.FALSE; protected boolean nonPublicApi = Boolean.FALSE;
// use KellermanSoftware.CompareNetObjects for deep recursive object comparision // use KellermanSoftware.CompareNetObjects for deep recursive object comparison
protected boolean useCompareNetObjects = Boolean.FALSE; protected boolean useCompareNetObjects = Boolean.FALSE;
// To make API response's headers dictionary case insensitive // To make API response's headers dictionary case insensitive
@ -750,15 +750,15 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
// Iterate over all of the parent model properties // Iterate over all of the parent model properties
boolean removedChildEnum = false; boolean removedChildEnum = false;
for (CodegenProperty parentModelCodegenPropery : parentModelCodegenProperties) { for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) {
// Look for enums // Look for enums
if (parentModelCodegenPropery.isEnum) { if (parentModelCodegenProperty.isEnum) {
// Now that we have found an enum in the parent class, // Now that we have found an enum in the parent class,
// and search the child class for the same enum. // and search the child class for the same enum.
Iterator<CodegenProperty> iterator = codegenProperties.iterator(); Iterator<CodegenProperty> iterator = codegenProperties.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
CodegenProperty codegenProperty = iterator.next(); CodegenProperty codegenProperty = iterator.next();
if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenPropery)) { if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) {
// We found an enum in the child class that is // We found an enum in the child class that is
// a duplicate of the one in the parent, so remove it. // a duplicate of the one in the parent, so remove it.
iterator.remove(); iterator.remove();
@ -815,7 +815,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
// sanitize name // sanitize name
name = sanitizeName(name); name = sanitizeName(name);
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }

View File

@ -890,7 +890,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
// sanitize name // sanitize name
name = sanitizeName(name); name = sanitizeName(name);
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }
@ -926,15 +926,15 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen {
// Iterate over all of the parent model properties // Iterate over all of the parent model properties
boolean removedChildEnum = false; boolean removedChildEnum = false;
for (CodegenProperty parentModelCodegenPropery : parentModelCodegenProperties) { for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) {
// Look for enums // Look for enums
if (parentModelCodegenPropery.isEnum) { if (parentModelCodegenProperty.isEnum) {
// Now that we have found an enum in the parent class, // Now that we have found an enum in the parent class,
// and search the child class for the same enum. // and search the child class for the same enum.
Iterator<CodegenProperty> iterator = codegenProperties.iterator(); Iterator<CodegenProperty> iterator = codegenProperties.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
CodegenProperty codegenProperty = iterator.next(); CodegenProperty codegenProperty = iterator.next();
if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenPropery)) { if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) {
// We found an enum in the child class that is // We found an enum in the child class that is
// a duplicate of the one in the parent, so remove it. // a duplicate of the one in the parent, so remove it.
iterator.remove(); iterator.remove();

View File

@ -273,7 +273,7 @@ public class CppQtAbstractCodegen extends AbstractCppCodegen implements CodegenC
String varName = name; String varName = name;
varName = sanitizeName(name); varName = sanitizeName(name);
// if it's all uppper case, convert to lower case // if it's all upper case, convert to lower case
if (varName.matches("^[A-Z_]*$")) { if (varName.matches("^[A-Z_]*$")) {
varName = varName.toLowerCase(Locale.ROOT); varName = varName.toLowerCase(Locale.ROOT);
} }

View File

@ -124,7 +124,7 @@ public class CppUE4ClientCodegen extends AbstractCppCodegen {
// Write defaults namespace in properties so that it can be accessible in templates. // Write defaults namespace in properties so that it can be accessible in templates.
// At this point command line has not been parsed so if value is given // At this point command line has not been parsed so if value is given
// in command line it will superseed this content // in command line it will supersede this content
additionalProperties.put("cppNamespace", cppNamespace); additionalProperties.put("cppNamespace", cppNamespace);
additionalProperties.put("unrealModuleName", unrealModuleName); additionalProperties.put("unrealModuleName", unrealModuleName);
@ -494,7 +494,7 @@ public class CppUE4ClientCodegen extends AbstractCppCodegen {
// sanitize name // sanitize name
name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
// if it's all uppper case, convert to lower case // if it's all upper case, convert to lower case
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
name = name.toLowerCase(Locale.ROOT); name = name.toLowerCase(Locale.ROOT);
} }

View File

@ -820,7 +820,7 @@ public class CrystalClientCodegen extends DefaultCodegen {
String varName; String varName;
// sanitize name // sanitize name
varName = sanitizeName(name); varName = sanitizeName(name);
// if it's all uppper case, convert to lower case // if it's all upper case, convert to lower case
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
varName = varName.toLowerCase(Locale.ROOT); varName = varName.toLowerCase(Locale.ROOT);
} }

View File

@ -356,7 +356,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig
* Returns the number of required parameters plus 1. * Returns the number of required parameters plus 1.
* *
* @param os List of Codegen Parameters * @param os List of Codegen Parameters
* @return the string representation of the number of required paramters plus 1 * @return the string representation of the number of required parameters plus 1
*/ */
String length(Object os) { String length(Object os) {
int l = 1; int l = 1;
@ -371,7 +371,7 @@ public class ErlangClientCodegen extends DefaultCodegen implements CodegenConfig
* Returns the number of required parameters or body parameters. * Returns the number of required parameters or body parameters.
* *
* @param os List of Codegen Parameters * @param os List of Codegen Parameters
* @return the number of required paramters or body parameters * @return the number of required parameters or body parameters
*/ */
int lengthRequired(List<CodegenParameter> allParams) { int lengthRequired(List<CodegenParameter> allParams) {
int l = 0; int l = 0;

View File

@ -290,7 +290,7 @@ public class FlashClientCodegen extends DefaultCodegen implements CodegenConfig
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'. name = name.replaceAll("-", "_"); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
// if it's all uppper case, convert to lower case // if it's all upper case, convert to lower case
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
name = name.toLowerCase(Locale.ROOT); name = name.toLowerCase(Locale.ROOT);
} }

View File

@ -127,7 +127,7 @@ public class GraphQLNodeJSExpressServerCodegen extends AbstractGraphQLCodegen im
ArraySchema ap = (ArraySchema) p; ArraySchema ap = (ArraySchema) p;
Schema inner = ap.getItems(); Schema inner = ap.getItems();
// IMPORTANT NOTE we add the braces within template because there we have the possibility to differenciate // IMPORTANT NOTE we add the braces within template because there we have the possibility to differentiate
// between some specific types for GraphQL: // between some specific types for GraphQL:
// return "[" + getTypeDeclaration(inner) + "]"; // return "[" + getTypeDeclaration(inner) + "]";
return getTypeDeclaration(inner); return getTypeDeclaration(inner);
@ -137,7 +137,7 @@ public class GraphQLNodeJSExpressServerCodegen extends AbstractGraphQLCodegen im
return getTypeDeclaration(inner); return getTypeDeclaration(inner);
} }
// IMPORANT NOTE Not using the supertype invocation, because we want to UpperCamelize the type: // IMPORTANT NOTE Not using the supertype invocation, because we want to UpperCamelize the type:
String schemaType = getSchemaType(p); String schemaType = getSchemaType(p);
String nullable = ModelUtils.isNullable(p) ? "" : "!"; String nullable = ModelUtils.isNullable(p) ? "" : "!";

View File

@ -953,10 +953,10 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
} }
} }
private void SetNoContent(CodegenOperation op, String inlineExtentionName) { private void SetNoContent(CodegenOperation op, String inlineExtensionName) {
Map<String, String> m = new HashMap<>(); Map<String, String> m = new HashMap<>();
m.put(X_MEDIA_DATA_TYPE, MIME_NO_CONTENT); m.put(X_MEDIA_DATA_TYPE, MIME_NO_CONTENT);
op.vendorExtensions.put(inlineExtentionName, m); op.vendorExtensions.put(inlineExtensionName, m);
} }
private String toDedupedModelName(String paramNameType, String dataType, Boolean appendDataType) { private String toDedupedModelName(String paramNameType, String dataType, Boolean appendDataType) {
@ -1418,7 +1418,7 @@ public class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC
// remove \t, \n, \r // remove \t, \n, \r
// replace \ with \\ // replace \ with \\
// replace " with \" // replace " with \"
// outter unescape to retain the original multi-byte characters // outer unescape to retain the original multi-byte characters
// finally escalate characters avoiding code injection // finally escalate characters avoiding code injection
return escapeUnsafeCharacters( return escapeUnsafeCharacters(
StringEscapeUtils.unescapeJava( StringEscapeUtils.unescapeJava(

View File

@ -64,7 +64,7 @@ public class JavaCXFClientCodegen extends AbstractJavaCodegen
modelPackage = "org.openapitools.model"; modelPackage = "org.openapitools.model";
outputFolder = "generated-code/JavaJaxRS-CXF"; outputFolder = "generated-code/JavaJaxRS-CXF";
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder()); updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());

View File

@ -75,7 +75,7 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
outputFolder = "generated-code/JavaJaxRS-CXF"; outputFolder = "generated-code/JavaJaxRS-CXF";
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
updateOption(USE_TAGS, String.valueOf(true)); updateOption(USE_TAGS, String.valueOf(true));

View File

@ -155,7 +155,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
cliOptions.add(CliOption.newBoolean(USE_ABSTRACTION_FOR_FILES, "Use alternative types instead of java.io.File to allow passing bytes without a file on disk. Available on " + RESTTEMPLATE + " library")); cliOptions.add(CliOption.newBoolean(USE_ABSTRACTION_FOR_FILES, "Use alternative types instead of java.io.File to allow passing bytes without a file on disk. Available on " + RESTTEMPLATE + " library"));
cliOptions.add(CliOption.newBoolean(DYNAMIC_OPERATIONS, "Generate operations dynamically at runtime from an OAS", this.dynamicOperations)); cliOptions.add(CliOption.newBoolean(DYNAMIC_OPERATIONS, "Generate operations dynamically at runtime from an OAS", this.dynamicOperations));
supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead."); supportedLibraries.put(JERSEY1, "HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libraries instead.");
supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x"); supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x");
supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x."); supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 10.x. JSON processing: Jackson 2.9.x.");
supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'."); supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");

View File

@ -59,7 +59,7 @@ public class JavaInflectorServerCodegen extends AbstractJavaCodegen {
modelDocTemplateFiles.remove("model_doc.mustache"); modelDocTemplateFiles.remove("model_doc.mustache");
apiDocTemplateFiles.remove("api_doc.mustache"); apiDocTemplateFiles.remove("api_doc.mustache");
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder()); updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());

View File

@ -40,7 +40,7 @@ public class JavaJAXRSCXFCDIServerCodegen extends JavaJAXRSSpecServerCodegen imp
sourceFolder = "src/gen/java"; sourceFolder = "src/gen/java";
useBeanValidation = true; useBeanValidation = true;
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder()); updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());

View File

@ -150,7 +150,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen {
useJackson = convertPropertyToBoolean(JACKSON); useJackson = convertPropertyToBoolean(JACKSON);
if (interfaceOnly) { if (interfaceOnly) {
// Change default artifactId if genereating interfaces only, before command line options are applied in base class. // Change default artifactId if generating interfaces only, before command line options are applied in base class.
artifactId = "openapi-jaxrs-client"; artifactId = "openapi-jaxrs-client";
} }

View File

@ -63,7 +63,7 @@ public class JavaPKMSTServerCodegen extends AbstractJavaCodegen {
modelPackage = "com.prokarma.pkmst.model"; modelPackage = "com.prokarma.pkmst.model";
invokerPackage = "com.prokarma.pkmst.controller"; invokerPackage = "com.prokarma.pkmst.controller";
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.GROUP_ID, this.getGroupId()); updateOption(CodegenConstants.GROUP_ID, this.getGroupId());
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());

View File

@ -74,7 +74,7 @@ public class JavaPlayFrameworkCodegen extends AbstractJavaCodegen implements Bea
projectTestFolder = projectFolder + "/test"; projectTestFolder = projectFolder + "/test";
testFolder = projectTestFolder; testFolder = projectTestFolder;
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder()); updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder());
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());

View File

@ -44,7 +44,7 @@ public class JavaResteasyEapServerCodegen extends AbstractJavaJAXRSServerCodegen
useBeanValidation = true; useBeanValidation = true;
outputFolder = "generated-code/JavaJaxRS-Resteasy-eap"; outputFolder = "generated-code/JavaJaxRS-Resteasy-eap";
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
apiTemplateFiles.put("apiServiceImpl.mustache", ".java"); apiTemplateFiles.put("apiServiceImpl.mustache", ".java");

View File

@ -39,7 +39,7 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
artifactId = "openapi-jaxrs-resteasy-server"; artifactId = "openapi-jaxrs-resteasy-server";
outputFolder = "generated-code/JavaJaxRS-Resteasy"; outputFolder = "generated-code/JavaJaxRS-Resteasy";
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
apiTemplateFiles.put("apiService.mustache", ".java"); apiTemplateFiles.put("apiService.mustache", ".java");

View File

@ -49,7 +49,7 @@ public class JavaUndertowServerCodegen extends AbstractJavaCodegen {
artifactId = "openapi-undertow-server"; artifactId = "openapi-undertow-server";
dateLibrary = "legacy"; //TODO: add joda support dateLibrary = "legacy"; //TODO: add joda support
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage());
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
updateOption(this.DATE_LIBRARY, this.getDateLibrary()); updateOption(this.DATE_LIBRARY, this.getDateLibrary());

View File

@ -90,7 +90,7 @@ public class JavaVertXServerCodegen extends AbstractJavaCodegen {
artifactVersion = apiVersion; artifactVersion = apiVersion;
this.setDateLibrary("java8"); this.setDateLibrary("java8");
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
updateOption(CodegenConstants.ARTIFACT_VERSION, this.getArtifactVersion()); updateOption(CodegenConstants.ARTIFACT_VERSION, this.getArtifactVersion());
updateOption(CodegenConstants.API_PACKAGE, apiPackage); updateOption(CodegenConstants.API_PACKAGE, apiPackage);

View File

@ -58,7 +58,7 @@ public class JavaVertXWebServerCodegen extends AbstractJavaCodegen {
artifactVersion = apiVersion; artifactVersion = apiVersion;
this.setDateLibrary("java8"); this.setDateLibrary("java8");
// clioOptions default redifinition need to be updated // clioOptions default redefinition need to be updated
updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId());
updateOption(CodegenConstants.ARTIFACT_VERSION, this.getArtifactVersion()); updateOption(CodegenConstants.ARTIFACT_VERSION, this.getArtifactVersion());
updateOption(CodegenConstants.API_PACKAGE, apiPackage); updateOption(CodegenConstants.API_PACKAGE, apiPackage);

View File

@ -486,7 +486,7 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod
name = "_u"; name = "_u";
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }
@ -1042,15 +1042,15 @@ public class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod
// Iterate over all of the parent model properties // Iterate over all of the parent model properties
boolean removedChildEnum = false; boolean removedChildEnum = false;
for (CodegenProperty parentModelCodegenPropery : parentModelCodegenProperties) { for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) {
// Look for enums // Look for enums
if (parentModelCodegenPropery.isEnum) { if (parentModelCodegenProperty.isEnum) {
// Now that we have found an enum in the parent class, // Now that we have found an enum in the parent class,
// and search the child class for the same enum. // and search the child class for the same enum.
Iterator<CodegenProperty> iterator = codegenProperties.iterator(); Iterator<CodegenProperty> iterator = codegenProperties.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
CodegenProperty codegenProperty = iterator.next(); CodegenProperty codegenProperty = iterator.next();
if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenPropery)) { if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) {
// We found an enum in the child class that is // We found an enum in the child class that is
// a duplicate of the one in the parent, so remove it. // a duplicate of the one in the parent, so remove it.
iterator.remove(); iterator.remove();

View File

@ -537,7 +537,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
name = "_u"; name = "_u";
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }
@ -1127,15 +1127,15 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
// Iterate over all of the parent model properties // Iterate over all of the parent model properties
boolean removedChildEnum = false; boolean removedChildEnum = false;
for (CodegenProperty parentModelCodegenPropery : parentModelCodegenProperties) { for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) {
// Look for enums // Look for enums
if (parentModelCodegenPropery.isEnum) { if (parentModelCodegenProperty.isEnum) {
// Now that we have found an enum in the parent class, // Now that we have found an enum in the parent class,
// and search the child class for the same enum. // and search the child class for the same enum.
Iterator<CodegenProperty> iterator = codegenProperties.iterator(); Iterator<CodegenProperty> iterator = codegenProperties.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
CodegenProperty codegenProperty = iterator.next(); CodegenProperty codegenProperty = iterator.next();
if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenPropery)) { if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) {
// We found an enum in the child class that is // We found an enum in the child class that is
// a duplicate of the one in the parent, so remove it. // a duplicate of the one in the parent, so remove it.
iterator.remove(); iterator.remove();

View File

@ -170,7 +170,7 @@ public class JavascriptClosureAngularClientCodegen extends DefaultCodegen implem
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = name.replaceAll("-", "_"); name = name.replaceAll("-", "_");
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) if (name.matches("^[A-Z_]*$"))
return name; return name;

View File

@ -595,7 +595,7 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
name = "_u"; name = "_u";
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) { if (name.matches("^[A-Z_]*$")) {
return name; return name;
} }

View File

@ -191,7 +191,7 @@ public class KotlinClientCodegen extends AbstractKotlinCodegen {
CliOption requestDateConverter = new CliOption(REQUEST_DATE_CONVERTER, "JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)"); CliOption requestDateConverter = new CliOption(REQUEST_DATE_CONVERTER, "JVM-Option. Defines in how to handle date-time objects that are used for a request (as query or parameter)");
Map<String, String> requestDateConverterOptions = new HashMap<>(); Map<String, String> requestDateConverterOptions = new HashMap<>();
requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "[DEFAULT] Date formater option using a json converter."); requestDateConverterOptions.put(RequestDateConverter.TO_JSON.value, "[DEFAULT] Date formatter option using a json converter.");
requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "Use the 'toString'-method of the date-time object to retrieve the related string representation."); requestDateConverterOptions.put(RequestDateConverter.TO_STRING.value, "Use the 'toString'-method of the date-time object to retrieve the related string representation.");
requestDateConverter.setEnum(requestDateConverterOptions); requestDateConverter.setEnum(requestDateConverterOptions);
requestDateConverter.setDefault(this.requestDateConverter); requestDateConverter.setDefault(this.requestDateConverter);

View File

@ -640,8 +640,8 @@ public class KtormSchemaCodegen extends AbstractKotlinCodegen {
/** /**
* Processes each model's property type arguments definitions * Processes each model's property type arguments definitions
* *
* @param dataType the choosen sql type * @param dataType the chosen sql type
* @param dataFormat the choosen sql format * @param dataFormat the chosen sql format
* @param min the minimum value, if specified, in the target type * @param min the minimum value, if specified, in the target type
* @param max the maximum value, if specified, in the target type * @param max the maximum value, if specified, in the target type
* @param columnDefinition resulting column definition dictionary * @param columnDefinition resulting column definition dictionary
@ -1171,7 +1171,7 @@ public class KtormSchemaCodegen extends AbstractKotlinCodegen {
} }
/** /**
* Sets primary key naming convenion * Sets primary key naming convention
* *
* @param name name * @param name name
*/ */
@ -1180,7 +1180,7 @@ public class KtormSchemaCodegen extends AbstractKotlinCodegen {
} }
/** /**
* Returns primary key naming convenion * Returns primary key naming convention
* *
* @return name * @return name
*/ */
@ -1189,7 +1189,7 @@ public class KtormSchemaCodegen extends AbstractKotlinCodegen {
} }
/** /**
* Sets primary key naming convenion * Sets primary key naming convention
* *
* @param enable enable this option * @param enable enable this option
*/ */
@ -1198,7 +1198,7 @@ public class KtormSchemaCodegen extends AbstractKotlinCodegen {
} }
/** /**
* Returns primary key naming convenion * Returns primary key naming convention
* *
* @return is enabled * @return is enabled
*/ */

View File

@ -238,7 +238,7 @@ public class LuaClientCodegen extends DefaultCodegen implements CodegenConfig {
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = sanitizeName(name.replaceAll("-", "_")); name = sanitizeName(name.replaceAll("-", "_"));
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) if (name.matches("^[A-Z_]*$"))
return name; return name;

View File

@ -311,7 +311,7 @@ public class NimClientCodegen extends DefaultCodegen implements CodegenConfig {
name = "`" + name + "`"; name = "`" + name + "`";
} }
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z0-9_]*$")) { if (name.matches("^[A-Z0-9_]*$")) {
return name; return name;
} }

View File

@ -176,7 +176,7 @@ public class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig
typeMapping.put("UUID", "string"); typeMapping.put("UUID", "string");
typeMapping.put("URI", "string"); typeMapping.put("URI", "string");
typeMapping.put("set", "`Set"); typeMapping.put("set", "`Set");
typeMapping.put("passsword", "string"); typeMapping.put("password", "string");
typeMapping.put("DateTime", "string"); typeMapping.put("DateTime", "string");
// supportedLibraries.put(CO_HTTP, "HTTP client: CoHttp."); // supportedLibraries.put(CO_HTTP, "HTTP client: CoHttp.");

View File

@ -60,7 +60,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
protected boolean generateCoreData = false; protected boolean generateCoreData = false;
protected Set<String> advancedMapingTypes = new HashSet<String>(); protected Set<String> advancedMappingTypes = new HashSet<String>();
public ObjcClientCodegen() { public ObjcClientCodegen() {
super(); super();
@ -117,15 +117,15 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
defaultIncludes.add("NSManagedObject"); defaultIncludes.add("NSManagedObject");
defaultIncludes.add("NSData"); defaultIncludes.add("NSData");
advancedMapingTypes.add("NSDictionary"); advancedMappingTypes.add("NSDictionary");
advancedMapingTypes.add("NSArray"); advancedMappingTypes.add("NSArray");
advancedMapingTypes.add("NSMutableArray"); advancedMappingTypes.add("NSMutableArray");
advancedMapingTypes.add("NSMutableDictionary"); advancedMappingTypes.add("NSMutableDictionary");
advancedMapingTypes.add("NSObject"); advancedMappingTypes.add("NSObject");
advancedMapingTypes.add("NSNumber"); advancedMappingTypes.add("NSNumber");
advancedMapingTypes.add("NSURL"); advancedMappingTypes.add("NSURL");
advancedMapingTypes.add("NSString"); advancedMappingTypes.add("NSString");
advancedMapingTypes.add("NSDate"); advancedMappingTypes.add("NSDate");
languageSpecificPrimitives.clear(); languageSpecificPrimitives.clear();
languageSpecificPrimitives.add("NSNumber"); languageSpecificPrimitives.add("NSNumber");
@ -380,7 +380,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
// In this condition, type of Schema p is array of model, // In this condition, type of Schema p is array of model,
// return container type combine inner type with pointer, e.g. `NSArray<SWGTag>*' // return container type combine inner type with pointer, e.g. `NSArray<SWGTag>*'
else { else {
for (String sd : advancedMapingTypes) { for (String sd : advancedMappingTypes) {
if (innerTypeDeclaration.startsWith(sd)) { if (innerTypeDeclaration.startsWith(sd)) {
return getSchemaType(p) + "<" + innerTypeDeclaration + "*>*"; return getSchemaType(p) + "<" + innerTypeDeclaration + "*>*";
} }
@ -398,7 +398,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
if (languageSpecificPrimitives.contains(innerTypeDeclaration)) { if (languageSpecificPrimitives.contains(innerTypeDeclaration)) {
return getSchemaType(p) + "<NSString*, " + innerTypeDeclaration + "*>*"; return getSchemaType(p) + "<NSString*, " + innerTypeDeclaration + "*>*";
} else { } else {
for (String s : advancedMapingTypes) { for (String s : advancedMappingTypes) {
if (innerTypeDeclaration.startsWith(s)) { if (innerTypeDeclaration.startsWith(s)) {
return getSchemaType(p) + "<NSString*, " + innerTypeDeclaration + "*>*"; return getSchemaType(p) + "<NSString*, " + innerTypeDeclaration + "*>*";
} }
@ -455,7 +455,7 @@ public class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig {
* Convert input to proper model name according to ObjC style guide * Convert input to proper model name according to ObjC style guide
* without checking for reserved words * without checking for reserved words
* *
* @param type Model anme * @param type Model name
* @return model Name in ObjC style guide * @return model Name in ObjC style guide
*/ */
public String toModelNameWithoutReservedWordCheck(String type) { public String toModelNameWithoutReservedWordCheck(String type) {

View File

@ -347,7 +347,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
name = "model_" + name; // e.g. 200Response => Model200Response (after camelize) name = "model_" + name; // e.g. 200Response => Model200Response (after camelize)
} }
// add prefix/suffic to model name // add prefix/suffix to model name
if (!StringUtils.isEmpty(modelNamePrefix)) { if (!StringUtils.isEmpty(modelNamePrefix)) {
name = modelNamePrefix + "_" + name; name = modelNamePrefix + "_" + name;
} }

View File

@ -248,7 +248,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
} }
if (op.hasProduces) { if (op.hasProduces) {
// need to escape */* values because they breakes current mustaches // need to escape */* values because they breaks current mustaches
List<Map<String, String>> c = op.produces; List<Map<String, String>> c = op.produces;
for (Map<String, String> mediaType : c) { for (Map<String, String> mediaType : c) {
if ("*/*".equals(mediaType.get("mediaType"))) { if ("*/*".equals(mediaType.get("mediaType"))) {
@ -258,7 +258,7 @@ public class PhpLaravelServerCodegen extends AbstractPhpCodegen {
} }
} }
// sort the endpoints in ascending to avoid the route priority issure. // sort the endpoints in ascending to avoid the route priority issue.
// https://github.com/swagger-api/swagger-codegen/issues/2643 // https://github.com/swagger-api/swagger-codegen/issues/2643
Collections.sort(operations, new Comparator<CodegenOperation>() { Collections.sort(operations, new Comparator<CodegenOperation>() {
@Override @Override

View File

@ -175,7 +175,7 @@ public class PhpLumenServerCodegen extends AbstractPhpCodegen {
op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT);
} }
// sort the endpoints in ascending to avoid the route priority issure. // sort the endpoints in ascending to avoid the route priority issue.
Collections.sort(operations, new Comparator<CodegenOperation>() { Collections.sort(operations, new Comparator<CodegenOperation>() {
@Override @Override
public int compare(CodegenOperation lhs, CodegenOperation rhs) { public int compare(CodegenOperation lhs, CodegenOperation rhs) {

View File

@ -301,7 +301,7 @@ public class PhpSlim4ServerCodegen extends AbstractPhpCodegen {
// remove \t, \n, \r // remove \t, \n, \r
// replace \ with \\ // replace \ with \\
// replace " with \" // replace " with \"
// outter unescape to retain the original multi-byte characters // outer unescape to retain the original multi-byte characters
// finally escalate characters avoiding code injection // finally escalate characters avoiding code injection
input = super.escapeUnsafeCharacters( input = super.escapeUnsafeCharacters(
StringEscapeUtils.unescapeJava( StringEscapeUtils.unescapeJava(

View File

@ -233,7 +233,7 @@ public class PhpSlimServerCodegen extends AbstractPhpCodegen {
// remove \t, \n, \r // remove \t, \n, \r
// replace \ with \\ // replace \ with \\
// replace " with \" // replace " with \"
// outter unescape to retain the original multi-byte characters // outer unescape to retain the original multi-byte characters
// finally escalate characters avoiding code injection // finally escalate characters avoiding code injection
input = super.escapeUnsafeCharacters( input = super.escapeUnsafeCharacters(
StringEscapeUtils.unescapeJava( StringEscapeUtils.unescapeJava(

View File

@ -304,7 +304,7 @@ public class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg
additionalProperties.put("modelTestsPackage", modelTestsPackage); additionalProperties.put("modelTestsPackage", modelTestsPackage);
additionalProperties.put("controllerTestsPackage", controllerTestsPackage); additionalProperties.put("controllerTestsPackage", controllerTestsPackage);
// make Symonfy-specific properties available // make Symfony-specific properties available
additionalProperties.put("bundleName", bundleName); additionalProperties.put("bundleName", bundleName);
additionalProperties.put("bundleClassName", bundleClassName); additionalProperties.put("bundleClassName", bundleClassName);
additionalProperties.put("bundleExtensionName", bundleExtensionName); additionalProperties.put("bundleExtensionName", bundleExtensionName);

View File

@ -206,13 +206,13 @@ public class PlantumlDocumentationCodegen extends DefaultCodegen implements Code
@Override @Override
public String escapeQuotationMark(String input) { public String escapeQuotationMark(String input) {
// to surpress the warning message // to suppress the warning message
return input; return input;
} }
@Override @Override
public String escapeUnsafeCharacters(String input) { public String escapeUnsafeCharacters(String input) {
// to surpress the warning message // to suppress the warning message
return input; return input;
} }
} }

View File

@ -97,7 +97,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
.stability(Stability.BETA) .stability(Stability.BETA)
.build(); .build();
outputFolder = "generated-code" + File.separator + "powershell-expiermental"; outputFolder = "generated-code" + File.separator + "powershell-experimental";
modelTemplateFiles.put("model.mustache", ".ps1"); modelTemplateFiles.put("model.mustache", ".ps1");
apiTemplateFiles.put("api.mustache", ".ps1"); apiTemplateFiles.put("api.mustache", ".ps1");
modelTestTemplateFiles.put("model_test.mustache", ".ps1"); modelTestTemplateFiles.put("model_test.mustache", ".ps1");
@ -825,7 +825,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
// remove \t, \n, \r // remove \t, \n, \r
// replace \ with \\ // replace \ with \\
// replace " with \" // replace " with \"
// outter unescape to retain the original multi-byte characters // outer unescape to retain the original multi-byte characters
// finally escalate characters avoiding code injection // finally escalate characters avoiding code injection
return escapeUnsafeCharacters( return escapeUnsafeCharacters(
StringEscapeUtils.unescapeJava( StringEscapeUtils.unescapeJava(
@ -1061,7 +1061,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
} }
} }
// check if return type is oneOf/anyeOf model // check if return type is oneOf/anyOf model
for (CodegenOperation op : operationList) { for (CodegenOperation op : operationList) {
if (op.returnType != null) { if (op.returnType != null) {
// look up the model to see if it's anyOf/oneOf // look up the model to see if it's anyOf/oneOf

View File

@ -99,7 +99,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
languageSpecificPrimitives.add("none_type"); languageSpecificPrimitives.add("none_type");
// this generator does not use SORT_PARAMS_BY_REQUIRED_FLAG // this generator does not use SORT_PARAMS_BY_REQUIRED_FLAG
// this generator uses the following order for endpoint paramters and model properties // this generator uses the following order for endpoint parameters and model properties
// required params/props with no enum of length one // required params/props with no enum of length one
// required params/props with enum of length one (which is used to set a default value as a python named arg value) // required params/props with enum of length one (which is used to set a default value as a python named arg value)
// optional params/props with **kwargs in python // optional params/props with **kwargs in python
@ -384,7 +384,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
* because they are not used we do not write them * because they are not used we do not write them
* - fix the model imports, go from model name to the full import string with toModelImport + globalImportFixer * - fix the model imports, go from model name to the full import string with toModelImport + globalImportFixer
* *
* @param objs a map going from the model name to a object hoding the model info * @param objs a map going from the model name to an object holding the model info
* @return the updated objs * @return the updated objs
*/ */
@Override @Override
@ -494,7 +494,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
* We have a custom version of this method to produce links to models when they are * We have a custom version of this method to produce links to models when they are
* primitive type (not map, not array, not object) and include validations or are enums * primitive type (not map, not array, not object) and include validations or are enums
* *
* @param body requesst body * @param body request body
* @param imports import collection * @param imports import collection
* @param bodyParameterName body parameter name * @param bodyParameterName body parameter name
* @return the resultant CodegenParameter * @return the resultant CodegenParameter
@ -919,7 +919,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
public String getTypeDeclaration(Schema p) { public String getTypeDeclaration(Schema p) {
// this is used to set dataType, which defines a python tuple of classes // this is used to set dataType, which defines a python tuple of classes
// in Python we will wrap this in () to make it a tuple but here we // in Python we will wrap this in () to make it a tuple but here we
// will omit the parens so the generated documentaion will not include // will omit the parens so the generated documentation will not include
// them // them
return getTypeString(p, "", "", null); return getTypeString(p, "", "", null);
} }
@ -1042,12 +1042,12 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
* @param schema the schema that we need an example for * @param schema the schema that we need an example for
* @param objExample the example that applies to this schema, for now only string example are used * @param objExample the example that applies to this schema, for now only string example are used
* @param indentationLevel integer indentation level that we are currently at * @param indentationLevel integer indentation level that we are currently at
* we assume the indentaion amount is 4 spaces times this integer * we assume the indentation amount is 4 spaces times this integer
* @param prefix the string prefix that we will use when assigning an example for this line * @param prefix the string prefix that we will use when assigning an example for this line
* this is used when setting key: value, pairs "key: " is the prefix * this is used when setting key: value, pairs "key: " is the prefix
* and this is used when setting properties like some_property='some_property_example' * and this is used when setting properties like some_property='some_property_example'
* @param exampleLine this is the current line that we are generatign an example for, starts at 0 * @param exampleLine this is the current line that we are generating an example for, starts at 0
* we don't indentin the 0th line because using the example value looks like: * we don't indent the 0th line because using the example value looks like:
* prop = ModelName( line 0 * prop = ModelName( line 0
* some_property='some_property_example' line 1 * some_property='some_property_example' line 1
* ) line 2 * ) line 2
@ -1299,8 +1299,8 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
CodegenProperty cp = new CodegenProperty(); CodegenProperty cp = new CodegenProperty();
cp.setName(disc.getPropertyName()); cp.setName(disc.getPropertyName());
cp.setExample(discPropNameValue); cp.setExample(discPropNameValue);
// Adds schema to seenSchemas before running example model function. romoves schema after running // Adds schema to seenSchemas before running example model function. removes schema after running
// the function. It also doesnt keep track of any schemas within the ObjectModel. // the function. It also doesn't keep track of any schemas within the ObjectModel.
Set<Schema> newSeenSchemas = new HashSet<>(seenSchemas); Set<Schema> newSeenSchemas = new HashSet<>(seenSchemas);
newSeenSchemas.add(schema); newSeenSchemas.add(schema);
String exampleForObjectModel = exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, newSeenSchemas); String exampleForObjectModel = exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, newSeenSchemas);

View File

@ -262,7 +262,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig {
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = sanitizeName(name.replaceAll("-", "_")); name = sanitizeName(name.replaceAll("-", "_"));
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) if (name.matches("^[A-Z_]*$"))
return name; return name;

View File

@ -291,7 +291,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
* *
* @param gemName Ruby gem name * @param gemName Ruby gem name
* *
* @return Ruby module naame * @return Ruby module name
*/ */
@SuppressWarnings("static-method") @SuppressWarnings("static-method")
public String generateModuleName(String gemName) { public String generateModuleName(String gemName) {
@ -301,7 +301,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
/** /**
* Generate Ruby gem name from the module name, e.g. use "openapi_client" for "OpenAPIClient". * Generate Ruby gem name from the module name, e.g. use "openapi_client" for "OpenAPIClient".
* *
* @param moduleName Ruby module naame * @param moduleName Ruby module name
* *
* @return Ruby gem name * @return Ruby gem name
*/ */

View File

@ -136,7 +136,7 @@ public class RubyOnRailsServerCodegen extends AbstractRubyCodegen {
} else if ("mysql".equals(databaseAdapter)) { } else if ("mysql".equals(databaseAdapter)) {
additionalProperties.put("isDBMySQL", Boolean.TRUE); additionalProperties.put("isDBMySQL", Boolean.TRUE);
} else { } else {
LOGGER.warn("Unknown database {}. Defaul to 'sqlite'.", databaseAdapter); LOGGER.warn("Unknown database {}. Default to 'sqlite'.", databaseAdapter);
additionalProperties.put("isDBSQLite", Boolean.TRUE); additionalProperties.put("isDBSQLite", Boolean.TRUE);
} }

View File

@ -361,7 +361,7 @@ public class RustClientCodegen extends DefaultCodegen implements CodegenConfig {
// replace - with _ e.g. created-at => created_at // replace - with _ e.g. created-at => created_at
name = sanitizeName(name.replaceAll("-", "_")); name = sanitizeName(name.replaceAll("-", "_"));
// if it's all uppper case, do nothing // if it's all upper case, do nothing
if (name.matches("^[A-Z_]*$")) if (name.matches("^[A-Z_]*$"))
return name; return name;

View File

@ -453,7 +453,7 @@ public class ScalaFinchServerCodegen extends DefaultCodegen implements CodegenCo
} }
p.vendorExtensions.put("x-codegen-normalized-input-type", toInputParameter(p)); p.vendorExtensions.put("x-codegen-normalized-input-type", toInputParameter(p));
} else { } else {
//Path paremeters are handled in generateScalaPath() //Path parameters are handled in generateScalaPath()
p.vendorExtensions.put("x-codegen-normalized-input-type", p.dataType); p.vendorExtensions.put("x-codegen-normalized-input-type", p.dataType);
} }
if (p.vendorExtensions.get("x-codegen-normalized-path-type") != null) { if (p.vendorExtensions.get("x-codegen-normalized-path-type") != null) {

Some files were not shown because too many files have changed in this diff Show More