140 Commits

Author SHA1 Message Date
William Cheng
0dc62e8b79
Prepare v5.1.1 in the master (#9027)
* Prepare v5.1.1 in the master

* move dart dio next to configs/other
2021-03-20 23:05:11 +08:00
William Cheng
e023eaa821
Prepare v5.1.0 release (#9017)
* prepare v5.1.0 release

* update samples (dart-dio-next)
2021-03-20 16:45:05 +08:00
Markus Wandersee
fae4d7a73d
Fix for StackOverflow in Swift5 CodeGeneration Issue #8671 (#8672)
* StackOverflowFix for Issue 8671

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-03-15 17:59:09 +08: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
Frank Lehmann
64f5dc8077
[swift5] URLSession: Fix memory leak of SessionDelegate (#8558)
* Remove unused stored reference of delegate. URLSession keeps a strong reference anyway.

* Fix cleanup

* Update samples
2021-01-29 10:52:39 +08:00
William Cheng
a96febaba8 update samples 2021-01-28 17:41:48 +08:00
William Cheng
f887441591 update samples 2021-01-28 16:47:09 +08:00
Frank Lehmann
f6019f00a1
[swift5] Fix #8511 (request closure not being called) (#8537)
* Remove weak self to fix too early deallocations

* Update samples

* Remove podfile lock

* Run pod install on samples/client/test/swift5/default/TestClientApp/

* Revert "Run pod install on samples/client/test/swift5/default/TestClientApp/"

This reverts commit 5ad327c70789a6ab50e372a5bbc2cfa3b0a7f883.
2021-01-27 11:17:42 +08:00
Bruno Coelho
17bb3750c4
[swift 5] fix objc integration (#8534)
* [swift 5] fix objc integration

* [swift 5] fix combine integration
2021-01-25 20:53:42 +08:00
Frank Lehmann
eecd30c2da
[swift5] Fix target SDKs for Combine option (#8476)
* Update min sdks when Combine is used

* Update samples

* Revert "Update min sdks when Combine is used"

This reverts commit e88b8abaa787ebf8cffc6b8360ea22437ae20069.

* Wrap import combine with canImport directive

* Update samples

* Wrap functions using Combine with canImport because of compiler error on archive

* Update samples

* Remove unnecessary newline and update samles
2021-01-23 10:35:37 +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
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
Bruno Coelho
72d6cff188
iOS - fix XcodeGen deploy target to match cocoapods (#8279) 2021-01-04 09:55:59 +08: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
William Cheng
2e70405084
update swift samples, use swiftlint 0.41.0 (#8138) 2020-12-09 18:19:27 +08:00
William Cheng
82c5021df2
Revert "Bugfix swift5 code generation 2966 (#7301)" and provide a better (#8066)
fix for the stackoverflow issue
2020-12-02 21:20:44 +08:00
William Cheng
eacf61de7e
fix decimal mapping (#7875) 2020-11-08 11:46:33 +08:00
Francesco Marini
785cbbbb63
[Swift5][URLSession] Fix handling of customHeaders between retries (#7527)
* fix: correct handling of customHeaders

Problem: custom headers could be overwritten between 
request retries following, e.g. a token refresh ( for example,
while implementing @4brunu refresh code :
https://github.com/OpenAPITools/openapi-generator/issues/5462#issuecomment-592417371 ).
A simple reordering of the modifiedRequest headers construction
solves the problem.

* fix: correct PetStore samples implementation [PR#7527]

Co-authored-by: Franz Marini <f.marini@opengate.biz>
2020-09-28 21:46:47 +08:00
Grigory Entin
a5ee2e0454
[Swift5] Fixed spelling for promise. (#7516) 2020-09-27 16:13:21 +08:00
William Cheng
11a674f248
add extension for hashable in swift5 (#7300) 2020-08-26 19:29:29 +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
720ab3d39b
run swiftlint latest version on swift samples (#6788) 2020-06-26 17:46:55 +08:00
Jim Schubert
60ceded171
[ci][cli] Moving ensures script to config-based batch generation of samples (#6509)
* Ensure CLI-level generator settings are available in additional properties

* Initial conversion to yaml configs

Configs prefix with 1- need to be manually evaluated.

* Add "other" configs not in ensure-up-to-date

* Add other/openapi3 files

* Cleanup all generation scripts

* Clean up: add missed configs and fix some openapi 3 diffs

* Move generate-samples script, error on batch failures

* Temporarily disable elm which requires skip validation of spec

* CI updates (todo: run all generators through appveyor or move to github workflows)

* Add success count to batch generation command output

* [samples] Regenerate

* Remove bin/windows

* Generate swift5 samples in bitrise

* Expand user input glob pattern

* Regenerate samples

* Update PR template

* Support config based generateAliasAsModel

* [samples] Regenerate

* [rust] Generate as alias for all samples configs

* [csharp] Move test staged file changes to in-directory

* Include "live" test files and ignore test cache files from samples.ci

* Remove concept of samples.ci staging

Generators support .openapi-generator-ignore, allowing maintainers to
explicitly ignore the regeneration of files which have been modified.

Note that the tooling does not overwrite test files whenever those files
exist, and it's not entirely necessary to add test files to the ignore
file.

* Re-add meta generator scripts

* Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines

* [csharp] Regenerate sample

* Set generateAliasAsModel CodegenConfigurator#toContext

This ensures the property (which is effectively a thread-local) gets set
as expected if the caller resets GlobalSettings as is done in the
GenerateBatch command.

* [rust] Regenerate samples

* Re-enable elm

* [java] Support OffsetDateTime example, fail ensures script on any generation error

* [samples] Regenerate

* Fix jersey2-java8 ignore file

* Fix elm spec validation

* Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci)

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-09 18:28:58 +08:00
Bruno Coelho
8da06b038a
[Swift] fix GET request with array parameter (#6549)
* [Swift] fix get request with array paramters

* iOS - update pet projects
2020-06-05 11:39:08 +08:00
Bruno Coelho
43f7134b15
[swift] improve combine available and openapi3 deprecated (#6340) 2020-05-18 09:39:40 +08:00
Bruno Coelho
b7c8b6e6a5
[Swift] implement support for openapi3 deprecate (#6336) 2020-05-17 14:31:52 +08:00
Mike Welsh
5f0e7e81b1
Unwrap the AnyHashable and use the base value in Models.mustache (#6241)
* Unwrap the `AnyHashable` and use the `base` value in Models.mustache

- Unwraps the `AnyHashable` base in `NSURLResponse.allHeaderFields` instead of the `AnyHashable` itself

* Update samples (just running the script)

* Update samples
2020-05-12 20:09:17 +08:00
Bruno Coelho
577ebb687e
[swift] remove urlsession kvo usage (#6211) 2020-05-08 10:13:13 +08:00
William Cheng
a8885e838a
update swift5 samples (#6102) 2020-04-29 18:03:19 +08:00
iliaskarim
bafed337b5
Fix OpenAPI link in broken Swift4/5 README templates (#6035)
* Fix Swift README templates

* Update Swift4/5 samples
2020-04-24 10:36:52 +08:00
Bruno Coelho
7dd2d3c3eb
[swift5] fix warning (#5900) 2020-04-13 16:57:22 +08:00
Bruno Coelho
9ba7c4af3c
[swift5] stop hiding network error (#5603)
* [swift5] stop hiding network error

* [swift5] stop hiding network error
2020-03-17 15:42:09 +08:00
Bruno Coelho
86159cba49
[Swift] fix URLSession file upload (#5546)
* [swift5] - fix URLSession file upload

* [swift5] - fix URLSession file upload

* [swift5] fix file upload

* [swift5] - fix URLSession file upload

* [swift] add unit tests for file upload

* [swift] update samples copyright
2020-03-13 22:04:57 +08:00
Bruno Coelho
4208f3da82
[swift][client] validate http status code (#5226)
* [swift][client] validate http status code

* [swift][client] remove spaces in empty lines
2020-02-09 00:33:36 +08:00
Bruno Coelho
5bf501af40
[swift5] update visibility modifiers (#5204) 2020-02-05 09:51:29 +08:00
Bruno Coelho
95bd32d474 [swift5][client] return ErrorResponse.error when network parsing error (#5068) 2020-01-21 22:32:31 +08:00
William Cheng
7c31b7f206
[Swift] Minor improvements to swift 5 generator (#4910)
* minor improvements to swift 5 generator

* update readme

* update samples
2020-01-03 10:42:01 +08:00
Bruno Coelho
5cc5fbe76a New generator swift5 (#4086)
* [swift5] introduce new generator

* [swift5] add Swift Package Manager integration and update dependencies

* [swift5] run petstore

* [swift] update Swift 5 generator with Swift 4 changes

* [swift] update Swift 5 generator with Swift 4 changes

* [swift] make CodableHelper more customizable

* [swift] update pet projects

* [swift] update pet projects

* [swift] add nullable support

* [swift] make enums conform to CaseIterable

* [swift] date formatter add support for ISO8601 with and without milliseconds

* [swift] add urlsession support

* [swift] remove unecessary sample unwrapRequired

* [swift] rename JSONEncodableEncoding.swift to JSONDataEncoding.swift

* [swift] use result in generator internals

* [swift] cocoapods remove deprecated docset_url and add watchos deployment target

* [swift] Add ability to pass in a dedicated queue for processing network response (Fix for 230)

* [swift] update pet projects

* [swift] update docs

* [swift] add support for combine

* [swift] update docs

* [swift] update windows bat scripts

* [swift] update windows bat scripts

* [swift] update swift pet project tests

* [swift] update depencies

* [swift] make urlsession the default http client

* [swift] add urlsession sample project

* [swift] add urlsession sample project

* [swift] update docs

* [swift] improve combine unit tests

* [swift] update docs
2020-01-02 20:21:45 +08:00