Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
f74ed89
Fix UUID support (#1746)
ackintosh Dec 26, 2018
ef9c110
better handling of allOf (composition) (#1757)
wing328 Dec 27, 2018
9dbcbb3
Resolve inline models before preprocess (#1761)
ackintosh Dec 28, 2018
d8a8bfc
Add online gen tests (#1759)
cbornet Dec 28, 2018
329c3f6
Add test case for InlineModelResolver (#1771)
ackintosh Dec 29, 2018
30d9e01
Use CompareNetObject for object comparison in C# client (refactor) (#…
wing328 Dec 29, 2018
d255357
[Slim] Add PHP CodeSniffer config template (#1764)
ybelenko Dec 29, 2018
7b9f4bf
skip default value for contaier in spring (#1725)
wing328 Dec 29, 2018
268727a
Fix type inference error (#1773)
ackintosh Dec 29, 2018
7f02383
Add test case for InlineModelResolver: inline array schema (#1772)
ackintosh Dec 30, 2018
d232585
Add test case for InlineModelResolver: inline array request body (#1777)
ackintosh Dec 30, 2018
81db4bd
fix group parameter logic (#1779)
wing328 Dec 30, 2018
a92e51a
Add test case for InlineModelResolver: inline array response (#1778)
ackintosh Dec 30, 2018
f28bc1a
[elm] Add support for sending headers (#1704)
eriktim Dec 31, 2018
cafb674
[Slim] Encode path to support non-latin characters (#1687)
ybelenko Dec 31, 2018
c41e78f
Add an option to use reflection in equals, hashCode (Java client) (#1…
wing328 Dec 31, 2018
ff823fe
Use JsonNullable wrapper on nullable/x-nullable fields (#1762)
cbornet Dec 31, 2018
cae52c5
Delete unused method (#1744)
ackintosh Dec 31, 2018
1d00f4c
Add nullable support to C# client (refactor) (#1775)
wing328 Dec 31, 2018
00668e5
Add an option to generate the alias (map, array) as model (#1729)
wing328 Dec 31, 2018
a59c8b1
Add test case for InlineModelResolver: inline object response with ad…
ackintosh Dec 31, 2018
c850a17
Fix: Inline models can't be generated (#1768)
ackintosh Dec 31, 2018
acbceb3
Add test case for InlineModelResolver: arbitrary request body (#1784)
ackintosh Dec 31, 2018
95efcca
Add test case for InlineModelResolver: arbitrary response (#1785)
ackintosh Jan 1, 2019
593cea2
Add test case for InlineModelResolver: arbitrary models (#1786)
ackintosh Jan 1, 2019
933c441
Improve test codes of InlineModelResolver (#1787)
ackintosh Jan 1, 2019
ccca139
Refactor InlineModelResolver (#1788)
ackintosh Jan 2, 2019
3263e76
[gradle-plugin] Fix test, ensure tests run in CI (#1789)
jimschubert Jan 2, 2019
d1cbe07
Fix Shippable CI (#1799)
wing328 Jan 3, 2019
f63a2ce
Add process utils class to add index to properties (#1796)
wing328 Jan 3, 2019
83fe9be
remove unnecessary words from migration-from-swagger-codegen.md (#1791)
tomer Jan 3, 2019
1b70194
Add GenFlow to the company/project list
wing328 Jan 3, 2019
914c8fd
Add GenFlow to the company/project list (#1806)
wing328 Jan 3, 2019
c375291
Change renamed user @trenneman to @eriktim (#1809)
eriktim Jan 4, 2019
92afe66
Fix various typos in the templates (Ruby, C#) (#1803)
wing328 Jan 5, 2019
64f95f5
[Slim] Add ApiKey and OAuth authentication middleware (#1207)
ybelenko Jan 5, 2019
ad0e813
[java][webclient] Register Jackson modules on ObjectMapper (#911)
marcoreni Jan 5, 2019
349debe
[C#][Refactor] Fix nullable required property in the constructor (#1819)
wing328 Jan 5, 2019
d330a3f
Update Elixir technical committee
wing328 Jan 5, 2019
55420b7
Fix security issue with dependencies (#1820)
wing328 Jan 5, 2019
aae65d6
Add test cases for ExampleGenerator (#1802)
ackintosh Jan 6, 2019
5b1907d
use 4-space instead of tab in perl templates (#1830)
wing328 Jan 6, 2019
9cdec2a
Emit worker also in response signal (#1829)
etherealjoy Jan 6, 2019
3d9e875
Fix missing const keyword in array and maps (#1828)
etherealjoy Jan 6, 2019
07c1cdb
Update base class due to failed compilation in case of plain object t…
etherealjoy Jan 6, 2019
f58fc21
Use JS ES6 as the default (#1825)
wing328 Jan 7, 2019
326771d
[JavaScript] Added plugins variable for the javascript/ES6 client (#1…
sredbull Jan 7, 2019
8fd8e1d
Added proper error response (#1814)
sredbull Jan 7, 2019
587a8eb
deprecated initialCaps (#1821)
wing328 Jan 7, 2019
3b4b165
restore c test
wing328 Jan 7, 2019
1a7081b
Delete langs command (#1836)
ackintosh Jan 7, 2019
ae3975c
Add a link to @watiko article
wing328 Jan 7, 2019
375be5b
Add links to articles about openapi generator
wing328 Jan 7, 2019
ff4df8b
better error message when parameter ref not defined (#1837)
wing328 Jan 7, 2019
e916f8c
[C] Support for authentication methods (#1628)
zhemant Jan 7, 2019
8a1aa0f
better handle of oauth (#1838)
wing328 Jan 7, 2019
a88e4e7
fix unqiue name in handling forward slash (#1839)
wing328 Jan 7, 2019
832d17f
add options to maven plugin (#1845)
wing328 Jan 8, 2019
b3a97b6
[DART] fix: set fields to null if json value is null. (#1798)
d3v-cl Jan 8, 2019
3002d00
Minor Angular type improvements (#1843)
FallenRiteMonk Jan 8, 2019
4ba1d52
Add additional properties to Java CodegenModel (#1854)
demonfiddler Jan 9, 2019
637d60d
Better support for composed schema (allOf) (#1842)
wing328 Jan 9, 2019
fd12cf3
fix: force to decode as utf-8 when header contains application/json t…
cimadai Jan 9, 2019
22593df
[python-client] Add model default values (#1776)
spacether Jan 9, 2019
cbcf36e
Merge remote-tracking branch 'origin/restore_c_test'
wing328 Jan 9, 2019
5392f85
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
wing328 Jan 9, 2019
5c9eb4d
add isModel to updatebooleanflagwithcodegenproperty (#1844)
zhemant Jan 9, 2019
2088cfb
update samples
wing328 Jan 9, 2019
5c1fdfe
Fix typo in template (#1859)
etherealjoy Jan 9, 2019
e548d80
Add a checklist to issue report (#1851)
wing328 Jan 9, 2019
e0af72d
add new sample files
wing328 Jan 9, 2019
43fa7ca
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
wing328 Jan 9, 2019
7cea366
Support for "x-enum-descriptions" (#1752)
jmini Jan 9, 2019
a867fc5
[BUG-1848] Remove redundant right parenthesis (#1864)
Jan 9, 2019
175f1cd
[java-client][okhttp-gson] no oauth2 usage when hasOAuthMethods is fa…
jmini Jan 10, 2019
f5ea8da
[gradle] Add 4 boolean properties supported by codegenConfigurator (#…
jimschubert Jan 11, 2019
7f337f6
Python: Update api_doc_example for multiple auth (#1870)
cognifloyd Jan 11, 2019
7476550
Fix a problem that points to a folder that doesn't exist (#1863)
ackintosh Jan 11, 2019
2172cc2
Python AIOHTTP server generator (#1470)
Jyhess Jan 11, 2019
f3a2aae
Add links to Patreon account (#1887)
wing328 Jan 12, 2019
93b8206
better NPE handling for undefined request body (#1896)
wing328 Jan 13, 2019
d3ac31e
Update issue checklist with an item to validate the input
wing328 Jan 13, 2019
346e968
Add a link to @ky-yk-d article (#1903)
KomaKomaD Jan 14, 2019
4b22f37
Fix missing RequestBody.required of inline request body (#1847)
ackintosh Jan 14, 2019
0cd1469
Remove unnecessary override (#1906)
ackintosh Jan 14, 2019
ff2fd44
Add more patreon links
wing328 Jan 14, 2019
2c4ab38
Clean up file output handling (#1895)
jimschubert Jan 14, 2019
0dce502
Add Jyhess as the python aiohttp creator
wing328 Jan 14, 2019
dcaaeac
Update Readme for qt5 server (#1912)
etherealjoy Jan 15, 2019
7a3c918
Rename graphql-server to graphql-nodejs-express-server (#1822)
wing328 Jan 15, 2019
c8f21e8
Add primitive type support (#1835)
ackintosh Jan 16, 2019
f0e04d1
Fixed a small type (#1921)
sharkwouter Jan 16, 2019
f4c4117
[JAVA][JAX-RS] don't forget to support @JsonValue for enum (#1833)
fuj1g0n Jan 16, 2019
b671edf
[TypeScript-Node] support setting the content-type header per-call (#…
silasbw Jan 16, 2019
f22ecf1
Update Maven plugin README with new options (#1917)
wing328 Jan 16, 2019
4188e23
[BUG][typescript-node] Generated package causes compilation errors (#…
na-o-ys Jan 16, 2019
65c0d4c
Update README with FormAPI.io service (#1923)
ndbroadbent Jan 16, 2019
f6a686c
fixing wrong model file suffix when identical with model suffix (#1876)
daniel-sc Jan 16, 2019
519bcf1
[Java] Update okhttp version to the latest (#1897)
wing328 Jan 16, 2019
41b51f9
Add Prometheus/Alertmanager to README users list (#1926)
mxinden Jan 16, 2019
f323f3b
use openjdk in shippable (#1929)
wing328 Jan 17, 2019
43b2072
Add @Jyhess to Python tech committee
wing328 Jan 17, 2019
875a977
Add BIMData.io to company list
wing328 Jan 17, 2019
87ccff9
Fixing response headers so that the values are turned into a comma de…
gbrown-ce Jan 18, 2019
7286ec2
Fix missing __init__.py (#1933)
Jyhess Jan 18, 2019
c02c5b9
update csharp samples
wing328 Jan 18, 2019
d7a6e86
[Swagger-Parser] Update to version 2.0.8-OpenAPITools.org-2 (#1924)
jmini Jan 18, 2019
9d6fdfe
[feat][docs][website] Initial docusaurus based site (#1770)
jimschubert Jan 18, 2019
bf5345d
update docs
wing328 Jan 18, 2019
b4451d6
SCM and license parameters are now also for resteasy clients availabl…
eddyhub Jan 20, 2019
dc92cfd
[html] Use ModelUtils to avoid NullPointerException (#1948)
jmini Jan 20, 2019
376dbef
update java default value (#1949)
wing328 Jan 20, 2019
c3fa68f
update base url to website
wing328 Jan 21, 2019
1ef8771
fix image urls
wing328 Jan 21, 2019
a4720ef
minor update to the website (#1952)
wing328 Jan 21, 2019
14ab434
Update Unblu Logo (#1954)
jmini Jan 21, 2019
d307095
[java-jaxrs] Add Javadoc to enum (x-enum-descriptions) (#1951)
jmini Jan 21, 2019
163eeb6
add new generator: typescript-rxjs (#1884)
denyo Jan 21, 2019
a4d53ec
Update website URL
wing328 Jan 22, 2019
3279795
[website] Fix user link images (#1956)
jimschubert Jan 22, 2019
2eb7a32
In case of a Integer Enum, add N-prefix, because Ruby does not allow …
UkuLoskit Jan 22, 2019
acede1f
update samples and docs
wing328 Jan 22, 2019
08f14f2
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
wing328 Jan 22, 2019
7083f13
Add Xero to company list (#1950)
wing328 Jan 22, 2019
f9bba4c
add cname, ga id, remove readme (#1958)
wing328 Jan 22, 2019
ad6c003
Update README.md (#1959)
inska Jan 22, 2019
b3c622b
Add migration note about change in basePath (#1957)
wing328 Jan 22, 2019
12caf01
fix link to online docs (#1960)
macjohnny Jan 22, 2019
562d9d5
update link to maven jar download to 3.3.4 (#1962)
macjohnny Jan 22, 2019
93588f4
Fix C# discriminator's mapping name (#1942)
wing328 Jan 23, 2019
09d5e41
Add https://www.codecentric.de/ to company list (#1967)
wing328 Jan 23, 2019
0920b5a
Update README.md (#1971)
pmundt Jan 24, 2019
f90aea5
Add multiple servers support to PHP client (#1964)
wing328 Jan 24, 2019
02bcf9b
jaz-ah to remain in the technical committee only
wing328 Jan 24, 2019
025d452
[DART2]: fix Map<String, nativeType> fromJson (#1936)
d3v-cl Jan 25, 2019
1775b66
Fix customized source folder in Java client (#1978)
wing328 Jan 25, 2019
9110ff7
[Spec] adds XmlItem model and route for xml testing (#1883)
spacether Jan 26, 2019
bd23fd9
Bugfix/rheaders (#1965)
jokedurnez Jan 26, 2019
23bc2ba
[lua] Allow connection on port != 80 or 443 (#1712)
gfeun Jan 26, 2019
7e91a6a
update samples
wing328 Jan 26, 2019
2cbae47
[Slim] Update Readme (#1995)
ybelenko Jan 27, 2019
94b4ad0
fix index, add test case in php client (#1994)
wing328 Jan 27, 2019
baabe69
fix index check, add test cases (#1993)
wing328 Jan 27, 2019
a9446e2
[Java] Generate OAuth related files only if OAuth security schema is …
wing328 Jan 28, 2019
c7115fb
Add multiple servers support to Python client (#1969)
wing328 Jan 28, 2019
9d6cbff
added bearer authentication to typescript-angular package (#1986)
MBcom Jan 28, 2019
041c2b4
[core] cleanup: remove OpenAPI parameter from CodegenConfig methods (…
jmini Jan 28, 2019
c0a0578
Add multiple servers support to JS API client (#1974)
wing328 Jan 29, 2019
65d3371
update CXF and Jackson to latest version (#2017)
deki Jan 29, 2019
ba833d3
Document 'x-enum-descriptions' and 'x-enum-varnames' (#2010)
jmini Jan 29, 2019
d2c99e7
[core] Handle referenced enum case correctly (#2001)
jmini Jan 30, 2019
75fd026
[PHP][php-ze-ph] Support for PHP 7.1+, Zend Expressive 3.2 and PathHa…
Articus Jan 30, 2019
cbdf137
Add Bearer authentication support to Python client (#1999)
wing328 Jan 30, 2019
f329509
update php ze-ph samples
wing328 Jan 31, 2019
4afc9fa
update php ze-ph samples
wing328 Jan 31, 2019
72c124f
[C++][Client][C++ Rest SDK] Fix path parameters with format (#1987)
Peaches491 Jan 31, 2019
9240b65
Add Bearer authentication support to JS client (#2020)
wing328 Jan 31, 2019
22b5b90
Add Bearer authentication to PHP API client (#2013)
wing328 Jan 31, 2019
9c4d32e
4.0.0-beta2 release (#2036)
jmini Jan 31, 2019
e66be59
Set version to 4.0.0-SNAPSHOT
jmini Jan 31, 2019
45218c0
Rust reqwest improve (#1890)
bcourtine Feb 1, 2019
96d02d7
Making completion work with openapi-generator-cli or openapi-generato…
djpadz Feb 2, 2019
b73e272
Add a link to the presentation by @ackintosh at Gunma.web (#2047)
ackintosh Feb 3, 2019
0532699
Enable serialization of non-null negative values (array, false, etc) …
mvehar Feb 4, 2019
b1f0127
add methods to name interface (#2046)
wing328 Feb 4, 2019
39ab0ea
Fix isFreeFormObject check for allOf, oneOf, anyOf (#2044)
wing328 Feb 4, 2019
19b1723
add servers to path, operation (#2048)
wing328 Feb 5, 2019
066713b
Add .gitattributes file to 'vendor' mustache templates (#1980)
MikeRalphson Feb 6, 2019
80b15a8
[Ruby] Use double-quote string to enable string interpolation (#2067)…
autopp Feb 6, 2019
258e09d
Use actual value of generateSourceCodeOnly in python generator. (#2015)
svenpanne Feb 6, 2019
744239c
Request to run `./bin/openapi3/{LANG}-petstore.sh` and `./bin/openapi…
autopp Feb 7, 2019
7f86867
Update openapi-generator-cli.sh (#2065)
artheus Feb 7, 2019
f36643c
[TypescriptAngular] gets package npm version from API specification (…
pablolazaro Feb 7, 2019
6a93ff6
[JAVA] fix outdated windows script for test templates (#2091)
karismann Feb 8, 2019
bfab6d9
fix JS default ot ES6 (#2084)
wing328 Feb 8, 2019
392d14b
[Python] Add "servers" support in path, operation (#2052)
wing328 Feb 8, 2019
d21b8ef
Remove localVarPrefix from Java client (#2045)
wing328 Feb 8, 2019
c99ecd9
[angular-typescript] Wrong Typescript Version for Angular 6 with Npm …
karismann Feb 8, 2019
29ad76a
[python-flask] [python-aiohttp] [bug] Fixed handling of dotted module…
svenpanne Feb 8, 2019
65132a9
[Python] handle nullable parameters with None added to allowed_values…
Feb 9, 2019
a6a6077
Add `controller.service_arguments` tag to controllers to make them pu…
ossinkine Feb 9, 2019
9113b0f
Add "servers" support to operation, path in the JS client (#2060)
wing328 Feb 9, 2019
4fd02b9
fix 457 Support for Bearer Auth (#1930)
davidwcarlson Feb 9, 2019
4786a47
Add "servers" support to the operation, path in PHP API client (#2072)
wing328 Feb 9, 2019
4f2496f
[PHP] remove deprecated options (#2083)
wing328 Feb 10, 2019
58962ba
[Ruby] Fix Ruby client to prevent Rubocop's rule violations (#2100) (…
autopp Feb 10, 2019
ecac5c6
Add @autopp to Ruby technical committee (#2103)
ackintosh Feb 10, 2019
f2636ea
update php oas3 samples
wing328 Feb 10, 2019
23a19c7
Fix Bug 1433 decimal literal in C# maybe other languages (#1436)
Feb 10, 2019
05d23a7
Catch serializer exception (#2074)
ossinkine Feb 10, 2019
3c3d9f8
Don't escape [ and ] in query param keys (#2107)
BastiOfBerlin Feb 11, 2019
ec9efbb
Fix JMSSerializerBundle version (#2057)
ossinkine Feb 11, 2019
1887430
[Ruby] Fix enum expansion in Ruby client (#2081) (#2104)
autopp Feb 11, 2019
3ef0eb3
update ts angular 2 samples
wing328 Feb 11, 2019
3cb7677
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
wing328 Feb 11, 2019
e9d504e
Fixed handling of dotted module names in python generator. (#2016)
svenpanne Feb 12, 2019
c217a9e
[clean-up] Centralize Swagger-Parser calls in the unit tests (#2110)
jmini Feb 12, 2019
7ec04f3
[PHP] Replace File.seperator with slashes in PHP projects #2004 (#2007)
jfastnacht Feb 12, 2019
3957341
[typescript-angular] Incorrect OperationId Generated (starting with n…
karismann Feb 12, 2019
a6c40cc
[core] Fix NullPointer when schema is not set in header (#2133)
jmini Feb 12, 2019
67ba9e5
[Rust][Client] Code format (#2042)
bcourtine Feb 13, 2019
0edf511
[core] consider schema in headers when computing unused schemas (#2138)
jmini Feb 13, 2019
531a1d9
Typescript+Axios: multipart/form-data correctly handled (#2002)
mvniekerk Feb 13, 2019
aa86f74
Revert "Don't escape [ and ] in query param keys (#2107)" (#2128)
macjohnny Feb 13, 2019
29afa98
#2147: fix compiler error in angular typescript codegen (#2149)
macjohnny Feb 14, 2019
da08c72
Validate input objects (#2144)
ossinkine Feb 14, 2019
1f0c003
Use Symfony Validator service (#2143)
ossinkine Feb 14, 2019
50629cb
Don't try to detect response format if method return nothing (#2073)
ossinkine Feb 14, 2019
de289c9
Issue 1766 Modified mustache files for Go to support nullable in the …
alex-korobko Feb 15, 2019
62d8451
openapi-generator-cli.sh: Fix missing single quote (#2160)
geropl Feb 15, 2019
cc68d90
[rust-server] Changed query parameters to be url encoded (#2136)
Feb 15, 2019
ae19785
[plugin][maven] add missing General Configuration parameters in READM…
karismann Feb 17, 2019
8d639e9
Fix failing build due to deprecation of initialCaps (#2168)
etherealjoy Feb 17, 2019
1b0b18e
update ruby petstore samples
wing328 Feb 17, 2019
7f61363
[typescript-angular] Update default Angular version from 4.3 to 7.0 (…
karismann Feb 18, 2019
315d89d
[Java] adds snapshotVersion CLI option and uses API version as artifa…
pablolazaro Feb 18, 2019
e418331
[Java] Getter/Setter naming convention not followed in generated mode…
karismann Feb 18, 2019
c14ca64
[rust-server] Added client documentation to rust-server (#2159)
Feb 18, 2019
8defce0
[kotlin][client] bytearray conversion (#2166)
alexnavratil Feb 18, 2019
846c8fd
[Ruby] Fix regualr expression in error message (#2069) (#2139)
autopp Feb 18, 2019
d680d18
okhttp-gson: allow array parameters in path using collectionFormat (#…
jacobweber Feb 18, 2019
019cde7
changed the package install instructions to install the .tgz package …
MBcom Feb 18, 2019
c944233
Remove API Key Authentication code for go when cookie is used. (#1601)
dmascialino Feb 18, 2019
91074b2
update kotline samples
wing328 Feb 18, 2019
866ea08
Merge branch 'master' of https://github.com/OpenAPITools/openapi-gene…
wing328 Feb 18, 2019
7c8620a
Merge branch 'master' of https://github.com/ihsmarkitoss/openapi-gene…
A-Joshi Feb 27, 2019
b5886e8
Merge remote-tracking branch 'upstream/master'
A-Joshi Feb 27, 2019
b41e28c
Merge remote-tracking branch 'upstream/master'
A-Joshi Mar 3, 2019
abf0fd3
Merge remote-tracking branch 'upstream/master'
A-Joshi Mar 3, 2019
7983576
Merge remote-tracking branch 'upstream/master'
A-Joshi Mar 8, 2019
97b1576
Merge remote-tracking branch 'upstream/master'
A-Joshi Mar 11, 2019
3b2c605
Merge remote-tracking branch 'upstream/master'
A-Joshi Mar 12, 2019
51068d7
Merge remote-tracking branch 'upstream/master'
A-Joshi Mar 12, 2019
b3153ed
Add optvalue to CliOption
A-Joshi Mar 13, 2019
ec372e1
Use CliOption for classModifier, OperationModifier and buildTarget
A-Joshi Mar 13, 2019
928db6b
Allow for ASP.NET core 2.2
A-Joshi Mar 13, 2019
b1ab351
Put semicolon for abstract method on function declaration
A-Joshi Mar 13, 2019
3d5759f
Update documentation
A-Joshi Mar 13, 2019
9ea9652
Rearrange code to ease reading
A-Joshi Mar 13, 2019
b795913
Warn when values are forced due to other settings
A-Joshi Mar 13, 2019
c9cd072
Merge remote-tracking branch 'upstream/master'
A-Joshi Mar 14, 2019
661607f
Add optvalue to CliOption
A-Joshi Mar 13, 2019
c59e329
Use CliOption for classModifier, OperationModifier and buildTarget
A-Joshi Mar 13, 2019
f24d679
Allow for ASP.NET core 2.2
A-Joshi Mar 13, 2019
ccb57d4
Put semicolon for abstract method on function declaration
A-Joshi Mar 13, 2019
a37c20b
Update documentation
A-Joshi Mar 13, 2019
8e66269
Rearrange code to ease reading
A-Joshi Mar 13, 2019
7528f95
Warn when values are forced due to other settings
A-Joshi Mar 13, 2019
27b1ba8
Merge branch 'feature/aspnetcore_async' of https://github.com/ihsmark…
A-Joshi Mar 14, 2019
5625140
Update docs
A-Joshi Mar 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/generators/aspnetcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ sidebar_label: aspnetcore
|packageVersion|C# package version.| |1.0.0|
|packageGuid|The GUID that will be associated with the C# project| |null|
|sourceFolder|source folder for generated code| |src|
|aspnetCoreVersion|ASP.NET Core version: 2.1 (default), 2.0 (deprecated)| |2.1|
|aspnetCoreVersion|ASP.NET Core version: 2.2 (default), 2.1, 2.0 (deprecated)| |2.2|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
|useCollection|Deserialize array types to Collection&lt;T&gt; instead of List&lt;T&gt;.| |false|
|returnICollection|Return ICollection&lt;T&gt; instead of the concrete type.| |false|
|useSwashbuckle|Uses the Swashbuckle.AspNetCore NuGet package for documentation.| |true|
|classModifier|Class modifiers such as abstract or partial| ||
|operationModifier|Operation modifiers such as virtual or abstract.| |virtual|
|classModifier|Class Modifier can be empty, abstract| ||
|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual|
|buildTarget|Target to build an application or library| |program|
|generateBody|Generates method body.| |true|
|buildTarget|Target the build for a program or library.| |program|
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class CliOption {
private String description;
private String type;
private String defaultValue;
private String optValue;
private Map<String, String> enumValues;

public CliOption(String opt, String description) {
Expand Down Expand Up @@ -73,6 +74,15 @@ public CliOption defaultValue(String defaultValue) {
return this;
}

public String getOptValue() { return this.optValue;}
public void setOptValue(String optValue) {
if (this.enumValues!=null && this.enumValues.containsKey(optValue)) {
this.optValue = optValue;
} else {
this.optValue = null;
}
}

public CliOption addEnum(String value, String description) {
if (this.enumValues == null) {
this.enumValues = new LinkedHashMap<String, String>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@

import com.samskivert.mustache.Mustache;
import io.swagger.v3.oas.models.OpenAPI;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenType;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.*;
import org.openapitools.codegen.utils.URLPathUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -56,12 +53,11 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
private boolean useSwashbuckle = true;
protected int serverPort = 8080;
protected String serverHost = "0.0.0.0";
protected String aspnetCoreVersion= "2.1"; // default to 2.1
// TODO Make next two enums toensure fixed list.
private String classModifier = "";
private String operationModifier = "virtual";
protected CliOption aspnetCoreVersion= new CliOption(ASPNET_CORE_VERSION,"ASP.NET Core version: 2.2 (default), 2.1, 2.0 (deprecated)");; // default to 2.1
private CliOption classModifier = new CliOption(CLASS_MODIFIER,"Class Modifier can be empty, abstract");
private CliOption operationModifier = new CliOption(OPERATION_MODIFIER, "Operation Modifier can be virtual, abstract or partial");
private boolean generateBody = true;
private String buildTarget = "program";
private CliOption buildTarget = new CliOption("buildTarget", "Target to build an application or library");
private String projectSdk = SDK_WEB;

public AspNetCoreServerCodegen() {
Expand Down Expand Up @@ -119,9 +115,12 @@ public AspNetCoreServerCodegen() {
CodegenConstants.SOURCE_FOLDER_DESC,
sourceFolder);

addOption(ASPNET_CORE_VERSION,
"ASP.NET Core version: 2.1 (default), 2.0 (deprecated)",
aspnetCoreVersion);
aspnetCoreVersion.addEnum("2.0", "ASP.NET COre V2.0");
aspnetCoreVersion.addEnum("2.1", "ASP.NET COre V2.1");
aspnetCoreVersion.addEnum("2.2", "ASP.NET COre V2.2");
aspnetCoreVersion.setDefault("2.2");
aspnetCoreVersion.setOptValue(aspnetCoreVersion.getDefault());
addOption(aspnetCoreVersion.getOpt(),aspnetCoreVersion.getDescription(),aspnetCoreVersion.getOptValue());

// CLI Switches
addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG,
Expand All @@ -144,22 +143,28 @@ public AspNetCoreServerCodegen() {
"Uses the Swashbuckle.AspNetCore NuGet package for documentation.",
useSwashbuckle);

addOption(CLASS_MODIFIER,
"Class modifiers such as abstract or partial",
classModifier);
classModifier.addEnum("", "Keep class default with no modifier");
classModifier.addEnum("abstract", "Make class abstract");
classModifier.setDefault("");
classModifier.setOptValue(classModifier.getDefault());
addOption(classModifier.getOpt(),classModifier.getDescription(),classModifier.getOptValue());

addOption(OPERATION_MODIFIER,
"Operation modifiers such as virtual or abstract.",
operationModifier);
operationModifier.addEnum("virtual", "Keep method virtual ");
operationModifier.addEnum("abstract", "Make method abstract");
operationModifier.setDefault("virtual");
operationModifier.setOptValue(operationModifier.getDefault());
addOption(operationModifier.getOpt(),operationModifier.getDescription(),operationModifier.getOptValue());

buildTarget.addEnum("program", "Generate code for standalone server");
buildTarget.addEnum("library", "Generate code for a server abstract class lbrary");
buildTarget.setDefault("program");
buildTarget.setOptValue(buildTarget.getDefault());
addOption(buildTarget.getOpt(),buildTarget.getDescription(),buildTarget.getOptValue());

addSwitch(GENERATE_BODY,
"Generates method body.",
generateBody);

addOption(BUILD_TARGET,
"Target the build for a program or library.",
buildTarget);

}

@Override
Expand Down Expand Up @@ -201,53 +206,15 @@ public void processOpts() {
additionalProperties.put(USE_SWASHBUCKLE, useSwashbuckle);
}

// determine the ASP.NET core version setting
if (additionalProperties.containsKey(ASPNET_CORE_VERSION)) {
setAspnetCoreVersion((String) additionalProperties.get(ASPNET_CORE_VERSION));
}

// CHeck for class modifier if not present set the default value.
if (additionalProperties.containsKey(CLASS_MODIFIER)) {
classModifier = additionalProperties.get(CLASS_MODIFIER).toString();
} else {
additionalProperties.put(CLASS_MODIFIER, classModifier);
}

// TODO Validate modifier values
// If class modifierier is abstract then the methods need to be abstrat too.
if ("abstract".equals(classModifier)) {
operationModifier = classModifier;
additionalProperties.put(OPERATION_MODIFIER, operationModifier);
}

if (additionalProperties.containsKey(OPERATION_MODIFIER)) {
operationModifier = additionalProperties.get(OPERATION_MODIFIER).toString();
} else {
additionalProperties.put(OPERATION_MODIFIER, operationModifier);
}
// CHeck for the modifiers etc.
// The order of the checks is important.
isLibrary = setBuildTarget();
setClassModifier();
setOperationModifier();

// TODO Validate modifier values
// If operation modifier is abstract then dont generate any body
if ("abstract".equals(operationModifier)) {
generateBody = false;
additionalProperties.put(GENERATE_BODY, generateBody);
}
if (additionalProperties.containsKey(GENERATE_BODY)) {
generateBody = convertPropertyToBooleanAndWriteBack(GENERATE_BODY);
} else {
additionalProperties.put(GENERATE_BODY, generateBody);
}

// CHeck for class modifier if not present set the default value.
if (additionalProperties.containsKey(BUILD_TARGET)) {
buildTarget = additionalProperties.get(BUILD_TARGET).toString();
} else {
additionalProperties.put(BUILD_TARGET, buildTarget);
}
if ("library".equals(buildTarget)) {
isLibrary = true;
projectSdk = SDK_LIB;
}
additionalProperties.put(PROJECT_SDK, projectSdk);

additionalProperties.put("dockerTag", packageName.toLowerCase(Locale.ROOT));
Expand All @@ -257,17 +224,8 @@ public void processOpts() {

String packageFolder = sourceFolder + File.separator + packageName;

if ("2.0".equals(aspnetCoreVersion)) {
embeddedTemplateDir = templateDir = "aspnetcore/2.0";
supportingFiles.add(new SupportingFile("web.config", packageFolder, "web.config"));
LOGGER.info("ASP.NET core version: 2.0");
} else if ("2.1".equals(aspnetCoreVersion)) {
// default, do nothing
LOGGER.info("ASP.NET core version: 2.1");
} else {
throw new IllegalArgumentException("aspnetCoreVersion must be '2.1', '2.0' but found " + aspnetCoreVersion);
}

// determine the ASP.NET core version setting
setAspnetCoreVersion(packageFolder);

supportingFiles.add(new SupportingFile("build.sh.mustache", "", "build.sh"));
supportingFiles.add(new SupportingFile("build.bat.mustache", "", "build.bat"));
Expand Down Expand Up @@ -328,10 +286,6 @@ public void setPackageGuid(String packageGuid) {
this.packageGuid = packageGuid;
}

public void setAspnetCoreVersion(String aspnetCoreVersion) {
this.aspnetCoreVersion= aspnetCoreVersion;
}

@Override
public String apiFileFolder() {
return outputFolder + File.separator + sourceFolder + File.separator + packageName + File.separator + "Controllers";
Expand Down Expand Up @@ -375,4 +329,69 @@ public Mustache.Compiler processCompiler(Mustache.Compiler compiler) {
public String toRegularExpression(String pattern) {
return escapeText(pattern);
}

private void setCliOption(CliOption cliOption) throws IllegalArgumentException {
if (additionalProperties.containsKey(cliOption.getOpt())) {
cliOption.setOptValue(additionalProperties.get(cliOption.getOpt()).toString());
if (classModifier.getOptValue() == null) {
cliOption.setOptValue(cliOption.getDefault());
throw new IllegalArgumentException(cliOption.getOpt() + ": Invalid value '" + additionalProperties.get(cliOption.getOpt()).toString() + "'" +
". " + cliOption.getDescription());
}
} else {
additionalProperties.put(cliOption.getOpt(), cliOption.getOptValue());
}
}

private void setClassModifier() {
// CHeck for class modifier if not present set the default value.
setCliOption(classModifier);

// If class modifier is abstract then the methods need to be abstract too.
if ("abstract".equals(classModifier.getOptValue())) {
operationModifier.setOptValue(classModifier.getOptValue());
additionalProperties.put(OPERATION_MODIFIER, operationModifier.getOptValue());
LOGGER.warn("classModifier is " + classModifier.getOptValue() + " so forcing operatonModifier to "+ operationModifier.getOptValue());
} else {
setCliOption(operationModifier);
}
}

private void setOperationModifier() {
setCliOption(operationModifier);

// If operation modifier is abstract then dont generate any body
if ("abstract".equals(operationModifier.getOptValue())) {
generateBody = false;
additionalProperties.put(GENERATE_BODY, generateBody);
LOGGER.warn("operationModifier is " + operationModifier.getOptValue() + " so forcing generateBody to "+ generateBody);
} else if (additionalProperties.containsKey(GENERATE_BODY)) {
generateBody = convertPropertyToBooleanAndWriteBack(GENERATE_BODY);
} else {
additionalProperties.put(GENERATE_BODY, generateBody);
}
}

private boolean setBuildTarget() {
boolean isLibrary = false;
setCliOption(buildTarget);
if ("library".equals(buildTarget)) {
isLibrary = true;
projectSdk = SDK_LIB;
additionalProperties.put(CLASS_MODIFIER, "abstract");
}
return isLibrary;
}

private void setAspnetCoreVersion(String packageFolder) {
setCliOption(aspnetCoreVersion);
if ("2.0".equals(aspnetCoreVersion.getOptValue())) {
embeddedTemplateDir = templateDir = "aspnetcore/2.0";
supportingFiles.add(new SupportingFile("web.config", packageFolder, "web.config"));
LOGGER.info("ASP.NET core version: 2.0");
} else {
// default, do nothing
LOGGER.info("ASP.NET core version: " + aspnetCoreVersion.getOptValue());
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/dotnet:2.1-sdk AS build-env
FROM microsoft/dotnet:{{aspnetCoreVersion}}-sdk AS build-env
WORKDIR /app

ENV DOTNET_CLI_TELEMETRY_OPTOUT 1
Expand All @@ -12,7 +12,7 @@ COPY . ./
RUN dotnet publish -c Release -o out

# build runtime image
FROM microsoft/dotnet:2.1-aspnetcore-runtime
FROM microsoft/dotnet:{{aspnetCoreVersion}}-aspnetcore-runtime
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "{{packageName}}.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>{{packageName}}</Description>
<Copyright>{{packageName}}</Copyright>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp{{aspnetCoreVersion}}</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>{{packageName}}</AssemblyName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace {{packageName}}
// Add framework services.
services
.AddMvc()
.SetCompatibilityVersion (CompatibilityVersion.Version_2_1)
.SetCompatibilityVersion ((String.Compare("2.1","{{aspnetCoreVersion}}") == 0)?CompatibilityVersion.Version_2_1:CompatibilityVersion.Version_2_2)
.AddJsonOptions(opts =>
{
opts.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace {{packageName}}.Controllers
[ValidateModelState]{{#useSwashbuckle}}
[SwaggerOperation("{{operationId}}")]{{#responses}}{{#dataType}}
[SwaggerResponse(statusCode: {{code}}, type: typeof({{&dataType}}), description: "{{message}}")]{{/dataType}}{{^dataType}}{{/dataType}}{{/responses}}{{/useSwashbuckle}}
public {{operationModifier}} IActionResult {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
public {{operationModifier}} IActionResult {{operationId}}({{#allParams}}{{>pathParam}}{{>queryParam}}{{>bodyParam}}{{>formParam}}{{>headerParam}}{{#hasMore}}, {{/hasMore}}{{/allParams}}){{^generateBody}};{{/generateBody}}
{{#generateBody}}
{ {{#responses}}
{{#dataType}}
Expand All @@ -51,9 +51,6 @@ namespace {{packageName}}.Controllers
throw new NotImplementedException();{{/returnType}}
}
{{/generateBody}}
{{^generateBody}}
;
{{/generateBody}}
{{/operation}}
}
{{/operations}}
Expand Down