Skip to content

Commit 8ed1e68

Browse files
committed
Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator into OpenAPITools-master
2 parents 39bb52e + 9c66d33 commit 8ed1e68

File tree

4,092 files changed

+93836
-13102
lines changed

Some content is hidden

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

4,092 files changed

+93836
-13102
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
These must match the expectations made by your contribution.
1717
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/configs/java*`.
1818
For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
19-
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `5.3.x`, `6.0.x`
19+
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master` (5.3.0), `6.0.x`
2020
- [ ] If your PR is targeting a particular programming language, @mention the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) members, so they are more likely to review the pull request.

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,15 @@ samples/client/petstore/python-tornado/.venv/
176176

177177
# PHP
178178
samples/client/petstore/php/OpenAPIClient-php/composer.lock
179+
samples/client/petstore/php-dt/composer.lock
180+
samples/client/petstore/php-dt-modern/composer.lock
179181
samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
180182
samples/server/petstore/php-laravel/lib/composer.lock
181183
samples/server/petstore/php-lumen/lib/composer.lock
182184
samples/server/petstore/php-slim4/composer.lock
183185
samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock
184186
samples/server/petstore/php-mezzio-ph/composer.lock
187+
samples/server/petstore/php-mezzio-ph-modern/composer.lock
185188

186189
# ts
187190
samples/client/petstore/typescript-angular2/npm/npm-debug.log
@@ -212,7 +215,9 @@ cabal.project.local
212215
samples/client/petstore/haskell-http-client/docs/haddock-bundle.min.js
213216
samples/client/petstore/haskell-http-client/docs/meta.json
214217
samples/client/petstore/haskell-http-client/docs/quick-jump.css
218+
samples/client/petstore/haskell-http-client/stack.yaml.lock
215219
samples/server/petstore/haskell-servant/stack.yaml.lock
220+
samples/server/petstore/haskell-yesod/stack.yaml.lock
216221

217222
# R
218223
.Rproj.user

README.md

+16-20
Large diffs are not rendered by default.
File renamed without changes.

bin/configs/go-petstore.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ additionalProperties:
77
packageName: petstore
88
disallowAdditionalPropertiesIfNotPresent: false
99
generateInterfaces: true
10+
skipReadonlyPropertiesInInt: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
generatorName: haskell-yesod
2+
outputDir: samples/server/petstore/haskell-yesod
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/haskell-yesod
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/apache-httpclient
3+
library: apache-httpclient
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: petstore-apache-httpclient
8+
hideGenerationTimestamp: true
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
generatorName: java-micronaut-client
2+
outputDir: samples/client/petstore/java-micronaut-client/
3+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
4+
additionalProperties:
5+
artifactId: petstore-micronaut
6+
hideGenerationTimestamp: "true"
7+
configureAuth: "false"
8+
build: "all"
9+
test: "spock"

bin/configs/php-dt-modern.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
generatorName: php-dt
2+
outputDir: samples/client/petstore/php-dt-modern
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/php-dt-modern
5+
additionalProperties:
6+
modern: "true"

bin/configs/php-dt.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
generatorName: php-dt
2+
outputDir: samples/client/petstore/php-dt
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/php-dt

bin/utils/release/release_version_update.sh

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ declare -a xml_files=(
8383
"${root}/modules/openapi-generator-maven-plugin/examples/java-client.xml"
8484
"${root}/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml"
8585
"${root}/modules/openapi-generator-maven-plugin/examples/non-java.xml"
86+
"${root}/modules/openapi-generator-maven-plugin/examples/kotlin.xml"
87+
"${root}/modules/openapi-generator-maven-plugin/examples/spring.xml"
8688
"${root}/pom.xml"
8789
)
8890

docs/generators.md

+3
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ The following generators are available:
3636
* [groovy](generators/groovy.md)
3737
* [haskell-http-client](generators/haskell-http-client.md)
3838
* [java](generators/java.md)
39+
* [java-micronaut-client (beta)](generators/java-micronaut-client.md)
3940
* [javascript](generators/javascript.md)
4041
* [javascript-apollo (beta)](generators/javascript-apollo.md)
4142
* [javascript-closure-angular](generators/javascript-closure-angular.md)
@@ -50,6 +51,7 @@ The following generators are available:
5051
* [ocaml](generators/ocaml.md)
5152
* [perl](generators/perl.md)
5253
* [php](generators/php.md)
54+
* [php-dt (beta)](generators/php-dt.md)
5355
* [powershell (beta)](generators/powershell.md)
5456
* [python (experimental)](generators/python.md)
5557
* [python-legacy](generators/python-legacy.md)
@@ -92,6 +94,7 @@ The following generators are available:
9294
* [go-server](generators/go-server.md)
9395
* [graphql-nodejs-express-server](generators/graphql-nodejs-express-server.md)
9496
* [haskell](generators/haskell.md)
97+
* [haskell-yesod (beta)](generators/haskell-yesod.md)
9598
* [java-inflector](generators/java-inflector.md)
9699
* [java-msf4j](generators/java-msf4j.md)
97100
* [java-pkmst](generators/java-pkmst.md)

docs/generators/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The following generators are available:
3939
* [ocaml](ocaml.md)
4040
* [perl](perl.md)
4141
* [php](php.md)
42+
* [php-dt](php-dt.md)
4243
* [powershell](powershell.md)
4344
* [python](python.md)
4445
* [python-legacy](python-legacy.md)

docs/generators/go-experimental.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ sidebar_label: go-experimental
1515
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
1616
|structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false|
1717
|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|
18+
|skipReadonlyPropertiesInInt|Skip default values to the readOnly properties in the model init function./ /false/
1819
|withAWSV4Signature|whether to include AWS v4 signature support| |false|
1920
|withGoCodegenComment|whether to include Go codegen comment to disable Go Lint and collapse by default in GitHub PRs and diffs| |false|
2021
|withXml|whether to include support for application/xml content type and include XML annotations in the model (works with libraries that provide support for JSON and XML)| |false|

docs/generators/go.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1515
|packageName|Go package name (convention: lowercase).| |openapi|
1616
|packageVersion|Go package version.| |1.0.0|
1717
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
18+
|skipReadonlyPropertiesInInit|Skip default values to the readOnly properties in the model init function| |true|
1819
|structPrefix|whether to prefix struct with the class name. e.g. DeletePetOpts => PetApiDeletePetOpts| |false|
1920
|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|
2021
|withAWSV4Signature|whether to include AWS v4 signature support| |false|

docs/generators/groovy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.api|
1414
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy|

docs/generators/haskell-yesod.md

+187
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
---
2+
title: Config Options for haskell-yesod
3+
sidebar_label: haskell-yesod
4+
---
5+
6+
These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
7+
8+
| Option | Description | Values | Default |
9+
| ------ | ----------- | ------ | ------- |
10+
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
11+
|apiModuleName|name of the API module (Default: generated from info.title or "API")| |null|
12+
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.</dd></dl>|true|
13+
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
14+
|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|
15+
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
16+
|projectName|name of the project (Default: generated from info.title or &quot;openapi-haskell-yesod-server&quot;)| |null|
17+
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
18+
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
19+
20+
## IMPORT MAPPING
21+
22+
| Type/Alias | Imports |
23+
| ---------- | ------- |
24+
25+
26+
## INSTANTIATION TYPES
27+
28+
| Type/Alias | Instantiated By |
29+
| ---------- | --------------- |
30+
31+
32+
## LANGUAGE PRIMITIVES
33+
34+
<ul class="column-ul">
35+
<li>Bool</li>
36+
<li>Day</li>
37+
<li>Double</li>
38+
<li>Float</li>
39+
<li>Int</li>
40+
<li>Int64</li>
41+
<li>Text</li>
42+
<li>UTCTime</li>
43+
</ul>
44+
45+
## RESERVED WORDS
46+
47+
<ul class="column-ul">
48+
<li>as</li>
49+
<li>case</li>
50+
<li>class</li>
51+
<li>data</li>
52+
<li>default</li>
53+
<li>deriving</li>
54+
<li>do</li>
55+
<li>else</li>
56+
<li>family</li>
57+
<li>forall</li>
58+
<li>foreign</li>
59+
<li>hiding</li>
60+
<li>if</li>
61+
<li>import</li>
62+
<li>in</li>
63+
<li>infix</li>
64+
<li>infixl</li>
65+
<li>infixr</li>
66+
<li>instance</li>
67+
<li>let</li>
68+
<li>mdo</li>
69+
<li>module</li>
70+
<li>newtype</li>
71+
<li>of</li>
72+
<li>proc</li>
73+
<li>qualified</li>
74+
<li>rec</li>
75+
<li>then</li>
76+
<li>type</li>
77+
<li>where</li>
78+
</ul>
79+
80+
## FEATURE SET
81+
82+
83+
### Client Modification Feature
84+
| Name | Supported | Defined By |
85+
| ---- | --------- | ---------- |
86+
|BasePath|✗|ToolingExtension
87+
|Authorizations|✗|ToolingExtension
88+
|UserAgent|✗|ToolingExtension
89+
|MockServer|✗|ToolingExtension
90+
91+
### Data Type Feature
92+
| Name | Supported | Defined By |
93+
| ---- | --------- | ---------- |
94+
|Custom|✗|OAS2,OAS3
95+
|Int32|✓|OAS2,OAS3
96+
|Int64|✓|OAS2,OAS3
97+
|Float|✓|OAS2,OAS3
98+
|Double|✓|OAS2,OAS3
99+
|Decimal|✓|ToolingExtension
100+
|String|✓|OAS2,OAS3
101+
|Byte|✓|OAS2,OAS3
102+
|Binary|✓|OAS2,OAS3
103+
|Boolean|✓|OAS2,OAS3
104+
|Date|✓|OAS2,OAS3
105+
|DateTime|✓|OAS2,OAS3
106+
|Password|✓|OAS2,OAS3
107+
|File|✓|OAS2
108+
|Array|✓|OAS2,OAS3
109+
|Maps|✓|ToolingExtension
110+
|CollectionFormat|✓|OAS2
111+
|CollectionFormatMulti|✓|OAS2
112+
|Enum|✓|OAS2,OAS3
113+
|ArrayOfEnum|✓|ToolingExtension
114+
|ArrayOfModel|✓|ToolingExtension
115+
|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
116+
|ArrayOfCollectionOfModel|✓|ToolingExtension
117+
|ArrayOfCollectionOfEnum|✓|ToolingExtension
118+
|MapOfEnum|✓|ToolingExtension
119+
|MapOfModel|✓|ToolingExtension
120+
|MapOfCollectionOfPrimitives|✓|ToolingExtension
121+
|MapOfCollectionOfModel|✓|ToolingExtension
122+
|MapOfCollectionOfEnum|✓|ToolingExtension
123+
124+
### Documentation Feature
125+
| Name | Supported | Defined By |
126+
| ---- | --------- | ---------- |
127+
|Readme|✓|ToolingExtension
128+
|Model|✓|ToolingExtension
129+
|Api|✓|ToolingExtension
130+
131+
### Global Feature
132+
| Name | Supported | Defined By |
133+
| ---- | --------- | ---------- |
134+
|Host|✓|OAS2,OAS3
135+
|BasePath|✓|OAS2,OAS3
136+
|Info|✓|OAS2,OAS3
137+
|Schemes|✗|OAS2,OAS3
138+
|PartialSchemes|✓|OAS2,OAS3
139+
|Consumes|✓|OAS2
140+
|Produces|✓|OAS2
141+
|ExternalDocumentation|✓|OAS2,OAS3
142+
|Examples|✓|OAS2,OAS3
143+
|XMLStructureDefinitions|✗|OAS2,OAS3
144+
|MultiServer|✗|OAS3
145+
|ParameterizedServer|✗|OAS3
146+
|ParameterStyling|✗|OAS3
147+
|Callbacks|✗|OAS3
148+
|LinkObjects|✗|OAS3
149+
150+
### Parameter Feature
151+
| Name | Supported | Defined By |
152+
| ---- | --------- | ---------- |
153+
|Path|✓|OAS2,OAS3
154+
|Query|✓|OAS2,OAS3
155+
|Header|✓|OAS2,OAS3
156+
|Body|✓|OAS2
157+
|FormUnencoded|✓|OAS2
158+
|FormMultipart|✓|OAS2
159+
|Cookie|✓|OAS3
160+
161+
### Schema Support Feature
162+
| Name | Supported | Defined By |
163+
| ---- | --------- | ---------- |
164+
|Simple|✓|OAS2,OAS3
165+
|Composite|✓|OAS2,OAS3
166+
|Polymorphism|✗|OAS2,OAS3
167+
|Union|✗|OAS3
168+
169+
### Security Feature
170+
| Name | Supported | Defined By |
171+
| ---- | --------- | ---------- |
172+
|BasicAuth|✓|OAS2,OAS3
173+
|ApiKey|✓|OAS2,OAS3
174+
|OpenIDConnect|✗|OAS3
175+
|BearerToken|✗|OAS3
176+
|OAuth2_Implicit|✓|OAS2,OAS3
177+
|OAuth2_Password|✗|OAS2,OAS3
178+
|OAuth2_ClientCredentials|✗|OAS2,OAS3
179+
|OAuth2_AuthorizationCode|✗|OAS2,OAS3
180+
181+
### Wire Format Feature
182+
| Name | Supported | Defined By |
183+
| ---- | --------- | ---------- |
184+
|JSON|✓|OAS2,OAS3
185+
|XML|✗|OAS2,OAS3
186+
|PROTOBUF|✗|ToolingExtension
187+
|Custom|✗|OAS2,OAS3

docs/generators/java-inflector.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
88
| Option | Description | Values | Default |
99
| ------ | ----------- | ------ | ------- |
1010
|additionalEnumTypeAnnotations|Additional annotations for enum type(class level annotations)| |null|
11-
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations)| |null|
11+
|additionalModelTypeAnnotations|Additional annotations for model type(class level annotations). List separated by semicolon(;) or new line (Linux or Windows)| |null|
1212
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
1313
|apiPackage|package for generated api classes| |org.openapitools.controllers|
1414
|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java|

0 commit comments

Comments
 (0)