* 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
* 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
* 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 = ...`
* [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>
* 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
* fix!: accept should not force application JSON
Generated code offen provides range of accept methods.
This method improperly takes JSON as preferred
Example:
localVarHTTPHeaderAccepts := []string{"application/zip", "application/json"}
* chore: generated changes
* [go] More idiomatic godoc comments
* [go] Mark deprecated fields and functions
* [go] Minor mustache readability/consistency fixes
* [go] Mark deprecated operation parameters
* [go] Deprecate a petstore component property for testing
* [go] Apply deprecated godoc in Go servers also
* Revert a change to the Go Client code that broke
the ability to download files. This reverts the change
from 14d41310b9
* Missed import for "io/ioutil"
* update samples
Co-authored-by: icubbon <icubbon@gmail.com>
* 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
* [REQ][GO] add awsv4 signature support for client
OpenAPI format does not support AWS Signature method.
This commit add support for AWSv4 signature in GO client generation by adding "withAWSV4Signature" option.
"withAWSV4Signature" option is false by default.
Signed-off-by: Jérome Jutteau <jerome.jutteau@outscale.com>
* [REQ][GO] update samples for awsv4 signature support
Signed-off-by: Jérome Jutteau <jerome.jutteau@outscale.com>
* Add debug flag for go-experimental generator
* Check for errors before dumping the response in Go generator
* samples/openapi3: update samples for Go generators
* Add support for dumping request and response in Go generated clients
The following change adds a new configuration setting, which
controls whether clients want to dump the HTTP request and response.
Useful when debugging API calls and clients.
* samples: Update Go samples with XML
* Use log.Logger when dumping HTTP request and response in Go client
* Allow retrieving the underlying configuration for APIClient
- Needed for dynamically changing the underlying implementations and
for testing
- Fixes#1321 and #3412
* Added go-petstore-withXml changes suggested by circleci
* Add caution note about modifying configuration while live
* [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.
For the following spec:
``` yaml
responses:
"200":
description: Pong.
content:
text/plain:
schema:
type: string
```
The generated client currently fails with `undefined response type`.
In this scenario, `v interface{}` is a string pointer which can be
populated regardless of the content-type.
* renmae Go post process file env variable
* add back samples/client/petstore/c/libcurl.licence
* keep go samples up-to-date
* update go petstore samples
* update go samples without formatting
* support form-data file MIME `name` parameter
* update test spec and Go client for form-data file name
* update samples for ensure-up-to-date
* update mustache template
* update samples for Go client
* improve assignment location
* update samples