11973 Commits

Author SHA1 Message Date
Vladimir L
6e4c1307a7
use '{{#hasPathParams}}' instead of '{{#pathParams}}' to avoid path repetiotion if path contains multiple parameters (#8402) 2021-01-19 11:33:17 +08:00
Sakari Bergen
83e9986bba
Style fix: correct copy-paste mistake in test package name (#8451) 2021-01-19 11:04:27 +08:00
William Cheng
52065cc1c5 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-18 12:40:31 +08:00
William Cheng
53a5bfecfd Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-18 11:33:57 +08:00
Justin Black
e9c850fd4e
Adds isNull to codegenX java core classes that represent schemas (#8462)
* Adds isNull to all schema classes

* Adds null model and property samples, adds models test of isNull

* Adds isNull tests for parameter and response also

* Reverts version file
2021-01-17 12:28:17 -08:00
Johannes Wienke
cd2a0db1ce
Fix counting for large API solutions in generated Python README (#8403)
* Fix counting for large API solutions

Let 2 follow 1.

* Update Python samples with new readme
2021-01-15 13:51:12 -08:00
Justin Black
c4dbd2cfa3
[python] Fixes file upload + download, adds tests (#8437)
* Adds tests for file upload and files upload

* Adds test_download_attachment

* Fixes test_upload_file

* Adds download_attachment endpoint

* Adds test_download_attachment

* Updates assert_request_called_with signature

* Samples regen

* Adds upload download file spec route and sample gen

* Fixes file upload for application/octet-stream, writes test_upload_download_file

* Changes if into elif

* Improves python code in api_client
2021-01-15 13:27:33 -08:00
Toby Murray
99144252f7
Migrate off deprecate Gradle configurations (#8436)
A bunch of gradle configurations have been deprecated, with drop in replacements. Relevant to this project:

compile -> implementation
testCompile -> testImplementation

They're visible by executing e.g. ./gradlew build --warning-mode all with supporting documentation here: https://docs.gradle.org/6.6.1/userguide/upgrading_version_5.html#dependencies_should_no_longer_be_declared_using_the_compile_and_runtime_configurations
2021-01-15 22:32:50 +08:00
William Cheng
a4b356c8b3
fix typo (#8452) 2021-01-15 22:00:01 +08:00
Ștefan Cenușă
dfcd86f35a
[typescript-axios] bump axios version to 0.21.1 to fix vulnerability (#8445)
* fix(typescript-axios): updated axios dependency to new minor version 0.21.1

* fix(typescript-axios): update samples
2021-01-14 20:03:20 +01:00
William Cheng
e2ad6dbc1b
[Go] Fix response body (#8439)
* fix go response body

* add missing import
2021-01-14 23:32:19 +08:00
William Cheng
22ac8faec7
Revert "[GO][Client] return GenericOpenAPIError instead of error in Execute() (#8137)" (#8427)
This reverts commit 1562afea3980484a7f1819c4f51b0d53a44a009f.
2021-01-14 13:59:21 +08:00
Ronny Pfannschmidt
6b6d1b1a97
[python] fix #8404: avoid shadowing the name Endpoint (#8405)
if a type was named Endpoint, its import for use in the api would shadow
the name Endpoint for the internal utility
2021-01-13 08:38:41 -08:00
Thessi
008ddfb1ef
[typescript-angular] Fix configuration import in apiInterface.mustache when the configurationPrefix option is used (#8416)
Co-authored-by: Stefan Straka <Stefan.Straka@cloudflight.io>
2021-01-12 17:01:48 +01:00
Sergey Terentyev
a80788d424
Renamed basic authentication function in sttp client (#8396)
* Fix #8395 - changed function name to basic

* Fix #8395 - changed function name to basic

* Fix #8395 - removed test.yaml file

Co-authored-by: sergey <sterentyev@ebay.com>
2021-01-12 11:13:07 +08:00
Gokul Raj S
ce3e0c7d68
7358 (#8388)
1. unable to use --global-property models="User,Pet" as this creates only User model.
2. to solve the issue, instead of "," separator used ":" separator
3. made some changes with that
2021-01-12 10:36:03 +08:00
agilob
ed9133e77f
Make frequently used IO resources autoclosable (#8181)
* Make frequently used IO resources autoclosable

* Autoclose ruby error input stream
2021-01-12 00:26:25 +08:00
Ryan Feeney
e26f440729
Remove modelFilesConstrainedTo from gradle example (#8312) 2021-01-10 10:15:13 -05:00
Hui Yu
0284fcd5c7
[C][Client] Fix the memory leak when a JSON string of model fails to parse. (#8390) 2021-01-10 15:10:05 +08:00
Bruno Coelho
646bcc64ad
[Swift 5] code formatting (#8385)
* [swift] improve code formatting

* [swift] update sample projects

* Revert "[swift] improve code formatting"

This reverts commit 0cc280509cae1a9a581ea4ed92d8141dd0f35a5c.

* [swift] update sample projects
2021-01-10 13:50:19 +08:00
Justin Black
ce893a84ff
Fixes object serialization when there is an inline array property which contains a refed enum (#8387)
* Fixes object inline enum defintion with refed enum item

* Adds refed array model example w/ serialization + deserialization
2021-01-08 13:15:55 -08:00
William Cheng
5e1aa98bb0 fix merge conflicts 2021-01-09 00:50:37 +08:00
William Cheng
64ae0eed04 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-09 00:15:53 +08:00
William Cheng
18bec1da28 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-08 21:06:47 +08:00
Miroslav Šedivý
f2671fcb78
typescript-fetch: fix isCollectionFormatMulti for arrays of files (#8376) 2021-01-08 08:46:25 +01:00
Peter Leibiger
2ba0e03629
[dart-dio] Fix serialization of map body params (#8367) 2021-01-07 22:30:16 +08:00
Peter Leibiger
c43234711a
[dart-dio] Generate the correct serializers (#8357)
* only generate actually used serializers (anything used in body or response)
* generate previously missing serializers for collection types
* improve formatting
2021-01-07 22:28:37 +08:00
Peter Leibiger
3b6c2b2342
[dart-dio] Add missing imports for container parameters (#8355)
* also remove redundant needToImport check
2021-01-07 22:27:27 +08:00
Wesley A
f5b2bb5057
Implement optional powershell verb parsing (#8252)
* Implement optional powershell verb parsing #8233

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-07 17:41:43 +08:00
William Cheng
1df719801e
Add a new crystal client generator (beta) (#8304)
* add crytsal client generator

* update samples

* update doc

* regenerate spec

* regenerate spec

* various fixes

* test crystal in circleci

* test crystal client in drone ci

* Revert "test crystal client in drone ci"

This reverts commit 317f2cf2a09f902c08ced214e8e5802fa79c3de8.

* fix install

* fix installation

* test crystal in travis

* cache image

* add --cache-from

* update doc

* run petstore with mvn

* install crystal

* fix install crystal

* sudo mvn

* run server

* using mvnw

* fix form or body parameter

* remove crystal from circleci

* fix test

* remove cache-from

* update doc
2021-01-07 17:10:22 +08:00
Dor Dadush
c67dc5d7d5
Fix error message templates for some field names (#8321)
some fields may start with a "u" character which causes
Powershell to think it is a unicode escape sequence.
2021-01-07 16:58:58 +08:00
Sascha Grebe
367ba3a2cf
[cwiki] Added Enum documentation and fix newline problem for description (#8338)
* create enum documentation in model

* add newline to fix layout when a markdown table follows a markdown list

* avoid escaping of attributes to make sure documentation is displayed as in the spec
2021-01-07 16:57:14 +08:00
Thomas Hervé
4947634a24
Tweak regexp in underscore method (#8230)
The rule to split a capitalized word with plural didn't work properly,
leading to weird name generation in a few languages. This is an attempt
at fixing it.
2021-01-07 16:47:05 +08:00
Christophe Bornet
e73ae8c048
[Kotlin-Spring] Fix required model property deserialization (#8337)
* Fix required model property deserialization

* Update samples
2021-01-07 16:18:21 +08:00
Jon Schoning
4526ca2610
[haskell-http-client] regard mime type as json if "json" appears anywhere in the mimetype (#8361) 2021-01-06 14:33:31 -06:00
William Cheng
923e246fa8
rename titleCase, minor code format (#8350) 2021-01-06 23:48:11 +08:00
Guillaume TOURBIER
9bd2a45e72
typescript-angular: add providedIn for Angular 9+ (#8324)
* feat: add providedIn for Angular 9+

Adding new option, providedIn, for generator typescript-angular
Keep providedInRoot for backward compatibility but mark as deprecated
for Angular 9+

fix: #6432

* doc: providedIn

infos about providedIn
Mark providedInRoot as deprecated

* doc: run generate-samples for typescript

using typescript-angular-v9-provided-in-any.yaml

* refactor: runned ensure-up-to-date locally

* refactor: api.module.mustache rely on providedIn too

* doc: re-generate samples
2021-01-06 15:31:41 +01:00
Luiz Felipe Stangarlin
319bd7eaa8
Add Ktorm schema generator (#7759)
* [ktorm] added support for ktorm

* [ktorm] fixed type mapping

* [ktorm] fixed foreign key

* [ktorm] added variable for the missing package import

* [ktorm] added correct templates

* [ktorm] added relationship metadata

* [ktorm] also support relationships 1:m

* [ktorm] relation to primitive naming fix

* [ktorm] updated mustache templates

* [ktorm] small fixes on templates, assigmentbuilder, docs, sql script syntax.

* fix issue, rename to ktorm-schema

* replace tabs with 4 spaces

* [ktorm] added primarykey automatic generation

* [ktorm] added tests

* [ktorm] added gradle to samples

* [ktorm] fix datatime type

* [ktorm] template fixes array and primarykey

* [ktorm][sample] regenerate

* [ktorm][sample] added manually files from kotlin-client

We inherit from baseTable, so we need those for now

* [ktorm] fix: relation column types hardcoded

* update samples

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-06 17:04:49 +08:00
fbl100
04dfff83e0
Fixes issue 8052: Stackoverflow in toExampleValue() for python client (#8326)
Added a Set<String> in toExampleValueRecursive() to keep track of which models we have
generated to avoid an infinite recursion for recursive models.  An example of a recursive
model would be a GeoJson GeometryCollection.

Co-authored-by: Frank Levine <frank.levine@blacklynx.tech>
2021-01-05 09:45:43 -08:00
Peter Leibiger
fc22de0522
[dart-dio] Fix failing integration tests (#8335)
This happened due to the merge of #6384 where implicit-dynamics were still allowed.
2021-01-05 22:08:55 +08:00
Dor Dadush
4cdf610be0
Fix fields null check in powershell model template (#8323)
If field is boolean, the value might be $False.
The current null checking does not allow $False to be set.
2021-01-05 21:56:06 +08:00
Hippolyte HENRY
a9c168c400
[ruby] Support aliasing of API keys (#8124)
* Allow aliasing of auth keys

* update sample and add config for feature

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-05 20:04:08 +08:00
William Cheng
c3a21863b5
fix bugs with duplicated decoder (#8223) 2021-01-05 14:58:24 +08:00
NickPak
72869d53a3
[C][Client] Add C++ reserved keywords to C-libcurl client generator, then the C client can be compiled by C++ compiler (#8205)
* [C][Client] Add cpp reserved keywords to C-libcurl client generator

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-01-05 14:39:56 +08:00
Peter Leibiger
9ec1e23c10
[dart][dart-dio] Fix collection and date default values not compiling (#8306)
* empty arrays are now correctly generated
* default arrays with values are empty
* date/dateTime is now always null in order to prevent compile errors
2021-01-05 09:45:27 +08:00
Peter Leibiger
0c4a928ebc
[dart][dart-dio] Enable strong-mode and strict types (#8231)
* [dart-dio] Enable strong-mode and strict types

This will make it easier to eventually transition to NNBD. Also fix some formatting things.

* [dart-dio] Add implicit-casts: false to analysis options

* [dart-dio] Add dartanalyzer to integration tests

* raise minimum Dart version to 2.6 (to support spread collection)
* add header to all files for language version
* fix some missing imports that can be fixed (some remain due to missing inheritance support)
2021-01-05 09:43:17 +08:00
Josh Burton
604ac6d90f
[dart-dio] Serializes request bodies using a specific serializer so a… (#6384)
* Updates samples

* Handles primitive types
2021-01-05 09:40:32 +08:00
Bruno Coelho
dd9a19ab8f
[Swift 5] fix Multipart FormData encoding and add support for Form URLEncoded enconding (#8275)
* [swift5] fix issue with form data with null file

* [swift5] fix issue with form data with null file on alamofire implementation

* [swift5] update sample projects

* [swift5] fix issue with form data with null file on alamofire implementation

* [swift5] add support for form url enconded in URLSession

* [swift5] add support for form url enconded in Alamofire

* [swift] improve code formatting

* [swift] improve code formatting

* [swift] dont defaut to application/json
2021-01-05 09:27:14 +08:00
Bruno Coelho
d2aa40a935
[Swift 5] deprecate retry hook since its no longer needed (#8303)
* [Swift 5] deprecated retry hook since its no longer needed

* [Swift 5] deprecated retry hook since its no longer needed

* [swift] fix generator code formatting
2021-01-04 19:34:28 +08:00
Arnaud Jeansen
0c5cec8f75
7141: filter out problem+json mime type from JSON mime types fast tra… (#7976)
* 7141: filter out problem+json mime type from JSON mime types fast tracked into the Accept header (resttemplate)

* 7141: ran ensure-up-to-date

* 7141: minimize changes with master (keep using isJsonMime for MediaType)
2021-01-04 11:02:39 +08:00