104 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
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
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
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
Andrei Matei
c62ebc377e
[Go] Add authentication methods only if referenced in input spec (#14138)
* Add conditions for auth methods

* Add extra auth method validations

* Regenerate example SDK

* Clean-up tests

* Fix indentation and go.sum
2022-12-01 15:29:59 +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
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
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
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
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
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
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
2d4a01aa70 Revert "Prepare 6.0.0 beta release (#12039)"
This reverts commit 914b539eea7097ad2b4323d20c8f95144782cb68.
2022-04-04 12:17:12 +08:00
William Cheng
914b539eea
Prepare 6.0.0 beta release (#12039)
* update to 6.0.0-beta

* update samples
2022-04-04 10:29:49 +08:00
William Cheng
d530e1baec
minor enhancement to code format in go client (#11657) 2022-02-19 13:11:28 +08:00
moznion
d6a97b0c39
Remove dummy variable declaration for context.Context from generated go code (#11641)
Originally, this dummy declaration was needed because there was the
possibility of the generated code doesn't use `context.Context` and then
if it imported that package, go compiler complains that and makes an error.
ref: 3ed1aa8e79/modules/swagger-codegen/src/main/resources/go/api.mustache (L30)

However, now this dummy placement is no longer needed because the
generated code always uses `context.Context`.

Signed-off-by: moznion <moznion@mail.moznion.net>
2022-02-18 11:34:05 +08:00
William Cheng
b6c445cdc3
update swagger core, jackson to newer version (#11545) 2022-02-08 13:31:20 +08:00
William Cheng
c8b84c4d03 Merge remote-tracking branch 'origin/master' into 6.0.x 2022-01-30 18:01:35 +08:00
hackerman
93488f4195
Resolve several issues in generated Go code (#8491)
* [go] use regular stdlib import names

* [go] support primitive oneOf types

See #8489

* [go] improve pbv/pbr handling

Improves the way pass-by-value and pass-by-reference variables are used.

Closes #8489

* [go] improve generated documentation

* [go] adopt pointer changes in interface

* [go] regenerate sample

* [go] resolve pointer issues

* [go] regenerate clients and avoid pointers on primitive return values

* [go] improve Exec() return value handling

* [go] regernate files

* [go] use go modules

* [go] properly handle polymorph decode

If polymorphism without discriminator was used, the previous code was unable to properly decode the vaules. By using a strict decoder, which rejects unknown fields, type guessing now works.

* [go] make GetActualInstance not panic on nil

* [go] return GenericOpenAPIError as pointer

* [go] clarify helper function godoc

* [go] address test regression error type

* [go] regenerate go samples

* [go] resolve go mod issues and test regressions

* [go] resolve merge conflicts and regenerate

* [go] resolve merge conflicts

* [go] Replace spaces with tabs

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

* [go] Replace spaces with tabs

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

Co-authored-by: Jiri Kuncar <jiri.kuncar@gmail.com>
2022-01-21 16:54:09 +08:00
Justin Black
ac55ac9d55
Samples and docs regenerated (#11194) 2021-12-28 11:39:13 -08:00
William Cheng
6269a9810c
Prepare 5.3.1 release (#11161)
* prepare v5.3.1 release

* update samples
2021-12-21 18:20:13 +08:00
William Cheng
e00efe7c8d Merge remote-tracking branch 'origin/5.4.x' into 6.0.x 2021-12-07 00:12:13 +08:00
William Cheng
2b7910c875 Merge remote-tracking branch 'origin/master' into 5.4.x 2021-12-06 23:57:07 +08:00
Ian Cubbon
6779c33b9d
[GO][Client] Multipart/form-data Request Support More Than One File (#10843)
* Instead of limiting a request to a single file when
performing an upload, use a slice of files so an
arbitrary number of files can be used in the form.

* Remove commented out line of code

* Update examples for multi-form file fix for multiple files

* Convert spaces to tabs for indentation

* Updated examples to have tabs instead of spaces

* Add an example of a multipart/form-data OA3 schema
that contains two files to be uploaded
2021-11-22 16:27:43 +08:00
WILLIAM CHENG
eb75515715 Merge branch '5.4.x' into 6.0.x 2021-11-21 09:50:47 +08:00
WILLIAM CHENG
78fe5dc427 Merge remote-tracking branch 'origin/master' into 5.4.x 2021-11-21 09:43:21 +08:00
Andrew
d91ff3a150
[GO] dont canonize headers (#10779)
* [GO]: dont canonize headers

* [GO]: update unit tests
2021-11-14 10:36:49 +08:00