16 Commits

Author SHA1 Message Date
William Cheng
f0519eb934
Fix Go client tests (#15505)
* fix go tests

* more fixes

* fix mock
2023-05-14 21:17:48 +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
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
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
William Cheng
1065595a9a
Fix integration tests (Travis, CircleCI) (#5672)
* fix php tests

* fix scala tests

* update ts angular v6 rest

* fix user create test

* fix spring cloud test

* comment out user delete

* fix angular v7 tests

* fix user test

* fix tests

* fix go exp tests

* commented out delete user tests

* comment out delete user tests in go openapi 3

* fix clojure tests
2020-03-23 14:01:12 +08:00
Johan Brandhorst
2b55413371 [Go][Client] Use configured Scheme and Host in requests (#3115)
* [Go][Client] Ensure test errors don't crash

Previously we did not interrupt execution of a test case
when an error was returned from an API call. This was
causing the tests to crash as soon as we try to
dereference the response.

We now fail the tests as soon as the first API error
is received.

* [Go][Client] Use configured Scheme and Host in requests

Previously we were simply setting the Host header and
completely ignoring the configured scheme.
2019-06-25 12:02:20 +08:00
John Wang
7eb2acaf71 update go client test dependencies (#468) 2018-07-05 20:34:32 +08:00
antihax
831e8d7c87 [Go] Add context to all requests for tracing, logging, cancellations, etc. (#6997)
* Add context to all requests for tracing, logging, cancellations, etc.

* Fix compile error with when call has no parameters.
2017-11-30 00:30:35 +08:00
antihax
3ed1aa8e79 Rewrite of Go Client #2 (#5037)
* Rewrite of Go Client

* Revert to older version of context.Context

* Clean and bulk up concurrency test.

* Correct {{path}} to {{{path}}}

* change custom date type to string.

* Add APIKey authentication

* Correct missing line from resolving conflicts.

Correct missing line from resolving conflicts.
2017-04-22 01:17:18 +08:00
Guo Huang
56d1b896b7 enable testing array after resty fixed their issue 2016-04-30 23:35:04 -07:00
Guo Huang
09248bcd25 added comments for skip test 2016-04-29 16:17:18 -07:00
Guo Huang
ed219f8a9a fix typo 2016-04-29 16:10:10 -07:00
Guo Huang
ad28879fce changed tabs to spaces 2016-04-29 16:02:41 -07:00
Guo Huang
a6e45bf97d added user api test 2016-04-29 15:59:21 -07:00