6 Commits

Author SHA1 Message Date
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
Andrew
d91ff3a150
[GO] dont canonize headers (#10779)
* [GO]: dont canonize headers

* [GO]: update unit tests
2021-11-14 10:36:49 +08:00
William Cheng
22ac8faec7
Revert "[GO][Client] return GenericOpenAPIError instead of error in Execute() (#8137)" (#8427)
This reverts commit 1562afea3980484a7f1819c4f51b0d53a44a009f.
2021-01-14 13:59:21 +08:00
Aanisha Mishra
1562afea39
[GO][Client] return GenericOpenAPIError instead of error in Execute() (#8137)
* error to GenericOpenAPIError

* reformatted files

* reformat files

* spaces to tabs

* update petstore examples

* remove extra brackets

* update sample generation

* update go test cases

* update openapi3 go tests

* edit test samples

* update documentation
2020-12-17 16:39:43 +08:00
William Cheng
14d41310b9
[Go] replace go generator with go-experimental generator (#7337)
* replace go with go-experimental

* update samples

* extends with abstract go class

* rearrange

* remove deprecated

* minor fix

* remove go deprecated samples

* update pom, clean up samples

* mark generator as deprecated
2020-09-04 09:56:42 +08:00
Sebastien Rosset
75d5569e92 [go] Fix multiple go compilation errors and enable go integration test in pom.xml (#5075)
* fix go compilation error for properties of type map and array

* fix go compilation error for properties of type date and datetime

* add missing shell script to bin/utils/ensure-up-to-date

* add missing shell script to bin/utils/ensure-up-to-date

* add missing shell script to bin/utils/ensure-up-to-date

* fix issue with 'date' type

* fix time import problem

* Add missing pom.xml files for golang

* Add missing unit test files for golang

* Add missing unit test files for golang. Must use class name prefix for enums

* Fix unit tests for go-experimental in OAS3

* Fix unit tests for go-experimental in OAS3

* Add code comments in codegen

* Fix compilation errors of generated go code

* Fix compilation errors of generated go code

* remove antihax from go-experimental, it is no longer used

* copy python testfile for ut purpose

* add error checkout in unit tests

* add unit tests

* add code comments

* move test foo.png file to correct location

* run samples scripts

* run samples scripts
2020-01-24 09:54:26 +08:00