9299 Commits

Author SHA1 Message Date
Hugo Alves
a7a5937813
[JAVA][FEIGN]Implement unit tests for java-feign client (#8484)
* Implement unit tests for feign client

Implement tests
Migrate to junit 5

* Default feign client does not support PATCH verb

Default feign client does not support PATCH verb

* Remove test for GET endpoint with request body

* Configure junit in gradle build

* Configure logback for unit tests

* Add missing dependencies to sbt

* Fix gradle dependency

* Add logback to gradle unit test

* Regenerate samples

* Make junit test classes package private

* Make junit test classes package private

* Update samples

* Organize imports

* Organize imports
2021-01-23 10:33:16 +08:00
Peter Leibiger
90ed1290fa
[dart][dart-dio] Improve form param handling, respect required flag (#8369)
* [dart-dio] Improve form param handling, respect required flag

* simplify template
* respect required flag (only null check when not rquired)
* minor formatting

* Add additional nullable check
2021-01-22 17:58:27 +08:00
William Cheng
3d23b99242
minor fix to powershell api doc (#8496) 2021-01-21 21:21:40 +08:00
Richard Whitehouse
a61b7bbc65
[Rust Server] Reinstate tests (#8477)
* Revert "comment out rust server tests (#8440)"

This reverts commit 32b01cb39bea5bc0d006e9d31d41afedf4dcab29.

* Update to swagger-rs 5.0.2

* Update samples for swagger-rs 5.0.2

* Update swagger multipart usage

- swagger/multipart renamed multipart_form
- Update boundary call

* Update samples
2021-01-20 23:16:54 +00:00
William Cheng
62eecabfa5
[csharp-netcore] add .Net 5.0 support (#8467)
* add net5.0 support to csharp-netcore client gen

* update doc

* update samples
2021-01-19 22:38:34 +08:00
Anh (Duke) Nguyen
8b2ac7b0ac
Fix README typo for Crystal (#8470)
* Fix README typo for Crystal

* Fix README typo for Crystal in Mustache template
2021-01-19 16:38:53 +08:00
Noor Dawod
f5c49609d2
Javadoc + operations interface + provider for state(ful/less) handlers (#8346)
* Added Javadoc + meta-data about request/response + abstract class.

* Added one more method to set base path.

* Updated Javadoc for each endpoint.

* Shorten the method name displayed in Javadoc.

* Fix README grammar.

* Separate imports based on type.

* Put operations into their own interface class.

* Update Javadoc.

* Adjust Mustache template to support Java 1.5.

* Add import for HttpServerExchange, suppress warning about using a Lambda.

* Remove @Override from a mgetStatefulHandler().

* Regenrate the samples.
2021-01-19 13:16:20 +08:00
Hugo Alves
ede2a2316c
[JAVA][Feign] Replace Apache oltu with scribejava (#8318)
* - Replace apache oltu with scribejava
- Implement the following authentication methods
  - ApiKey header
  - HTTP basic authentication
  - Oauth client credentials flow
  - Oauth Implicit flow
  - Oauth Pasword (deprecated)

* Create class hierarchy for Oauth flows implementation

* Add instructions of how to use the ApiClient to Readme.md

* Update samples

* Remove support for java 6 and 7

* Remove java 6 and 7 support from gradle

* Format pom.xml

* Remove empty line

* Update samples

* Remove oltu dependency from build.gradle and build.sbt.
Replace oltu with ScribeJava

Update samples

* Update samples

* Update samples
2021-01-19 12:41:25 +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
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
Ș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
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
64ae0eed04 Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-01-09 00:15:53 +08:00
William Cheng
1aa83b978b update meta-codegen 2021-01-08 21:55:56 +08:00
William Cheng
18bec1da28 Merge remote-tracking branch 'origin/master' into 5.1.x 2021-01-08 21:06:47 +08:00
Peter Leibiger
2ba0e03629
[dart-dio] Fix serialization of map body params (#8367) 2021-01-07 22:30:16 +08:00
Peter Leibiger
02473d8175
[dart] Cleanup, remove leftover inline objects/docs and regnerate tests (#8362) 2021-01-07 22:29:32 +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
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
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
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
William Cheng
663c8b2d80 update samples 2021-01-06 18:49:17 +08: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
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
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
Nicholas Muesch
00d56375b0
Use Map interface for configureApiKeys (#7982) 2021-01-04 10:54:01 +08:00
Bruno Coelho
163c70e7d8
[Swift 5] create sample for URLSsession and Alamofire bearer authentication (#8302)
* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with URLSession

* [swift] create a sample of bearer token authentication with Alamofire

* [swift] create a sample of bearer token authentication with Alamofire
2021-01-04 10:03:26 +08:00
Bruno Coelho
72d6cff188
iOS - fix XcodeGen deploy target to match cocoapods (#8279) 2021-01-04 09:55:59 +08:00
Bruno Coelho
14efb8c70f
[swift 5] update dependencies (#8277) 2021-01-04 09:55:23 +08:00
Josh Goldberg
566e7ef583
Fix two spaces after get headers() in typescript-fetch (#8294) 2020-12-30 10:32:40 +01:00
Bruno Coelho
775b64f6c7
[swift5] add URLResponse to ErrorResponse (#8267)
* [swift5] add URLResponse to ErrorResponse

* [swift] improve unit tests

* [swift] improve unit tests
2020-12-29 23:31:12 +08:00
Tomofumi Chiba
9889e5dfba
[typescript(experimental)] fix for Deno v1.6 (#8265)
* fix for Deno 1.6

* update dependency version of Deno test code
2020-12-28 13:57:00 +01:00
William Cheng
25b0cbe2f1
Prepare 5.0.1 snapshot (#8249)
* update version to 5.0.1-SNAPSHOT

* update samples

* update meta codegen
2020-12-21 17:14:18 +08:00
William Cheng
4261252491 prepare 6.0.0 snapshot release 2020-12-21 16:39:40 +08:00
William Cheng
345b68a107 prepare 5.1.0 snapshot release 2020-12-21 16:35:12 +08:00