5759 Commits

Author SHA1 Message Date
William Cheng
08612d8e52
fix string comparison in java pkmst generator (#7050) 2020-07-26 23:14:28 +08:00
k0ral
8d63f75966
[Protobuf] Make it possible to override field index using x-protobuf-index (#7002) 2020-07-26 17:25:35 +08:00
Andrew Kehrig
9bfd9545cc
Add empty checks using hasAuthMethods (#6983)
* Add empty checks using hasAuthMethods

* Add regenerated sample for kotlin multiplatform
2020-07-26 17:10:06 +08:00
QP Hou
dba14f5ac6
[Go] support problem details HTTP API (#6793)
Based on https://tools.ietf.org/html/draft-ietf-appsawg-http-problem-00, the content-type would be `application/problem+json`
2020-07-26 15:36:19 +08:00
patst
468d80be4b
typescript-angular: Angular 10 support (#7037)
* 7036- angular 10 support

* update example files

* fix jersey exmaple file bc of circle ci fail

* add ./ to FILES manually to pass tests
2020-07-24 14:30:58 +02:00
William Cheng
04c41d47a2
[Java][jersey2] fix query parameters in applyToParams (#7028)
* fix query parameters in applyToParams

* update samples
2020-07-24 18:44:15 +08:00
Matthew Davis
9139f91b48
add missing space for flask basic auth header (#7031)
Co-authored-by: Matthew Davis <Matthew.Davis.2@team.telstra.com>
2020-07-24 16:44:50 +08:00
William Cheng
5f8e28a39d
Fix string comparison in Python generator's abstract class (#7030)
* fix string comparison in PythonAbstractConnexionServerCodegen.java

* rename abstract class

* put public first
2020-07-24 16:43:39 +08:00
Ravisankar-Challa
276a983fe8
Add property additionalModelTypeAnnotations on the top of pojo class (#6037) 2020-07-24 12:08:30 +08:00
Alexandre
83f64dbc15
[Swift5] Fix Datetime default value (#7003)
* [Swift5] Fix Datetime default value

If a default value is provided by the API spec for a date-time attribute,
this commit fixes the generation code to build a correct Swift `Date` object.

* update samples with swiftlint

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-24 11:56:18 +08:00
William Cheng
8e150ab94e
fix string comparison (#7027) 2020-07-23 23:01:57 +08:00
Slavek Kabrda
03e8aee8ea
[java][jersey2-client] Disable coercion of scalars (#6811)
* [java][jersey2-client] Disable coercion of scalars

* Respect the coercion objectmapper setting in deserializers

* Update jackson in maven plugin to get version that has ALLOW_COERCION_OF_SCALARS
2020-07-23 16:33:15 +08:00
Slavek Kabrda
3199ddc615
Add 'x-generate-alias-as-model' extension to allow enabling generating alias as model per-schema (#6937) 2020-07-23 16:26:18 +08:00
Michał Zubkowicz
1bfd86a350
typescript-inversify: client compile error, type casting warning and apostrophes (#6970) 2020-07-23 08:09:27 +02:00
agilob
90d8c32906
[Dart] Fix enum generation (#6729)
* [Dart] Fix enum generation

* Update generated Order file

* Re-add constructor

* Generate dart2 files

* Dart - nicer enum formatting

* Dart - generate enum name as className+enumName

* Dart - dont initialize vars to null by default

Fixes #3633

* Dart - Generate inlined enums and deserialize them

* Merge branch 'master' of github.com:agilob/openapi-generator into 6727

* Dart - Fix using default value

* Fix typo

* Regenerate add dart files

* dart Revert override for dart dio and jaguar

* Fix dart model tests

* Fix dart1 generated template

* Use {{{datatypeWithEnum}}}

* Dart - throw when enum not known

* Fix generating enum with datatype from list
2020-07-23 11:26:25 +08:00
William Cheng
9899315aab
[Java][jersey2] Fix serializeToString (#6956)
* fix empty get body in serializeToString, add tests

* add new file

* fix serialize to better handle null string

* update test comments
2020-07-23 10:39:04 +08:00
Slavek Kabrda
763b8fbe3e
[go-experimental] Fix generating array aliases as models (#6939)
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-23 00:27:02 +08:00
William Cheng
e9c231b50a
rollback feign version to 10.11 (#7012) 2020-07-22 21:21:11 +08:00
agilob
df2c927dcb
[Dart] Annotate required named parameters in model (#6798) 2020-07-22 17:14:36 +08:00
mvistein
454ceb45fa
Enabling forward declarations also for cpp-restsdk generator (#6996) 2020-07-22 17:06:14 +08:00
agilob
a59e506c9e
[dart] fix toJson does not handle complex type (#6730)
Co-authored-by: arndt <17650715+dont1like1this@users.noreply.github.com>
2020-07-22 16:52:54 +08:00
Dheeraj Nalluri
3784f459e9
[typescript-angular] Unify authorization lookup (#6953)
* [typescript-angular] Unify authorization lookup

* [typescript-angular] Update samples.

* [typescript-angular] Fix typo.

* [typescript-angular] Revert changes to some of the sample files.

* [typescript-angular] Fixed compile error.

* [typescript-angular] Use arrow functions to avoid "this" issues

* Document usage of credentials map.
2020-07-22 10:29:28 +02:00
Patrice De Saint Steban
b1dcf65c5b
[Avro] Default value for no required fields to null (#7006)
* Default value for the non required fields to null

When a field is not required, the avro schema has no default value.
Has described in an [avro issues](https://issues.apache.org/jira/browse/AVRO-1803), the property default: null must be set.

If we don't do this in the avro file, when we generate java code from generated avro schema, the builder fail if the data isn't set in the avro data class.

* Update generated avro sample
2020-07-22 13:13:59 +08:00
William Cheng
2ab35e0386
add JsonTypeName (#6995) 2020-07-21 14:21:10 +08:00
Moshe Elisha
0a394bc883
[Java][RestTemplate] Use abstraction for files (#6912)
* Fix dir path in PR request template

* Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed (#6715)

* Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed (#6715)

* Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed (#6715)

* #6715 - Add "useAbstractionForFiles" config option for Java/RestTemplate to allow flexible options in generated client when a file is needed.
2020-07-20 22:54:14 +08:00
daiscog
95bd845f79
Typescript-angular generator: Mark deprecated operations with @deprecated JSDoc tag (#6973) 2020-07-20 16:12:42 +02:00
Kim T
383b1e9db8
[NodeJS] nodejs-express-server fix /api-docs path (#6977) 2020-07-20 18:57:50 +08:00
Justin Black
0e0f8eb74c
[python-experimental] Removes python2 (#6991)
* Removes future from python-exp v3 sample

* Removes future from python-exp v2 sample

* Deletes future from remaining python-exp files

* Removes six from python-exp templates

* Removes six from python-exp samples

* Removes mock from python-exp

* Python-exp switched to py3

* Removes python 2.7 for python-exp ci testing

* Requires python>=3.3 for python-exp

* Reverts unnecessary changes to two templates
2020-07-19 09:45:56 -07:00
Justin Black
ed84280108
Python-exp remove codegemodel mutation, allow mixed OneOf types (#6797)
* Stops converting primitive models into object models, adds ComposedSchemas with mixed type

* Samples update for python-exp
2020-07-18 10:13:22 -07:00
Sebastien Rosset
968f32b55e
[Java][Jersey2] Add JsonTypeName annotation (#6551)
* Mustache template should use invokerPackage tag to generate import

* add JsonSubTypes annotation to handle scenario when OAS name has special characters

* add JsonSubTypes annotation to handle scenario when OAS name has special characters. Add unit test

* run sample scripts

* fix unit test

* run sample scripts

* add minimal openapi document to show issue with special characters and discriminators

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add 'isClassnameSanitized' tag

* Add unit tests for unmarshaling of discriminators with special characters

* Add unit tests for unmarshaling of discriminators with special characters

* use JsonTypeName

Co-authored-by: Vikrant Balyan (vvb) <vvb@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-18 21:56:41 +08:00
mh03r932
ffdd7000a4
fix: make accept header consistent with sync vers. (#6922)
* fix: make accept header of async apis consistent with sync version

* make sync and async version use same logic
* generate samples for csharp-netcore using generate-samples.sh

* fix: make accept header of async apis consistent with sync version

* change tabs to spaces to match existing code
2020-07-17 18:08:51 +08:00
bgong-mdsol
8cd52033e4
[Java][Native] added WithHttpInfo method for async-native (#6903)
* [java-asyncNative] add withHttpInfo

* update api template for async-native
2020-07-17 15:30:02 +08:00
Tomohiro Suwa
9318833fa5
[Ruby] ruby client build from hash nullable (#6945)
* Ruby Client: nullable for build_from_hash

* Generate sameples with a8eed9ce38e
2020-07-17 00:39:21 +09:00
Bodo Graumann
7cb8766a5c
[Typescript] Fix array model of alias to array (#6888)
* Add failing test

* Add model unaliasing

* Regenerate samples

Not really related to this bug fix, but probably necessary for ci
checks.
2020-07-16 16:31:41 +02:00
翠 / green
fce74884f8
[typescript-axios] switched to new URL API (#6960)
* [typescript-axios] switched to new URL API

* [typescript-axios] fix tests
2020-07-16 15:35:41 +02:00
William Cheng
a348f5a170
[Go] fix unmarshal for models with parents (#6946)
* set disallowAdditionalPropertiesIfNotPresent to false in go exp oas3

* fix unmarshal in go

* remove fields from embedded structs

* fix typo
2020-07-16 14:52:30 +08:00
William Cheng
02a8207b91
skip test for enum model, update readme (#6936) 2020-07-15 19:00:14 +08:00
William Cheng
cef1bec466
fix null payload in java jersey2 (#6933) 2020-07-15 00:50:37 +08:00
Sebastien Rosset
38368c9bda
[Java][jersey2] Fix format of Date header in HTTP signature (#6925)
* Use RFC 1123 date format for Date header in HTTP signature

* Use RFC 1123 date format for Date header in HTTP signature
2020-07-15 00:19:55 +08:00
William Cheng
9d76ca291e
add nullable body support to powershell (#6930) 2020-07-15 00:19:13 +08:00
Sebastien Rosset
b86a51ae17
fix typo (#6928) 2020-07-14 14:03:04 +08:00
William Cheng
5980c420e3
minor fix to sample code (java jersey2) (#6921) 2020-07-14 12:36:05 +08:00
Justin Black
dad931a25a
Python exp sample component renaming + additions (#6917)
* Stops converting primitive models into object models, adds ComposedSchemas with mixed type

* Reverts java and mustache changes

* Reverts mroe files

* Samples regen

* Fixes remaining tests
2020-07-13 10:22:03 -07:00
William Cheng
29183e0280
[PowerShell] support default value in models (#6920)
* support default value in ps

* revert changes to the spec
2020-07-13 13:41:10 +08:00
William Cheng
6a49c4ec02
add option disallowAdditionalPropertiesIfNotPresent to ps generator (#6909) 2020-07-11 22:41:24 +08:00
William Cheng
57bf9e85a1
[Go][Experimental] Add the option disallowAdditionalPropertiesIfNotPresent (#6908)
* add disallowAdditionalPropertiesIfNotPresent to go exp generator

* update cache key

* fix spring.xml with 5.0.0-SNAPSHOT
2020-07-11 16:53:28 +08:00
William Cheng
ffac26face
replace x-additional-properties with isAdditionalPropertiesTrue (#6886) 2020-07-08 16:45:30 +08:00
jekkel
0be0a06d84
[Java][Client][vert.x] Support per-call authentication and JsonNullable in client request bodies, fix path parameter encoding (#5732)
* Support per-call authentication and JsonNullable in client request bodies

Extensions
----------
Since vertx is an asynchronous/reactive toolkit usage of mutable fields
of `ApiClient` to store authentication prohibits delegation of
authentication from incoming call without recreating the client
everytime (which is prohibitively expensive due to instantiation of objectmapper).
This commit adds a per call authentication override which takes precedence
over the mutable fields so a single client can be safely reused. To ease
usage a simple builder-style auxiliary `AuthInfo` object is provided
providing methods for each specified authentication.

A new configuration option for `ApiClient` has been added: `timeout`. It gets
applied as timeout for the vertx http request.

Fixes
-----
Request bodies have been wrongly serialized using vert.x built-in
objectmapper instead of the embedded instance thus usage of beans with
`JsonNullable` wrapped fields in request bodies led to bad requests.

* update vertx samples

* Client Java Vertx: Add url encode for path parameters.

* update vertx samples
2020-07-08 16:30:31 +08:00
William Cheng
ce177a7fb6
Add isAdditionalPropertiesTrue (#6880)
* move postProcessModel to the end

* add isAdditionalPropertiesTrue

* remove supportsAdditionalPropertiesWithComposedSchema from go exp

* remove x-additional-properties

* update comment
2020-07-08 11:30:16 +08:00
Harald Fernengel
566b2b7647
Revert "[typescript-fetch] Support deepObject query params (#6075)" (#6860)
This reverts commit 354f195ec09293cfd731b72e67c3cc977b8c0894.

It became superfluous due to some other changes in runtime and changing
of the queryParameters in d9a6f4d
2020-07-07 13:44:25 +02:00