Commit Graph

11308 Commits

Author SHA1 Message Date
William Cheng
755dfe53de
Better handling of different types in Elm generator (#1100)
* better handling of different types in elm generator

* [elm] Fix toString for special cases
2018-10-01 15:27:10 +08:00
kemokemo
2040050e55 [Golang][go-gin-server] Fixed issue 1122 with workaround (#1141)
[Golang][go-gin-server] Fix path parameter naming
2018-10-01 15:25:14 +08:00
William Cheng
cbc84254c3
rename scala post proessing env variable (#1143) 2018-09-29 21:39:37 +08:00
Antonio Bellezza
8b47984e3c [Scala-Akka] Generate default values for optional model fields (#1119)
* Generate default values for optional model fields in scala-akka

Fix #1118

* Updated akka-client petstore with defaults for optional model fields

* update petstore sample with scalafmt
2018-09-29 21:21:06 +08:00
Erik Timmers
345b7ec7e5
[elm] Major refactoring; add discriminator support (#1104)
* Use the same name for all exposed encoder & decoders;
* Improve imports (limit exposures);
* Add support for OAS3 discriminators;
* Distinct between 0.18 & latest mustache files.
2018-09-29 12:13:04 +02:00
William Cheng
cbddb08468
Add post processing to files generated by Haskell generators (#968)
* add hfmt support (without updating the sample)

* update haskell httpclient samples with hfmt

* add code format option to haskell servant, minor bug fixes

* update code samples with hfmt

* update samples using stylish-haskell

* rename env variable

* update haskell samples with stylish-haskell

* regenerate haskell samples without stylish-haskell

* regenerate haskell servant sample

* update example-app & tests-integration for OAS2 code
2018-09-29 17:21:03 +08:00
William Cheng
f1f7bdd23f
Add nullable support to Python client (#1073)
* add nullable support to python client

* update PR template
2018-09-29 17:01:13 +08:00
Anand Shah
3a71e59e00 fix optional import (#1083) 2018-09-29 16:57:28 +08:00
William Cheng
da8cf01dfa
comment out ts node test (#1142) 2018-09-29 16:38:52 +08:00
William Cheng
e0cbf46041
Add post processing to files generated by TS generators (#1063)
* add file post proess to TS generators

* update ts node petstore with prettier

* update base on feedback
2018-09-29 16:35:24 +08:00
Yuen-Kuei Hsueh
8e57e0d44f fix top-level enum class checking (#1120) 2018-09-28 22:04:41 +08:00
William Cheng
bd71e629a3
Add a link to an article about openap-generator (#1121) 2018-09-26 20:41:12 +08:00
Adam Drakeford
5aad02ed90
Fix for optional and default types (#1107) 2018-09-26 11:48:15 +01:00
William Cheng
70e6e119d1
update dependency (#1116) 2018-09-26 17:30:30 +08:00
William Cheng
4775c630aa
Add myworkout to the company list (#1111) 2018-09-26 11:53:55 +08:00
William Cheng
cd8bf10b74
rename dart env variable for post processing file (#1101) 2018-09-25 17:23:02 +08:00
Jaumard
df61cd9cb3 fix model generator for snake case open api definition (#1076) 2018-09-25 17:22:19 +08:00
William Cheng
e3b26372cd Rename Env variable for Elm post process file (#1094) 2018-09-25 09:29:12 +02:00
William Cheng
8fb3b707a1
Add post processing to files generated by Python generators (#1072)
* add post process file to python generators

* update python samples with yapf

* revert sample change
2018-09-22 11:50:17 +08:00
kemokemo
14de289fc1 [Go] Add a generator for the gin framework (#1048)
* copy from go-server and add go-gin-server generator

* change the templates for the gin

* fix warnings of the golint tool

* fix the path of script

* add samples

* delete unnecessary comments (#1048)

* make the help message more appropriate (#1048)

* fix the link address format (#1048)

* minor improvement
2018-09-22 00:45:32 +08:00
herojan
abb2690ef5 Kotlin spring server codegen improvements (#1070)
* If required and readonly, a field should be optional. This is to allow people to get and easily put back.

* Use list instead of array, use String instead of kotlin.String etc

* Update samples

* code review: fix annotation formatting

* code review: revert change to use listOf
2018-09-21 16:14:50 +01:00
William Cheng
ed1277348d
add logic to handle uuid in elm generator (#1075) 2018-09-21 21:56:44 +08:00
Elliot Lee
bde97b44b9 Update Usage instructions in README (#1071)
Fix #1040
2018-09-21 12:13:23 +08:00
Christophe Bornet
6dc618fa3f Fix flask connexion support (#1066)
Use the dev-2.0 git branch of flask connexion to fix the generator.
This is not ideal but better than a generator not working at all.

Fix #323
2018-09-20 19:48:28 +08:00
Benjamin Gill
c0a6eaab85 Trim trailing '/' from basePathWithoutHost (#967)
* Trim trailing '/' from basePathWithoutHost

Given that the normal use is {{{basePathWithoutHost}}}{{{path}}}.

* Trim trailing '/' from contextPath
2018-09-20 19:33:31 +08:00
William Cheng
29e9f5bda0
add nullable to Ruby client (#1059) 2018-09-20 19:31:47 +08:00
William Cheng
cc6efe01c7
Add file post processing to Ruby generators (#1062)
* add post processing for Ruby file

* move ruby file post process to abstract ruby class

* remove line break
2018-09-20 19:31:31 +08:00
Stephane Carrez
3cacbcb965 #1043 - [Ada] Operation security scopes are ignored when generating the server (#1044)
* [Ada] Operation security scopes are ignored when generating the server (#1043)
- Update fromOperation() to keep the operation required scopes for each auth
  method and store that information in the x-scopes vendor extensions attribute
- Update postProcessOperationsWithModels() to process the operation required
  scopes and build a list of authMethods which only contain the required scopes
  for the operation and store these authMethods in the x-auth-scopes attribute.
- Update postProcessAuthMethod() to handle the logic of filtering and building
  the operation authMethod (new instances are created because we must not
  modify the global authMethod definitions)
- Update the Ada server templates to use the x-auth-scopes instead of authMethods
  Add a URL prefix parameter for the Ada server instantiation

* Fix the Ada server template to use the x-auth-scopes for operation scopes
2018-09-20 19:31:11 +08:00
Kiran-Sivakumar
0e045bee1b [okhttp-gson] Add support for OAuth access token retry (#1058)
* Add support for access token retry in okhttp-gson lib

* Update expected number of generated files in test

* Update samples

* Update security samples

* Fix default user-agent and update samples
2018-09-20 19:29:59 +08:00
William Cheng
1b2f3fbfb6
Fix alias to map response (#1067)
* fix response reference to map

* update samples

* add null check for openapi
2018-09-20 19:29:33 +08:00
William Cheng
340466066c Add file post-processing to Swift 3.x, 4.x generators (#1069)
* update all swift samples

* format swift code with swiftformat

* minor format fix

* rename environment variable
2018-09-20 20:29:25 +09:00
Thomas Hansen
ca9a4a2ff3 PR: Fix error when giving an array as parameter to an endpoint body r… (#1037)
* PR: Fix error when giving an array as parameter to an endpoint body request

* PR #1037 - Fix issue with array as parameter to operation

* update samples

* PHP - ObjectSerializer::sanitizeForSerialization(): manage \stdClass objects properly

* update samples

* bug fix: missing "use" clause

* update samples

* Changes after @ackintosh review

* update samples
2018-09-19 19:58:56 +09:00
Brian Mooney
b7edad5cd0 Issue 1025: Kotlin generator doesn't support inheritance (#1026)
* allVars is duplicating child preoperties when models are inherited. Filter out these duplicates in the KotlinSpringServerCodegen
  * isInherited property was not being populated in the CodegenModel, re-parse the models in the KotlinSpringServerCodegen class and populate the property here
  * Add template support for Kotlin models which require inheritance from a base class to support oneOf declarations in the api yaml
  * Change optional for parameters to use Kotlins nullable
  * Update petstore api with Optional -> Nullable
2018-09-19 11:26:47 +01:00
William Cheng
78fae0ea49
Add nicokoenig to template creator list and TS tech committee (#1056) 2018-09-18 22:47:06 +08:00
Nico König
3027514242 feature: add scaffold for typescript axios template (#892)
* feature: add generator for typescript/axios

* feature: add sample scripts and sample code

* fix: set request body in data property

* feature: add samples and tests for typescript axios client

* test: add tests for typescript axios client
2018-09-18 14:23:52 +08:00
William Cheng
24b234bdbb
Minor improvement to Dart generators (#1042) 2018-09-17 23:18:52 +08:00
manhhavu
9e1dfc0837 [Swift4] Use CodeableHelper's dateformatter in encode() if configured (#984) 2018-09-17 14:27:47 +08:00
Dec12 | Fujigon
5c794a01f8 [Java][Jersey] add @Valid when bean validation is enabled (#1019)
* fix template to add @Valid to POJO fields regarding nest, in java-jersey

* regenerate with for scr in `ls ./bin/*jersey*.sh`; do sh $scr; done

* re-generate with ./bin/openapi3/jaxrs-jersey-petstore.sh

* update api template for jersey1

* re-generate samples

* re-generate samples
2018-09-16 22:36:20 +08:00
Jérémie Bresson
27e343ffef [all] Add leading slash in path if missing (#1034)
* [all] Add leading slash in path if missing

* Fix unit Tests
2018-09-16 16:09:16 +08:00
Vladislav Cheparin
5fc76ba834 [Java][Retrofit2] The part name is not added to the annotation (#1029)
* fixed retrofit2/formParams.mustache

* added play26 to retrofit2-all.sh

* fixed samples
2018-09-16 16:00:38 +08:00
William Cheng
b909656418
fix postProcessFile log message (#1028) 2018-09-15 18:29:30 +08:00
Jérémie Bresson
fe0f2cfad6
[JaxRS-Spec] Fixes in generated pom (#1035)
* build-helper-maven-plugin to add src/gen/java as source folder
* update javax.ws.rs-api to 2.1.1
* add jackson as dependency
2018-09-14 16:59:49 +02:00
William Cheng
04bbd3b0e6
update dart tech committe and template creator (#1038) 2018-09-14 20:49:13 +08:00
ircecho
58e43ceeec [DART2] Maps could not be deserialized in dart 2 (#1007)
* fix[dart2]: due to stronger type checking in dart 2, maps could not be deserialized

* rebuild dart2 petstore
2018-09-14 18:40:37 +08:00
William Cheng
fc35bb17d0
Add option to enable scalafmt for code formatting (#1032)
* add option to enable scalafmt for code formatting

* fix typo
2018-09-14 16:58:27 +08:00
Juan Eugenio Abadie
48e66ed627 Avod use of an empty key value (#991) 2018-09-14 00:56:34 +08:00
William Cheng
29322da2f6
Dart (Jaguar) client generator (#998)
* generator for dart jaguar

* migrate to openapi-generator

* fix locale issue

* add auth generation for dart jaguar

* fix generation of jaguar api with auth (#1009)

* update deps (#1016)

* add CI tests for dart jaguar

* update dart jaguar bin script

* trigger build failure

* Revert "trigger build failure"

This reverts commit a7d8bfd47a93f0903932aeff4afefeb7aa4c5c4a.
2018-09-13 21:39:57 +08:00
Akihito Nakano
9a19a064af
Add a CLI option to control logging level (#1000)
* Add CLI option to control logging level

* Update the property name
2018-09-13 21:54:45 +09:00
William Cheng
95302efdfc
Add option to set Feign version (#1005)
* Add option to set Feign version

* add java feign 9x to CI

* update usage for Play

* fix duplicated artifactId
2018-09-13 10:32:09 +08:00
William Cheng
096ac567ce
Revert "[C++][Restbed] Fix default values for Restbed Server generator" (#1027)
* Revert "[gradle plugin] Support Gradle 4.10 (#1011)"

This reverts commit 131cf94fe4.

* Revert "[C++][Restbed] Fix default values for Restbed Server generator (#761)"

This reverts commit f29ba97e8b.
2018-09-13 09:21:39 +08:00