11973 Commits

Author SHA1 Message Date
goexplore
cd0ca65732
[aspnetcore] Improve model inheritance support by including JsonSubTypes to properly handle serialization (#8384)
* Add JsonSubTypes to templates

* Add JsonSubTypes to templates

Co-authored-by: Anders Gilje <agilje@slb.com>
2021-02-16 09:20:47 +08:00
David Hontecillas
51c8fd1520
Fix generated go client cannot upload file (#8393)
* go client send **io.File body

* run generate-samples for Go upload fix
2021-02-16 08:08:27 +08:00
sforst
99b36b9b3a
[typescript-fetch] handle uniqueItems correctly in model and api (#8695)
* [typescript-fetch] handle uniqueItems correctly in model and api

uniqueItems produces Set instead of Array as type, but the corresponding code did not treat Set correctly

use `Array.from` and `new Set` to convert from Set to Array and vice versa, if uniqueItems is true.

related to https://github.com/OpenAPITools/openapi-generator/issues/8258, but only fixes typescript-fetch

* [typescript-fetch] update samples
2021-02-14 17:12:00 +08:00
William Cheng
69cf4921c6
Add Gumtree to the user list (#8696)
* update headers

* add gumtree to user list
2021-02-14 11:34:40 +08:00
Reinhard-PTV
1006d2f21e
[java native][dotnetcore] Implement QueryParameter deepObject style for client generators java native and dotnetcore. (#8563) 2021-02-14 11:03:08 +08:00
William Cheng
859a066052
add sponsorship message for jim's work (#8650) 2021-02-14 10:43:31 +08:00
Moshe Elisha
90e8dcf3e3
[JAVA][native] - Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed (#8554)
* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 56e2b1fb

* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"

This reverts commit 335c304d

* Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed

* Fix #8027 - import the auto generated supporting JSON class only when discriminator is needed
2021-02-12 23:02:13 +08:00
Daisuke Murase
ec39a2ffbf
[rust client] upgrade reqwest crate to 0.11 (#8603)
* set reqwest version to 0.11

* update sample
2021-02-12 19:05:20 +08:00
William Cheng
b4f4d7434b Merge remote-tracking branch 'origin/master' into 6.0.x 2021-02-12 18:48:20 +08:00
Gary Blaser
0e16eba06a
typescript-node: bug in models.mustache with for...in on an empty array. (#8575)
* Fixed typescript bug in models.mustache with for...in on an empty array.

When an empty array comes in, the current for...in syntax results in creating an empty object being created and added to the array. This is the output from receiving an empty array that gets deserialized, resulting in an object with undefined values.

Switching to a for i < array.length loop fixes this issue.

```
body: [
    GroupCustomResource {
      apiVersion: undefined,
      kind: undefined,
      spec: undefined,
      metadata: undefined,
      status: undefined,
      '': undefined
    }
  ]
```

* Fixed typescript deserialization bug that was adding non-existent entries to objects during deserialization.

When an object comes in, the current for...in syntax results in adding an undefined key/value pair to each nested object, with key being empty string and value being undefined. This is the output from receiving an object that gets deserialized.

Adding a check to see if attributeType.name exists before adding it to the deserialized object fixes this.

```
res.body of listGroup for saved group is  [
  GroupCustomResource {
    apiVersion: 'v1',
    kind: 'Group',
    spec: GroupSpec {
      name: 'TestDeploymentGroup67264',
      tenancyId: 'tenancy',
      description: 'TestGroup description',
      '': undefined
    },
    metadata: { additionalProp1: {}, spectra: [Object] },
    status: undefined,
    '': undefined
  }
]
```

* Fixed for array for loop in serialize and added truth check for deserialize

* Made for...in loop a for loop; gets rid of the need for the truth check

* Fixed serialze/deserialize for loops for arrays

Co-authored-by: Gary Blaser <gary.blaser@oracle.com>
2021-02-12 09:01:40 +01:00
miyucy
3c4b1a0c4c
Fix syntax error (#8675)
Added missing closing brace in list_invalid_properties model method.
2021-02-11 23:43:19 +08:00
Bruno Coelho
23de86a434
[kotlin][client] update dependencies (#8673)
* [kotlin] update pom.xml

* [kotlin] update pom.xml

* [kotlin][client] update dependencies

* [kotlin][client] restore gradle

* [kotlin][client] try to fix CI

* Revert "[kotlin][client] restore gradle"

This reverts commit 20a2947447f5646ca4850304a26bdf76e630a497.

* [kotlin][client] try to fix CI

* [kotlin][client] try to fix CI

* [kotlin][client] try to fix CI

* install gradle

* [kotlin][client] try to fix CI

* [kotlin][client] try to fix CI

* [kotlin][client] disable integration tests

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-11 22:32:29 +08:00
William Cheng
47e697e492
add sponsorship message to the lau generator (#8665) 2021-02-10 12:08:00 +08:00
Bruno Coelho
7a435ac1bb
[Kotlin][Client] create request config method (#8617)
* [kotlin][client] create an api method to create the RequestConfig

* [kotlin][client] generate sample projects

* [kotlin] add docs to RequestConfig method

* [kotlin][client] generate sample projects

* [kotlin] improve docs on the RequestConfig method

* [kotlin][client] generate sample projects
2021-02-10 00:13:25 +08:00
William Cheng
71a8e0afda
Add sponsorship message in C generator (#8649)
* update c generator sponsorship message

* add powerofcreation
2021-02-09 21:49:49 +08:00
Kaijia Feng
df1df5c5df
Minor fix for typescript-nestjs (#8654) 2021-02-09 13:42:27 +01:00
Reinhard-PTV
6fdd8ea3da
Fixed serialization of date-time query parameters. (#8616) 2021-02-08 23:03:29 +08:00
basyskom-dege
578420cfa9
Finished paramter styling(query,path,header,cookie) (#8587) 2021-02-08 20:21:53 +08:00
Reinhard-PTV
df107e2244
Do not use context timezone. (#8614) 2021-02-08 19:25:58 +08:00
William Cheng
1bff357958
Fix HTTP Signing authentication in C# .net 5 client (#8645)
* fix issues with http signing in .net 5

* add new files

* remove comment from yaml
2021-02-08 19:22:09 +08:00
William Cheng
e4b31b7601
add sponsorship message in swift5 generator (#8643) 2021-02-08 19:06:19 +08:00
Jamie Gaskins
d4c76df79f
Fix syntax errors and method calls in code generated by Crystal client generator (#8644)
* Fix string interpolation

* Fix syntax error and s/include\?/includes\?/

* Fix more `.include?` and `.key?` calls

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-08 19:02:55 +08:00
kalinjul
d57aa95b80
Replace deprecated import for kotlin Parcelize annotation (#8590)
* replace deprecated import

* update kotlin version to 1.4.20, add kotlin-parcelize plugin

* update samples to gradle 6.8.1

* Revert "update samples to gradle 6.8.1"

This reverts commit 2f9bbe804f370eaf7a8d83edf51b7b2e2ccf74c3.

* Revert "update kotlin version to 1.4.20, add kotlin-parcelize plugin"

This reverts commit 5063141c0c91205538e8bda59671d4a9b31da2ff.

* Add kotlin-parcelize plugin for kotlin-client
2021-02-08 13:31:21 +08:00
Troy P
75b987104b
[JS] the replace statement in parseDate is too greedy (#8632) (#8633)
* updated the regex used in the String.replace for parseDate() to more precisely target ISO-8601
* added the replace function call to the ES6 mustache file
2021-02-08 13:27:59 +08:00
cal
ef9e8b7181
refactor: erefactor/AutoRefactor - Annotation (#8544)
AutoRefactor cleanup 'AnnotationCleanUp' applied by erefactor:

Simplifies annotation uses:
- empty parentheses will be removed from annotations,
- single members named "value" will be removed from annotations and
only the value will be left.

For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor
For erefactor see https://github.com/cal101/erefactor
2021-02-08 11:50:21 +08:00
Stephane Carrez
a06af89be9
Fix #8640: [BUG] [Ada] Server skeleton does not compile when an operation has no parameter (#8641)
- add missing 'use Swagger.Streams;' clause
- add Style_Checks pragma to fix style compilation warnings in generated Ada code
- fix spurious spaces in licence headers that cause Ada style compilation warning
- update the default GNAT project config
2021-02-08 11:20:15 +08:00
Benjamin Klatt
c5ddf463c4
FIX #8583 [BUG][JAVA] AbstractOpenApiSchema package (#8635)
Fixed package declaration in AbstractOpenApiSchema.mustache template
2021-02-08 10:33:57 +08:00
William Cheng
8025e5fe7b update readme 2021-02-06 18:52:09 +08:00
William Cheng
3e81876e2c Merge remote-tracking branch 'origin/master' into 5.1.x 2021-02-06 17:52:32 +08:00
William Cheng
c7fcb39a2d
Prepare v5.0.1 release (#8627)
* release 5.0.1

* update samples
2021-02-06 16:37:22 +08:00
Žilvinas Urbonas
90e25f6f4c
[BUG][Python] init access token for python client configuration (#7469)
* fix: init access token for python client configuration

* fix: remove duplicate initializations for access_token
2021-02-05 13:09:53 -08:00
William Cheng
c33b5a66e7
minor fixes to ts nestjs generator (#8622) 2021-02-05 19:45:10 +08:00
William Cheng
e6cee8eb71
Mark java-vertx as deprecated (#8609)
* mark java-vert as deprecated

* update, clean up samples

* remove entrites related to java-vertx
2021-02-04 16:36:55 +08:00
William Cheng
b7ee885805
[C#][netcore] fix binary response (#8593)
* fix binary response

* update test file hash
2021-02-04 11:01:44 +08:00
William Cheng
a5ac2ee1a3
remove import as already stated in the installation instruction (#8608) 2021-02-04 10:50:43 +08:00
Aanisha Mishra
d869544ce1
[Go][Client] Secret key content string in http signing support (#8570)
* accept private key content string

* sample update

* Add comments to new methods

* update samples with comments

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>

* Update signing.mustache

* update sample comments

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/go/signing.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* update empty checks for privateKey

Co-authored-by: Vikrant Balyan <vvb@users.noreply.github.com>
Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2021-02-04 10:33:17 +08:00
Bruno Coelho
45fc02350b
[kotlin] fix Date types usages (#8594)
* [kotlin] fix Date types usages
2021-02-02 20:55:51 -05:00
Jens Oberender
b78d4fce6a
Upgraded dependency versions in okhttp generator. (#8604)
Co-authored-by: Jens Oberender <burberius@users.noreply.github.com>
2021-02-02 20:45:09 -05:00
William Cheng
2c457a458e Merge remote-tracking branch 'origin/5.1.x' into 6.0.x 2021-02-02 21:43:53 +08:00
William Cheng
5b99d8724c Merge remote-tracking branch 'origin/master' into 5.1.x 2021-02-02 21:04:15 +08:00
Peter Leibiger
1b440e191c
[dart-dio] Improve API & API-Client field initialization (#8589) 2021-02-02 18:46:51 +08:00
Peter Leibiger
769b0e0e38
[feature][dart] Add support for uniqueItems/sets (#8375)
* [dart][dart-dio] Add support for set types

* copy `uniqueItems` usage from 2.0 fake spec to `3.0`
* add support for sets in parameters, responses and properties

* Regenerate all other samples

* Fix broken tests due to invalid cast

* Update documentation

* Regenerate samples

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-02 18:42:45 +08:00
Peter Leibiger
26f21bb6a0
[dart-dio] Add missing isRedirect parameter to response (#8588) 2021-02-01 22:29:20 +08:00
William Cheng
19f21acd85
Fix handling of 1xx and 3xx in Rust Reqwest (#8574)
* Remove redundant Rust use statement

* Return errors only for 4xx and 5xx in Rust reqwest

Since 1xx and 3xx are perfectly valid status codes the client might
need to handle.

see: https://docs.rs/reqwest/0.11.0/reqwest/struct.StatusCode.html#method.is_informational

* Regenerate samples

Co-authored-by: Gabriel Féron <feron.gabriel@gmail.com>
2021-02-01 16:29:01 +08:00
Pe-te
c12f6041f7
Added 'hash' to objcReservedWords (#8582)
Fix for https://github.com/OpenAPITools/openapi-generator/issues/7991
2021-02-01 13:31:30 +08:00
William Cheng
6dee98784a
Fix auto-generated R doc (#8584)
* fix auto-generated R doc

* better example for enum value
2021-02-01 13:30:31 +08:00
Matthew Dowdell
b4154be8d0
[Rust Server] Add support for Bearer token authentication (#7840)
* [rust-server] Add support for Bearer auth

- Added bearer auth to the security features for rust server
- Supplemented the basic auth condition in the context template to handled basic auth and bearer auth separately.
- Repurpose an exising sample to confirm the code generation works as expected.

* Update docs

* Update readme for bearer tokens
2021-01-30 12:07:46 +00:00
Richard Whitehouse
4ea4ceb0ff
[Rust Server] Serializable responses (#8516)
* [Rust Server] Make responses serializable

* Update samples
2021-01-30 11:49:42 +00:00
Richard Whitehouse
c15a4375e2
[Rust Server] Cargo Metadata Configuration (#8519)
* [Rust Server] Support Cargo Metadata Configuration

This adds support for publish, repository, documentation and homepage metadata.

* [Rust Server] Test Cargo Metadata configuration
2021-01-30 11:49:18 +00:00
Igor Sirotin
328cadb070
[Qt5][C++] Fixed QByteArray::toUtf8 with FILE as request body. Included <stdexcept>. (#8550)
* Multiple cpp-qt5-client bugfixes.

* Added '#include <stdexcept>' where std::runtime_error is used
* Fixed request with FILE body: QByteArray doesn't have ::toUtf8()
* Updated related samples

* Fixed isByteArray section

* updated docs

* Docs changes reverted
2021-01-30 11:35:52 +08:00