210 Commits

Author SHA1 Message Date
William Cheng
c50a775e0c
prepare 6.5.0 release (#14749) 2023-02-19 20:36:23 +08:00
William Cheng
93df0ff444
Prepare 6.4.0 release (#14748)
* prepare 6.4.0 release

* update samples
2023-02-19 18:53:20 +08:00
Beppe Catanese
68b944e6e6
Preserve order of securitySchemes (#14536)
* Remove alphabetical sort

* Update integration testing expectations

* Regenerate files
2023-02-10 22:20:19 +08:00
Beppe Catanese
515abf8c68
[Go] Export isNil function in utils.go (#14625)
* Rename isNil to IsNil

* Regenerate files
2023-02-07 22:15:30 +08:00
William Cheng
cda3517891
[Go] properly set header parameters on api clients (#14637)
* [Go] properly set header parameters on api clients

* update samples

* update samples

---------

Co-authored-by: Paul Sokolik <paul.sokolik@gmail.com>
2023-02-07 21:45:24 +08:00
Masato Yagi
d8f777d707
Fix the examples and import path in golang client documents (#14612)
* Correct import

* Fix generated client doc when there is no response body

* generate samples
2023-02-03 21:44:45 +08:00
Gonzalo Gomez
68b41eeeea
[GO][Client] Don't import io/ioutil package that has been deprecated as of Go 1.16 (#14476)
* io/ioutil has been deprecated ass of Go 1.16, the same functionality is now provided by package io or package os

* run pr checklist

* Bump go version to 1.16.

* Run pr checklist

* Bump version to 1.18

* Run pr check list
2023-02-03 15:50:12 +08:00
William Cheng
31a89e35cb
Prepare 6.4.0 (#14582)
* update to 6.4.0 snapshot

* update samples

* update doc
2023-02-01 22:44:40 +08:00
William Cheng
8f2676c5c2
Prepare v6.3.0 release (#14580)
* 6.3.0 release

* fix maven plugin test

* update samples

* update doc

* fix tests in windows
2023-02-01 20:52:29 +08:00
Ian Cubbon
6e780218ad
[Go] Client Models using AllOf, OneOf, or AnyOf Correctly Include time and os imports (Attempt 2) (#14459)
* Currently, if a Model is an allOf the time and os imports are not correctly added to the generated file. This was introduced recently with a fix to not include those imports when the model is a composedSchema #13833. The logic in that fix was just slightly off as an allOf should be treated the same as a standard model.

If a model is an AllOf or does not have any composed schemas at all, the sub-models are in-lined defined in the struct. In this case, the standard logic of including the time and os imports apply.

If a model is a OneOf or AnyOf, the sub-models are included as pointers to the defined model. In this case, do not include those items in the logic of including time and os imports.

* Update example to include a time in an allOf

* Add back the accidentally removed nil check
2023-01-20 01:53:19 +08:00
Vikrant Balyan
9f502930ea
[Go] Adds a sha256 configuration option to hs2019 (#14467)
* enables configuration of sha256 with hs2019

* committing generated examples

Co-authored-by: Aanisha Mishra <aanisha.mishra05@gmail.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2023-01-16 23:21:53 +08:00
Ian Cubbon
74073df27c
[GO][Client] Use a *os.File for the API Client when uploading and downloading (#14340)
* Change the return type of a file back to a pointer

* Change the api template to handle not double pointer-ing return types of os.File

* Fix unit tests

* Couple more unit test fixes
2023-01-16 16:51:04 +08:00
Ian Cubbon
92775ceffc
[Go] [Client] Don't Explode Query Params (#14447)
* If the collection type is csv, that means 'dont explode the query params'.

* Simplify the logic just a tad

* url.Values -> Has was added in go1.17 but there are CI tests running at 1.16
2023-01-14 00:48:27 +08:00
Beppe Catanese
d0800c46e1
12551 [Go] Skipping marshalling of readonly fields (#14335)
* Skip toSerialize for readOnly fields

* Commit regenerated files
2023-01-02 23:35:54 +08:00
Bill Collins
71a7a822f4
Nullable subschemas (#13850)
* Add failing example of nullable subschema

* Do not generate new subschemas when nullable

* Generate client

* Update go example schema/test
2022-12-22 20:44:05 +08:00
William Cheng
811e0de1be
replace spaces with tabs in go client (#14189) 2022-12-06 13:04:58 +08:00
Ian Cubbon
63629ad51c
[Go] File Download Fix Return Type (#14046)
* Changes manually cherry-picked (for the most part) from https://github.com/OpenAPITools/openapi-generator/pull/12685/files

* Examples updated post changes

* Missed a change in the mustache template

* Update examples after last fix

* Missed dereference for required files

* Update unit tests

* Missed another test case update

* `f := *f` isn't quite the same as `*f, err = ...`
2022-12-06 12:21:39 +08:00
Ian Cubbon
903ff0ba47
Trim any space when we format the error message sent back to the client. (#14066)
A trailing whitespace gets included if the error is not a RFC7807 model.
2022-11-20 22:35:21 +08:00
Vittorio Parrella
4487042f0d
Issue 11401 - report correctly the parameters with the deep object specification (#13909)
* issue #11401 - Go client generator doesn't support deepObject in query

* samples generation

* fix generation

* fix generation

* generated samples

# Conflicts:
#	samples/client/petstore/go/go-petstore/model_200_response.go
#	samples/client/petstore/go/go-petstore/model_additional_properties_any_type.go
#	samples/client/petstore/go/go-petstore/model_client.go

* Fixed unit tests

* revert to http connection for tests

* fix model_simple generation

* Fix parameter encoding issue

* simplified routine

* fix test url

* adapted for latest master, necessary generation

* samples generation

* sync with new master, regenerate samples

* added api client test
2022-11-20 15:09:33 +08:00
William Cheng
6a7b8fcebe
[Go][client] better code format, regenerate go client tests (#13940)
* go client regenerate test

* replace 4-space with tabs, regenerate tests
2022-11-08 10:40:28 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
Gustavo Bazan
d5f896fe20
[GO] fix identation for model_simple.mustache (#13919)
* [GO] fix identation for model_simple.mustache

This corrects the identation for recnet changes in #13843

* running the scripts
2022-11-05 22:47:09 +08:00
William Cheng
2947d147b4 Merge remote-tracking branch 'origin/master' into 6.3.x 2022-11-01 17:42:59 +08:00
William Cheng
b0ce532bdc
Prepare 6.2.1 release (#13871)
* prepare 6.2.1 release

* revert change

* fix maven plugin test

* update meta
2022-11-01 17:16:46 +08:00
Nick Ufer
a04b2623b0
[GO] fix: stops checking for nil for structs (#13843)
* [GO] fix: stops checking for nil for structs

* [GO] chore: regenerates samples
2022-10-31 22:50:02 +08:00
Beppe Catanese
1de28c8a72
Improve error message (rfc7807) (#13680)
* Add func formatErrorMessage

* Add unit test

* Commit generated code

* Fix indentation

* Using tabs

* Set error before model

* Commit generated code

* Fix tabs

* Commit generated code

* Fix tabs

* Fix tabs

* Commit generated code
2022-10-31 22:35:16 +08:00
William Cheng
803e2cdb60 update go samples 2022-10-18 23:47:01 +08:00
Maëlick
41255c1f18
Fix staticcheck ST1005 errors in generated Go client (#13633)
* Fix staticcheck ST1005 errors in go client

* Samples updated

* sample test fix for openapiv3 petstore go client
2022-10-18 22:46:49 +08:00
William Cheng
02d99eaf12
add tests for go oenof datetime (#13713) 2022-10-17 17:37:02 +08:00
William Cheng
4d03c9272b prepare 6.3.0 snapshot 2022-10-15 15:40:47 +08:00
Beppe Catanese
48928d8efe
[Go] Generate test files (#13560)
* Process api_test.mustache

* Create api_test.mustache

* Add test and helper method

* Commit all (re)generated files

* Commit all (re)generated files

* Fix indentation
2022-10-07 23:15:09 +08:00
William Cheng
94bc2ed19c
add tests for #13606 (#13618) 2022-10-07 09:53:55 +08:00
William Cheng
ac7ebf67dd
Prepare 6.2.1 (#13517)
* update to 6.2.1-SNAPSHOT

* update samples

* update doc
2022-09-25 00:10:30 +08:00
William Cheng
24f476a381
prepare 6.2.0 release (#13514)
* set release version to 6.2.0

* update samples

* comment out rust server test in travis
2022-09-24 21:44:42 +08:00
Justin Black
43375b9392
Upgrades swagger parser to 2.1.1, allows ingestion of 3.1.0 specs (#13133)
* Upgrades swagger-parser

* Removes additional property and halting of spec processing

* Updates tests

* Docs updated
2022-09-17 08:33:47 -07:00
William Cheng
928070c57a
Prepare 6.1.1 SNAPSHOT version (#13399)
* prepare v6.1.1

* update samples

* update doc
2022-09-11 19:08:23 +08:00
William Cheng
43dbb5ff9c
6.1.0 release (#13398) 2022-09-11 17:16:07 +08:00
William Cheng
2e89004683 update go samples 2022-08-24 23:43:57 +08:00
William Cheng
1c0d6d84d8
[Go] Fix missing import for array/map of file (#13143)
* fix missing import for array/map of file in go client

* add new files
2022-08-10 16:26:10 +08:00
William Cheng
a6ce5f711b
Better logic to handle duplicated properties in parent, child models (#13135)
* better logic to handle duplicated properties in child, parent models

* add tests, update samples
2022-08-10 14:15:25 +08:00
William Cheng
6cae0fbb78 Merge remote-tracking branch 'origin/6.1.x' 2022-07-04 01:22:51 +08:00
William Cheng
9e412edb64
Prepare 6.0.1 release (#12762)
* update to v6.0.1

* update doc

* update samples
2022-07-03 23:36:46 +08:00
William Cheng
c982421495
[Go] use EqualFold instead instead of comparing strings in lower case (#12741)
* use EqualFold instead in the go client

* update samples
2022-06-30 23:09:10 +08:00
William Cheng
3bc4416554 update go samples 2022-06-11 09:24:50 +08:00
Beppe Catanese
aeb40ab0ae
[Go] Address Gosec vulnerabilities in Go client mustache template (#12540)
* Fix potential file inclusion via variable

* Fix deferring unsafe method "Close" on type "*os.File"

* Update samples

* Correction to use existing variable

* Correction generated samples
2022-06-11 09:10:48 +08:00
William Cheng
5bd94b8fa0 prepare 6.1.x 2022-05-26 12:58:25 +08:00
William Cheng
36a9cf394d
update samples (#12466) 2022-05-26 12:13:59 +08:00
William Cheng
69f79fb789
Prepare 6.0.0 release (#12463)
* prepare 6.0.0 release

* update samples

* update meta codegen
2022-05-26 10:28:01 +08:00
William Cheng
12cdacabbf
[Inline model resolver] better handling of inline responses and bug fixes (#12353)
* better handling of inline response schemas, bug fixes

* update samples

* add new files

* better code format

* remove unused ruby files

* fix java test

* remove unused js spec files

* remove inline_response_default_test.dart

* fix webclient tests

* fix spring tests
2022-05-13 10:17:59 +08:00
William Cheng
d135f1992e
Fix inline allOf in request body (#12348)
* fix inline allof in request body

* update samples
2022-05-12 12:51:36 +08:00