12694 Commits

Author SHA1 Message Date
William Cheng
e432dfa59a update gradle.properties to fix appveyor build issue 2021-02-21 14:47:37 +08:00
William Cheng
e9d4886e70
replace tab with spaces, minor code format change (#8775) 2021-02-21 12:14:52 +08:00
William Cheng
ea428d6048
update jackson dependencies to address security issues (#8778) 2021-02-21 11:40:24 +08:00
Govind
04bd1ece23
fix for 8760 (#8761) 2021-02-20 11:54:48 +08:00
William Cheng
9c20050bdc
Add an option to skip operation examples (#8731)
* add flag to skip operation examples

* reset to false
2021-02-20 11:51:21 +08:00
William Cheng
ba4aae5074
[Go] bug fix (breaking), minor code format enhancement (#8715)
* go minor code format enhnacement

* fix required vars in the model new

* remove comma
2021-02-20 11:50:27 +08:00
William Cheng
ee12a6f7ee
revise invalid spec error message (#8735) 2021-02-20 11:49:31 +08:00
William Cheng
18a6f5a941
[Ruby] force users to specify the temp folder path to address security concerns (#8730)
* address security issue when downloading files in the ruby client

* update samples

* fix double quote
2021-02-20 11:49:10 +08:00
William Cheng
095019a6d8
replace tabs with 4-space (#8757) 2021-02-19 23:06:20 +08:00
William Cheng
d19bfebeda
replace tabs with 4-space in dart templates (#8740) 2021-02-19 18:02:54 +08:00
Anthony Whitaker
bb712013f8
Fix misleading warning message for missing output directory. (#8742)
Change warning message to info.
Add name of directory checked to message.

Resolves #4627
2021-02-19 11:48:54 +08:00
William Cheng
bed5ab17ef
Remove flash templates (#8741) 2021-02-19 10:55:44 +08:00
William Cheng
d5a9b53bdc
replace tabs with 4-space (#8739) 2021-02-19 10:54:55 +08:00
Martin Delille
df5050f3b0
[cpp-qt5-client] Fix qt5.15 check (#8711)
* Fix qt5.15 check

* Fix check fix
2021-02-18 11:54:10 +08:00
Peter Leibiger
c916df9381
[dart][dart-dio] Nullable support/improvements (#8727)
* [dart-dio] Disable nullable fields by default

This is not in line with the OAS and will prevent future Dart nullabilty features (NNBD) from being useful as all types would be optional.
Users can still opt-in for this.

* [dart-dio] Properties are nullable when not required AND not nullable

* [dart][dart-dio] Support nullable/required fields

* properties in built_value need to be nullable when they are nullable in OAS or when they are not required in OAS
* built_value does not support serializing `null` values by default as it is based on a serialization format based on iterables/lists and not maps
* dart-dio uses the built_value json plugin to convert the built_value format to regular json
* by generating a custom serializer for each class we can add support for serializing `null` values if the property is required AND nullable in OAS
* this is a breaking change as not all properties in the models are nullable by default anymore

* Implement required/nullable for dart

* Changes for set types and enum names after rebase

* Add some comments and fix built_value fields with default being nullable

* More rebase changes and regenerate docs
2021-02-17 21:44:21 +08:00
Peter Leibiger
7704ff3d08
[dart][dart-dio] Allow API key authentication with multiple API keys (#8728)
Remove the break stopping after the first key.
2021-02-17 21:40:27 +08:00
William Cheng
55292dd22b
Add ASP.NET Core 5.0 support (#8717)
* add aspnet core 5.0 support

* skip overwriting Org.OpenAPITools.csproj

* update doc

* update doc
2021-02-17 18:58:13 +08:00
Oleh Kurpiak
135c8f45a4
[Java][native] extend native ApiClient (#8557) 2021-02-16 21:47:44 +08:00
Peter Leibiger
683dcb8889
[dart][dart-dio] Raise min Dart to 2.7.0 & update built_value constraint (#8684)
* raise min Dart version to 2.7.0 / Flutter 1.12.0
* update constraints for built_value to support new major versions with null safety
2021-02-16 18:00:59 +08:00
Peter Leibiger
608242b4d8
[dart][dart-dio] Improve prefixing of inner enums with classname (#8685)
* [dart][dart-dio] Improve prefixing of inner enums with classname

* prevent further name conflicts by correctly naming the enum, until now there could potentially occur conflicts e.g. 2x `MapTestInnerEnum` by renaming the `items` child property
* correctly set `enumName` to match `datatypeWithEnum`

* Unrelated test regeneration
2021-02-16 17:59:54 +08:00
Patrick McGleenon
3c4015b897
[REQ] [GO] Added enumClassPrefix option to go-gin-server. Used same appro… (#8681)
* [REQ] Added enumClassPrefix option to go-gin-server.  Used same approach as #7008 (go-server)

	modified:   docs/generators/go-gin-server.md
	modified:   modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GoGinServerCodegen.java
	modified:   modules/openapi-generator/src/main/resources/go-gin-server/model.mustache

* Fixed CI error in docs
2021-02-16 17:54:00 +08:00
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