Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Clean up file output handling (#1895)
* Clean up file output handling

This attempts to normalize all generators to use OS agnostic
File.separator.

It also cleans up some areas in code where we replace "." in full file
output path with File.separator. We should only be modifying directory
names we own, and should avoid modifying anything that can be provided
by a user.

It would probably be better to use Paths.get(…).toString() in all cases.

* Fix missed path separators in java codegen

* Adjust Java codegen path replacements

* Convert / in full path replacements, as / is forbidden in Windows, and noop elsewhere

* Use Paths.get where files are written, to better handle Windows path constraints
  • Loading branch information
jimschubert authored and wing328 committed Jan 14, 2019
commit 2c4ab38d321ca0a42b431070dacf73013e3fc08a
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;

import static org.apache.commons.lang3.StringUtils.isEmpty;
import static org.apache.commons.lang3.StringUtils.isNotEmpty;
Expand Down Expand Up @@ -65,7 +66,7 @@ public void run() {
generatePlainTextHelp(sb, config);

if (!isEmpty(outputFile)) {
File out = new File(outputFile);
File out = Paths.get(outputFile).toFile();
//noinspection ResultOfMethodCallIgnored
out.mkdirs();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.io.OutputStreamWriter;
import java.io.Reader;
import java.io.Writer;
import java.nio.file.Paths;
import java.util.Scanner;
import java.util.regex.Pattern;

Expand All @@ -40,7 +41,9 @@ public abstract class AbstractGenerator {
@SuppressWarnings("static-method")
public File writeToFile(String filename, String contents) throws IOException {
LOGGER.info("writing file " + filename);
File output = new File(filename);

// Use Paths.get here to normalize path (for Windows file separator, space escaping on Linux/Mac, etc)
File output = Paths.get(filename).toFile();

if (output.getParent() != null && !new File(output.getParent()).exists()) {
File parent = new File(output.getParent());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ public Reader getTemplate(String name) {
}

protected File writeInputStreamToFile(String filename, InputStream in, String templateFile) throws FileNotFoundException, IOException {
File outputFile = new File(filename);
File outputFile = java.nio.file.Paths.get(filename).toFile();
if (in != null) {
OutputStream out = new FileOutputStream(outputFile, false);
LOGGER.info("writing file " + outputFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,32 +536,32 @@ public String escapeReservedWord(String name) {

@Override
public String apiFileFolder() {
return (outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
return (outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
}

@Override
public String apiTestFileFolder() {
return (outputFolder + "/" + testFolder + "/" + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
return (outputFolder + File.separator + testFolder + File.separator + apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
}

@Override
public String modelTestFileFolder() {
return (outputFolder + "/" + testFolder + "/" + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
return (outputFolder + File.separator + testFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
}

@Override
public String modelFileFolder() {
return (outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
return (outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
}

@Override
public String apiDocFileFolder() {
return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
return (outputFolder + File.separator + apiDocPath).replace('/', File.separatorChar);
}

@Override
public String modelDocFileFolder() {
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
return (outputFolder + File.separator + modelDocPath).replace('/', File.separatorChar);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ public String escape(String text) {

@Override
public String apiFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

@Override
public String modelFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ public String escapeReservedWord(String name) {

@Override
public String apiFileFolder() {
return outputFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

@Override
public String modelFileFolder() {
return outputFolder + "/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + modelPackage().replace('.', File.separatorChar);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ public void execute(Template.Fragment fragment, Writer writer) throws IOExceptio

@Override
public String apiFileFolder() {
return outputFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

@Override
public String modelFileFolder() {
return outputFolder + "/model/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + "model" + File.separator + modelPackage().replace('.', File.separatorChar);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ public void execute(Template.Fragment fragment, Writer writer) throws IOExceptio

@Override
public String apiFileFolder() {
return outputFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

@Override
public String modelFileFolder() {
return outputFolder + "/model/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + "model" + File.separator + modelPackage().replace('.', File.separatorChar);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,22 @@ public String escapeReservedWord(String name) {

@Override
public String apiFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

@Override
public String modelFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
}

@Override
public String apiDocFileFolder() {
return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar);
}

@Override
public String modelDocFileFolder() {
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
return outputFolder + File.separator + modelDocPath.replace('/', File.separatorChar);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ public String modelFileFolder() {

@Override
public String apiDocFileFolder() {
return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar);
}

@Override
public String modelDocFileFolder() {
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
return outputFolder + File.separator + modelDocPath.replace('/', File.separatorChar);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ public String modelFileFolder() {

@Override
public String apiDocFileFolder() {
return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
return outputFolder + File.separator + apiDocPath.replace('/', File.separatorChar);
}

@Override
public String modelDocFileFolder() {
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
return outputFolder + File.separator + modelDocPath.replace('/', File.separatorChar);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ public String escapeReservedWord(String name) {

@Override
public String apiFileFolder() {
return outputFolder + "/src/Request/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + ("/src/Request/" + apiPackage().replace('.', File.separatorChar)).replace("/", File.separator);
}

@Override
public String modelFileFolder() {
return outputFolder + "/src/Data/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + ("/src/Data/" + modelPackage().replace('.', File.separatorChar)).replace("/", File.separator);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void processOpts() {
//modelPackage = invokerPackage + File.separatorChar + "client" + File.separatorChar + "model";
//apiPackage = invokerPackage + File.separatorChar + "client" + File.separatorChar + "api";

final String invokerFolder = (sourceFolder + File.separator + "src/" + invokerPackage + File.separator).replace(".", File.separator).replace('.', File.separatorChar);
final String invokerFolder = (sourceFolder + File.separator + "src" + File.separator + invokerPackage + File.separator).replace(".", File.separator).replace('.', File.separatorChar);

supportingFiles.add(new SupportingFile("ApiInvoker.as", invokerFolder + "common", "ApiInvoker.as"));
supportingFiles.add(new SupportingFile("ApiUrlHelper.as", invokerFolder + "common", "ApiUrlHelper.as"));
Expand Down Expand Up @@ -193,13 +193,13 @@ public String escapeReservedWord(String name) {

@Override
public String apiFileFolder() {
return (outputFolder + File.separatorChar + sourceFolder + File.separatorChar + "src/"
return outputFolder + File.separatorChar + sourceFolder + File.separatorChar + ("src/"
+ apiPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
}

@Override
public String modelFileFolder() {
return (outputFolder + File.separatorChar + sourceFolder + File.separatorChar + "src/"
return outputFolder + File.separatorChar + sourceFolder + File.separatorChar + ("src/"
+ modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public String escapeReservedWord(String name) {
*/
@Override
public String modelFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
}

/**
Expand All @@ -158,7 +158,7 @@ public String modelFileFolder() {
*/
@Override
public String apiFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ public String escapeReservedWord(String name) {

@Override
public String apiFileFolder() {
return outputFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

public String modelFileFolder() {
return outputFolder + "/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + modelPackage().replace('.', File.separatorChar);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public String escapeReservedWord(String name) {
* instantiated
*/
public String modelFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar);
}

/**
Expand All @@ -223,7 +223,7 @@ public String modelFileFolder() {
*/
@Override
public String apiFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + apiPackage().replace('.', File.separatorChar);
return outputFolder + File.separator + sourceFolder + File.separator + apiPackage().replace('.', File.separatorChar);
}

/**
Expand Down