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>
This commit is contained in:
hackerman 2022-01-21 09:54:09 +01:00 committed by GitHub
parent 55ffdb791f
commit 93488f4195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
91 changed files with 2705 additions and 1898 deletions

View File

@ -30,7 +30,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
```golang
import sw "./{{packageName}}"
import {{packageName}} "{{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}}"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
@ -48,7 +48,7 @@ Default configuration comes with `Servers` field that contains server objects as
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerIndex, 1)
```
### Templated Server URL
@ -56,7 +56,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
ctx := context.WithValue(context.Background(), {{packageName}}.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
@ -70,10 +70,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
```
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
ctx := context.WithValue(context.Background(), {{packageName}}.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
ctx = context.WithValue(context.Background(), {{packageName}}.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
@ -117,7 +117,7 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i
Example
```golang
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
```
@ -142,7 +142,7 @@ r, err := client.Service.Operation(auth, args)
Example
```golang
authConfig := sw.HttpSignatureAuth{
authConfig := client.HttpSignatureAuth{
KeyId: "my-key-id",
PrivateKeyPath: "rsa.pem",
Passphrase: "my-passphrase",

View File

@ -4,17 +4,17 @@ package {{packageName}}
{{#operations}}
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
{{#imports}} "{{import}}"
{{/imports}}
)
// Linger please
var (
_ _context.Context
_ context.Context
)
{{#generateInterfaces}}
@ -28,7 +28,7 @@ type {{classname}} interface {
{{{unescapedNotes}}}
{{/notes}}
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
@param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}}
@return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request
{{#isDeprecated}}
@ -36,14 +36,14 @@ type {{classname}} interface {
Deprecated
{{/isDeprecated}}
*/
{{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request
{{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request
// {{nickname}}Execute executes the request{{#returnType}}
// @return {{{.}}}{{/returnType}}
{{#isDeprecated}}
// Deprecated
{{/isDeprecated}}
{{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error)
{{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error)
{{/operation}}
}
{{/generateInterfaces}}
@ -53,8 +53,11 @@ type {{classname}}Service service
{{#operation}}
type {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request struct {
ctx _context.Context
ApiService {{#generateInterfaces}}{{classname}}{{/generateInterfaces}}{{^generateInterfaces}}*{{classname}}Service{{/generateInterfaces}}
ctx context.Context{{#generateInterfaces}}
ApiService {{classname}}
{{/generateInterfaces}}{{^generateInterfaces}}
ApiService *{{classname}}Service
{{/generateInterfaces}}
{{#allParams}}
{{paramName}} {{^isPathParam}}*{{/isPathParam}}{{{dataType}}}
{{/allParams}}
@ -71,7 +74,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Reques
return r
}{{/isPathParam}}{{/allParams}}
func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) Execute() ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {
func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) Execute() ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) {
return r.ApiService.{{nickname}}Execute(r)
}
@ -82,7 +85,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Reques
{{{unescapedNotes}}}
{{/notes}}
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().{{#pathParams}}
@param {{paramName}}{{#description}} {{{.}}}{{/description}}{{/pathParams}}
@return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request
{{#isDeprecated}}
@ -90,7 +93,7 @@ func (r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Reques
Deprecated
{{/isDeprecated}}
*/
func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request {
func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#pathParams}}, {{paramName}} {{{dataType}}}{{/pathParams}}) {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request {
return {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request{
ApiService: a,
ctx: ctx,
@ -105,27 +108,27 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#pathParam
{{#isDeprecated}}
// Deprecated
{{/isDeprecated}}
func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{{.}}}, {{/returnType}}*_nethttp.Response, error) {
func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&classname}}{{/structPrefix}}Api{{operationId}}Request) ({{#returnType}}{{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}, {{/returnType}}*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.Method{{httpMethod}}
localVarHTTPMethod = http.Method{{httpMethod}}
localVarPostBody interface{}
formFiles []formFile
{{#returnType}}
localVarReturnValue {{{.}}}
localVarReturnValue {{^isArray}}{{^returnTypeIsPrimitive}}*{{/returnTypeIsPrimitive}}{{/isArray}}{{{.}}}
{{/returnType}}
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "{{{classname}}}Service.{{{nickname}}}")
if err != nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, GenericOpenAPIError{error: err.Error()}
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "{{{path}}}"{{#pathParams}}
localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.PathEscape(parameterToString(r.{{paramName}}, "{{collectionFormat}}")), -1){{/pathParams}}
localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", url.PathEscape(parameterToString(r.{{paramName}}, "{{collectionFormat}}")), -1){{/pathParams}}
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
{{#allParams}}
{{#required}}
{{^isPathParam}}
@ -265,7 +268,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
}
{{/required}}
if {{paramName}}LocalVarFile != nil {
fbs, _ := _ioutil.ReadAll({{paramName}}LocalVarFile)
fbs, _ := ioutil.ReadAll({{paramName}}LocalVarFile)
{{paramName}}LocalVarFileBytes = fbs
{{paramName}}LocalVarFileName = {{paramName}}LocalVarFile.Name()
{{paramName}}LocalVarFile.Close()
@ -344,15 +347,15 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -399,7 +402,7 @@ func (a *{{{classname}}}Service) {{nickname}}Execute(r {{#structPrefix}}{{&class
{{#returnType}}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -41,8 +41,8 @@ func main() {
{{/allParams}}
configuration := {{goImportAlias}}.NewConfiguration()
api_client := {{goImportAlias}}.NewAPIClient(configuration)
resp, r, err := api_client.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute()
apiClient := {{goImportAlias}}.NewAPIClient(configuration)
resp, r, err := apiClient.{{classname}}.{{operationId}}(context.Background(){{#pathParams}}, {{paramName}}{{/pathParams}}){{#allParams}}{{^isPathParam}}.{{vendorExtensions.x-export-param-name}}({{paramName}}){{/isPathParam}}{{/allParams}}.Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `{{classname}}.{{operationId}}``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -477,6 +477,13 @@ func reportError(format string, a ...interface{}) error {
return fmt.Errorf(format, a...)
}
// A wrapper for strict JSON decoding
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}
// Set request body from an interface{}
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
if bodyBuf == nil {

View File

@ -3,7 +3,7 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}{{#isGoSubmodule}}/{{packageName}}
go 1.13
require (
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558
{{#withAWSV4Signature}}
github.com/aws/aws-sdk-go v1.34.14
{{/withAWSV4Signature}}

View File

@ -1,14 +1,16 @@
// {{classname}} - {{{description}}}{{^description}}struct for {{{classname}}}{{/description}}
type {{classname}} struct {
{{#oneOf}}
{{{.}}} *{{{.}}}
{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} *{{{.}}}
{{/oneOf}}
}
{{#oneOf}}
// {{{.}}}As{{classname}} is a convenience function that returns {{{.}}} wrapped in {{classname}}
func {{{.}}}As{{classname}}(v *{{{.}}}) {{classname}} {
return {{classname}}{ {{{.}}}: v}
func {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}As{{classname}}(v *{{{.}}}) {{classname}} {
return {{classname}}{
{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}: v,
}
}
{{/oneOf}}
@ -29,7 +31,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
{{#-first}}
// use discriminator value to speed up the lookup
var jsonDict map[string]interface{}
err = json.Unmarshal(data, &jsonDict)
err = newStrictDecoder(data).Decode(&jsonDict)
if err != nil {
return fmt.Errorf("Failed to unmarshal JSON into map for the discriminator lookup.")
}
@ -84,24 +86,24 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
{{^useOneOfDiscriminatorLookup}}
match := 0
{{#oneOf}}
// try to unmarshal data into {{{.}}}
err = json.Unmarshal(data, &dst.{{{.}}})
// try to unmarshal data into {{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}
err = newStrictDecoder(data).Decode(&dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}})
if err == nil {
json{{{.}}}, _ := json.Marshal(dst.{{{.}}})
if string(json{{{.}}}) == "{}" { // empty struct
dst.{{{.}}} = nil
json{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}, _ := json.Marshal(dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}})
if string(json{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}) == "{}" { // empty struct
dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil
} else {
match++
}
} else {
dst.{{{.}}} = nil
dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil
}
{{/oneOf}}
if match > 1 { // more than 1 match
// reset to nil
{{#oneOf}}
dst.{{{.}}} = nil
dst.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} = nil
{{/oneOf}}
return fmt.Errorf("Data matches more than one schema in oneOf({{classname}})")
@ -116,8 +118,8 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
// Marshal data from the first non-nil pointers in the struct to JSON
func (src {{classname}}) MarshalJSON() ([]byte, error) {
{{#oneOf}}
if src.{{{.}}} != nil {
return json.Marshal(&src.{{{.}}})
if src.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} != nil {
return json.Marshal(&src.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}})
}
{{/oneOf}}
@ -126,9 +128,12 @@ func (src {{classname}}) MarshalJSON() ([]byte, error) {
// Get the actual instance
func (obj *{{classname}}) GetActualInstance() (interface{}) {
if obj == nil {
return nil
}
{{#oneOf}}
if obj.{{{.}}} != nil {
return obj.{{{.}}}
if obj.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}} != nil {
return obj.{{#lambda.titlecase}}{{{.}}}{{/lambda.titlecase}}
}
{{/oneOf}}

View File

@ -19,7 +19,7 @@ type {{classname}} struct {
{{#deprecated}}
// Deprecated
{{/deprecated}}
{{name}} {{^required}}{{^isNullable}}*{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
{{name}} {{^required}}{{^isNullable}}{{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{/isNullable}}{{/required}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
{{/vars}}
{{#isAdditionalPropertiesTrue}}
AdditionalProperties map[string]interface{}
@ -121,20 +121,20 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} {
{{#deprecated}}
// Deprecated
{{/deprecated}}
func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool) {
func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) {
if o == nil {{#isNullable}}{{#vendorExtensions.x-golang-is-container}}|| o.{{name}} == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} {
return nil, false
}
{{#isNullable}}
{{#vendorExtensions.x-golang-is-container}}
return &o.{{name}}, true
return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true
{{/vendorExtensions.x-golang-is-container}}
{{^vendorExtensions.x-golang-is-container}}
return o.{{name}}.Get(), o.{{name}}.IsSet()
{{/vendorExtensions.x-golang-is-container}}
{{/isNullable}}
{{^isNullable}}
return &o.{{name}}, true
return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true
{{/isNullable}}
}
@ -176,7 +176,7 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} {
{{/vendorExtensions.x-golang-is-container}}
{{/isNullable}}
{{^isNullable}}
return *o.{{name}}
return {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}o.{{name}}
{{/isNullable}}
}
@ -188,13 +188,13 @@ func (o *{{classname}}) Get{{name}}() {{vendorExtensions.x-go-base-type}} {
{{#deprecated}}
// Deprecated
{{/deprecated}}
func (o *{{classname}}) Get{{name}}Ok() (*{{vendorExtensions.x-go-base-type}}, bool) {
func (o *{{classname}}) Get{{name}}Ok() ({{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{vendorExtensions.x-go-base-type}}, bool) {
if o == nil {{^isNullable}}|| o.{{name}} == nil{{/isNullable}}{{#isNullable}}{{#vendorExtensions.x-golang-is-container}}|| o.{{name}} == nil{{/vendorExtensions.x-golang-is-container}}{{/isNullable}} {
return nil, false
}
{{#isNullable}}
{{#vendorExtensions.x-golang-is-container}}
return &o.{{name}}, true
return {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}o.{{name}}, true
{{/vendorExtensions.x-golang-is-container}}
{{^vendorExtensions.x-golang-is-container}}
return o.{{name}}.Get(), o.{{name}}.IsSet()
@ -224,11 +224,11 @@ func (o *{{classname}}) Set{{name}}(v {{vendorExtensions.x-go-base-type}}) {
o.{{name}} = v
{{/vendorExtensions.x-golang-is-container}}
{{^vendorExtensions.x-golang-is-container}}
o.{{name}}.Set(&v)
o.{{name}}.Set({{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v)
{{/vendorExtensions.x-golang-is-container}}
{{/isNullable}}
{{^isNullable}}
o.{{name}} = &v
o.{{name}} = {{^isArray}}{{^isFreeFormObject}}&{{/isFreeFormObject}}{{/isArray}}v
{{/isNullable}}
}
{{#isNullable}}

View File

@ -1,13 +1,13 @@
type Nullable{{{classname}}} struct {
value *{{{classname}}}
value {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{{classname}}}
isSet bool
}
func (v Nullable{{classname}}) Get() *{{classname}} {
func (v Nullable{{classname}}) Get() {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}} {
return v.value
}
func (v *Nullable{{classname}}) Set(val *{{classname}}) {
func (v *Nullable{{classname}}) Set(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) {
v.value = val
v.isSet = true
}
@ -21,7 +21,7 @@ func (v *Nullable{{classname}}) Unset() {
v.isSet = false
}
func NewNullable{{classname}}(val *{{classname}}) *Nullable{{classname}} {
func NewNullable{{classname}}(val {{^isArray}}{{^isFreeFormObject}}*{{/isFreeFormObject}}{{/isArray}}{{classname}}) *Nullable{{classname}} {
return &Nullable{{classname}}{value: val, isSet: true}
}

View File

@ -10,7 +10,7 @@ import (
"golang.org/x/oauth2"
sw "./go-petstore"
sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore"
)
func TestOAuth2(t *testing.T) {
@ -39,7 +39,7 @@ func TestOAuth2(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()
@ -74,7 +74,7 @@ func TestBasicAuth(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(auth).Body(newPet).Execute()
@ -104,7 +104,7 @@ func TestAccessToken(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil).Body(newPet).Execute()
@ -130,11 +130,11 @@ func TestAccessToken(t *testing.T) {
}
func TestAPIKeyNoPrefix(t *testing.T) {
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123"}})
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123"}})
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()
@ -165,11 +165,11 @@ func TestAPIKeyNoPrefix(t *testing.T) {
}
func TestAPIKeyWithPrefix(t *testing.T) {
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123", Prefix: "Bearer"}})
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123", Prefix: "Bearer"}})
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil).Body(newPet).Execute()
@ -202,7 +202,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
func TestDefaultHeader(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
sw "./go-petstore"
sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore"
)
// TestPutBodyWithFileSchema ensures a model with the name 'File'
@ -15,7 +15,7 @@ func TestPutBodyWithFileSchema(t *testing.T) {
schema := sw.FileSchemaTestClass{
File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")},
Files: &[]sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}}
Files: []sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}}
r, err := client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(schema).Execute()

View File

@ -22,7 +22,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
```golang
import sw "./petstore"
import petstore "github.com/GIT_USER_ID/GIT_REPO_ID"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
@ -40,7 +40,7 @@ Default configuration comes with `Servers` field that contains server objects as
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
ctx := context.WithValue(context.Background(), petstore.ContextServerIndex, 1)
```
### Templated Server URL
@ -48,7 +48,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
ctx := context.WithValue(context.Background(), petstore.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
@ -62,10 +62,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
```
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
ctx := context.WithValue(context.Background(), petstore.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
ctx = context.WithValue(context.Background(), petstore.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},

View File

@ -12,15 +12,15 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type AnotherFakeApi interface {
@ -30,21 +30,21 @@ type AnotherFakeApi interface {
To test special tags and operation ID starting with number
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCall123TestSpecialTagsRequest
*/
Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest
Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest
// Call123TestSpecialTagsExecute executes the request
// @return Client
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error)
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error)
}
// AnotherFakeApiService AnotherFakeApi service
type AnotherFakeApiService service
type ApiCall123TestSpecialTagsRequest struct {
ctx _context.Context
ctx context.Context
ApiService AnotherFakeApi
body *Client
}
@ -55,7 +55,7 @@ func (r ApiCall123TestSpecialTagsRequest) Body(body Client) ApiCall123TestSpecia
return r
}
func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) {
func (r ApiCall123TestSpecialTagsRequest) Execute() (*Client, *http.Response, error) {
return r.ApiService.Call123TestSpecialTagsExecute(r)
}
@ -64,10 +64,10 @@ Call123TestSpecialTags To test special tags
To test special tags and operation ID starting with number
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCall123TestSpecialTagsRequest
*/
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest {
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest {
return ApiCall123TestSpecialTagsRequest{
ApiService: a,
ctx: ctx,
@ -76,24 +76,24 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) Api
// Execute executes the request
// @return Client
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) {
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Client
localVarReturnValue *Client
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/another-fake/dummy"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return localVarReturnValue, nil, reportError("body is required and must be specified")
}
@ -127,15 +127,15 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -144,7 +144,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

File diff suppressed because it is too large Load Diff

View File

@ -12,15 +12,15 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type FakeClassnameTags123Api interface {
@ -30,21 +30,21 @@ type FakeClassnameTags123Api interface {
To test class name in snake case
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClassnameRequest
*/
TestClassname(ctx _context.Context) ApiTestClassnameRequest
TestClassname(ctx context.Context) ApiTestClassnameRequest
// TestClassnameExecute executes the request
// @return Client
TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error)
TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error)
}
// FakeClassnameTags123ApiService FakeClassnameTags123Api service
type FakeClassnameTags123ApiService service
type ApiTestClassnameRequest struct {
ctx _context.Context
ctx context.Context
ApiService FakeClassnameTags123Api
body *Client
}
@ -55,7 +55,7 @@ func (r ApiTestClassnameRequest) Body(body Client) ApiTestClassnameRequest {
return r
}
func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
func (r ApiTestClassnameRequest) Execute() (*Client, *http.Response, error) {
return r.ApiService.TestClassnameExecute(r)
}
@ -64,10 +64,10 @@ TestClassname To test class name in snake case
To test class name in snake case
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClassnameRequest
*/
func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) ApiTestClassnameRequest {
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiTestClassnameRequest {
return ApiTestClassnameRequest{
ApiService: a,
ctx: ctx,
@ -76,24 +76,24 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) Api
// Execute executes the request
// @return Client
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) {
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Client
localVarReturnValue *Client
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/fake_classname_test"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return localVarReturnValue, nil, reportError("body is required and must be specified")
}
@ -141,15 +141,15 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -158,7 +158,7 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -12,17 +12,17 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
"os"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type PetApi interface {
@ -30,127 +30,127 @@ type PetApi interface {
/*
AddPet Add a new pet to the store
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAddPetRequest
*/
AddPet(ctx _context.Context) ApiAddPetRequest
AddPet(ctx context.Context) ApiAddPetRequest
// AddPetExecute executes the request
AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error)
AddPetExecute(r ApiAddPetRequest) (*http.Response, error)
/*
DeletePet Deletes a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId Pet id to delete
@return ApiDeletePetRequest
*/
DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest
DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest
// DeletePetExecute executes the request
DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error)
DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error)
/*
FindPetsByStatus Finds Pets by status
Multiple status values can be provided with comma separated strings
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByStatusRequest
*/
FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest
FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest
// FindPetsByStatusExecute executes the request
// @return []Pet
FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error)
FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error)
/*
FindPetsByTags Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByTagsRequest
Deprecated
*/
FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest
FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest
// FindPetsByTagsExecute executes the request
// @return []Pet
// Deprecated
FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error)
FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error)
/*
GetPetById Find pet by ID
Returns a single pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to return
@return ApiGetPetByIdRequest
*/
GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest
GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest
// GetPetByIdExecute executes the request
// @return Pet
GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error)
GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error)
/*
UpdatePet Update an existing pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiUpdatePetRequest
*/
UpdatePet(ctx _context.Context) ApiUpdatePetRequest
UpdatePet(ctx context.Context) ApiUpdatePetRequest
// UpdatePetExecute executes the request
UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error)
UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error)
/*
UpdatePetWithForm Updates a pet in the store with form data
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet that needs to be updated
@return ApiUpdatePetWithFormRequest
*/
UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest
UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest
// UpdatePetWithFormExecute executes the request
UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error)
UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error)
/*
UploadFile uploads an image
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileRequest
*/
UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest
UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest
// UploadFileExecute executes the request
// @return ApiResponse
UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error)
UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error)
/*
UploadFileWithRequiredFile uploads an image (required)
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileWithRequiredFileRequest
*/
UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest
UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest
// UploadFileWithRequiredFileExecute executes the request
// @return ApiResponse
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error)
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error)
}
// PetApiService PetApi service
type PetApiService service
type ApiAddPetRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
body *Pet
}
@ -161,17 +161,17 @@ func (r ApiAddPetRequest) Body(body Pet) ApiAddPetRequest {
return r
}
func (r ApiAddPetRequest) Execute() (*_nethttp.Response, error) {
func (r ApiAddPetRequest) Execute() (*http.Response, error) {
return r.ApiService.AddPetExecute(r)
}
/*
AddPet Add a new pet to the store
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAddPetRequest
*/
func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest {
func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest {
return ApiAddPetRequest{
ApiService: a,
ctx: ctx,
@ -179,23 +179,23 @@ func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest {
}
// Execute executes the request
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) {
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return nil, reportError("body is required and must be specified")
}
@ -229,15 +229,15 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -248,7 +248,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e
}
type ApiDeletePetRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
apiKey *string
@ -259,18 +259,18 @@ func (r ApiDeletePetRequest) ApiKey(apiKey string) ApiDeletePetRequest {
return r
}
func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, error) {
func (r ApiDeletePetRequest) Execute() (*http.Response, error) {
return r.ApiService.DeletePetExecute(r)
}
/*
DeletePet Deletes a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId Pet id to delete
@return ApiDeletePetRequest
*/
func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest {
func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest {
return ApiDeletePetRequest{
ApiService: a,
ctx: ctx,
@ -279,24 +279,24 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePe
}
// Execute executes the request
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) {
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -328,15 +328,15 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -347,7 +347,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo
}
type ApiFindPetsByStatusRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
status *[]string
}
@ -358,7 +358,7 @@ func (r ApiFindPetsByStatusRequest) Status(status []string) ApiFindPetsByStatusR
return r
}
func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) {
func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *http.Response, error) {
return r.ApiService.FindPetsByStatusExecute(r)
}
@ -367,10 +367,10 @@ FindPetsByStatus Finds Pets by status
Multiple status values can be provided with comma separated strings
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByStatusRequest
*/
func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest {
func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest {
return ApiFindPetsByStatusRequest{
ApiService: a,
ctx: ctx,
@ -379,9 +379,9 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStat
// Execute executes the request
// @return []Pet
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) {
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue []Pet
@ -389,14 +389,14 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/findByStatus"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.status == nil {
return localVarReturnValue, nil, reportError("status is required and must be specified")
}
@ -429,15 +429,15 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -446,7 +446,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -457,7 +457,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
}
type ApiFindPetsByTagsRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
tags *[]string
}
@ -468,7 +468,7 @@ func (r ApiFindPetsByTagsRequest) Tags(tags []string) ApiFindPetsByTagsRequest {
return r
}
func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *http.Response, error) {
return r.ApiService.FindPetsByTagsExecute(r)
}
@ -477,12 +477,12 @@ FindPetsByTags Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByTagsRequest
Deprecated
*/
func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest {
func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest {
return ApiFindPetsByTagsRequest{
ApiService: a,
ctx: ctx,
@ -492,9 +492,9 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRe
// Execute executes the request
// @return []Pet
// Deprecated
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) {
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue []Pet
@ -502,14 +502,14 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/findByTags"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.tags == nil {
return localVarReturnValue, nil, reportError("tags is required and must be specified")
}
@ -542,15 +542,15 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -559,7 +559,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -570,13 +570,13 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
}
type ApiGetPetByIdRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
}
func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
func (r ApiGetPetByIdRequest) Execute() (*Pet, *http.Response, error) {
return r.ApiService.GetPetByIdExecute(r)
}
@ -585,11 +585,11 @@ GetPetById Find pet by ID
Returns a single pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to return
@return ApiGetPetByIdRequest
*/
func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest {
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest {
return ApiGetPetByIdRequest{
ApiService: a,
ctx: ctx,
@ -599,25 +599,25 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetB
// Execute executes the request
// @return Pet
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) {
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Pet
localVarReturnValue *Pet
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -660,15 +660,15 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -677,7 +677,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -688,7 +688,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
}
type ApiUpdatePetRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
body *Pet
}
@ -699,17 +699,17 @@ func (r ApiUpdatePetRequest) Body(body Pet) ApiUpdatePetRequest {
return r
}
func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
func (r ApiUpdatePetRequest) Execute() (*http.Response, error) {
return r.ApiService.UpdatePetExecute(r)
}
/*
UpdatePet Update an existing pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiUpdatePetRequest
*/
func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest {
func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest {
return ApiUpdatePetRequest{
ApiService: a,
ctx: ctx,
@ -717,23 +717,23 @@ func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest {
}
// Execute executes the request
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) {
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return nil, reportError("body is required and must be specified")
}
@ -767,15 +767,15 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -786,7 +786,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo
}
type ApiUpdatePetWithFormRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
name *string
@ -804,18 +804,18 @@ func (r ApiUpdatePetWithFormRequest) Status(status string) ApiUpdatePetWithFormR
return r
}
func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
func (r ApiUpdatePetWithFormRequest) Execute() (*http.Response, error) {
return r.ApiService.UpdatePetWithFormExecute(r)
}
/*
UpdatePetWithForm Updates a pet in the store with form data
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet that needs to be updated
@return ApiUpdatePetWithFormRequest
*/
func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest {
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest {
return ApiUpdatePetWithFormRequest{
ApiService: a,
ctx: ctx,
@ -824,24 +824,24 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) Api
}
// Execute executes the request
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) {
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"}
@ -876,15 +876,15 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -895,7 +895,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
}
type ApiUploadFileRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
additionalMetadata *string
@ -913,18 +913,18 @@ func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest {
return r
}
func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
func (r ApiUploadFileRequest) Execute() (*ApiResponse, *http.Response, error) {
return r.ApiService.UploadFileExecute(r)
}
/*
UploadFile uploads an image
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileRequest
*/
func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest {
func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest {
return ApiUploadFileRequest{
ApiService: a,
ctx: ctx,
@ -934,25 +934,25 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadF
// Execute executes the request
// @return ApiResponse
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) {
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue ApiResponse
localVarReturnValue *ApiResponse
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}/uploadImage"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{"multipart/form-data"}
@ -985,7 +985,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
fileLocalVarFile = *r.file
}
if fileLocalVarFile != nil {
fbs, _ := _ioutil.ReadAll(fileLocalVarFile)
fbs, _ := ioutil.ReadAll(fileLocalVarFile)
fileLocalVarFileBytes = fbs
fileLocalVarFileName = fileLocalVarFile.Name()
fileLocalVarFile.Close()
@ -1001,15 +1001,15 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -1018,7 +1018,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -1029,7 +1029,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
}
type ApiUploadFileWithRequiredFileRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
requiredFile **os.File
@ -1047,18 +1047,18 @@ func (r ApiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetad
return r
}
func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
func (r ApiUploadFileWithRequiredFileRequest) Execute() (*ApiResponse, *http.Response, error) {
return r.ApiService.UploadFileWithRequiredFileExecute(r)
}
/*
UploadFileWithRequiredFile uploads an image (required)
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileWithRequiredFileRequest
*/
func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
return ApiUploadFileWithRequiredFileRequest{
ApiService: a,
ctx: ctx,
@ -1068,25 +1068,25 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i
// Execute executes the request
// @return ApiResponse
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) {
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue ApiResponse
localVarReturnValue *ApiResponse
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.requiredFile == nil {
return localVarReturnValue, nil, reportError("requiredFile is required and must be specified")
}
@ -1119,7 +1119,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
requiredFileLocalVarFile := *r.requiredFile
if requiredFileLocalVarFile != nil {
fbs, _ := _ioutil.ReadAll(requiredFileLocalVarFile)
fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile)
requiredFileLocalVarFileBytes = fbs
requiredFileLocalVarFileName = requiredFileLocalVarFile.Name()
requiredFileLocalVarFile.Close()
@ -1135,15 +1135,15 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -1152,7 +1152,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -12,16 +12,16 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type StoreApi interface {
@ -31,68 +31,68 @@ type StoreApi interface {
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of the order that needs to be deleted
@return ApiDeleteOrderRequest
*/
DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest
DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest
// DeleteOrderExecute executes the request
DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error)
DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error)
/*
GetInventory Returns pet inventories by status
Returns a map of status codes to quantities
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetInventoryRequest
*/
GetInventory(ctx _context.Context) ApiGetInventoryRequest
GetInventory(ctx context.Context) ApiGetInventoryRequest
// GetInventoryExecute executes the request
// @return map[string]int32
GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error)
GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error)
/*
GetOrderById Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of pet that needs to be fetched
@return ApiGetOrderByIdRequest
*/
GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest
GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest
// GetOrderByIdExecute executes the request
// @return Order
GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error)
GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error)
/*
PlaceOrder Place an order for a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiPlaceOrderRequest
*/
PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest
PlaceOrder(ctx context.Context) ApiPlaceOrderRequest
// PlaceOrderExecute executes the request
// @return Order
PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error)
PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error)
}
// StoreApiService StoreApi service
type StoreApiService service
type ApiDeleteOrderRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
orderId string
}
func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
func (r ApiDeleteOrderRequest) Execute() (*http.Response, error) {
return r.ApiService.DeleteOrderExecute(r)
}
@ -101,11 +101,11 @@ DeleteOrder Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of the order that needs to be deleted
@return ApiDeleteOrderRequest
*/
func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest {
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest {
return ApiDeleteOrderRequest{
ApiService: a,
ctx: ctx,
@ -114,24 +114,24 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiD
}
// Execute executes the request
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) {
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/order/{order_id}"
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -160,15 +160,15 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -179,12 +179,12 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp
}
type ApiGetInventoryRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
}
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) {
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) {
return r.ApiService.GetInventoryExecute(r)
}
@ -193,10 +193,10 @@ GetInventory Returns pet inventories by status
Returns a map of status codes to quantities
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetInventoryRequest
*/
func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequest {
func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryRequest {
return ApiGetInventoryRequest{
ApiService: a,
ctx: ctx,
@ -205,9 +205,9 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequ
// Execute executes the request
// @return map[string]int32
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) {
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue map[string]int32
@ -215,14 +215,14 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/inventory"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -265,15 +265,15 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -282,7 +282,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -293,13 +293,13 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
}
type ApiGetOrderByIdRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
orderId int64
}
func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
func (r ApiGetOrderByIdRequest) Execute() (*Order, *http.Response, error) {
return r.ApiService.GetOrderByIdExecute(r)
}
@ -308,11 +308,11 @@ GetOrderById Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of pet that needs to be fetched
@return ApiGetOrderByIdRequest
*/
func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest {
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest {
return ApiGetOrderByIdRequest{
ApiService: a,
ctx: ctx,
@ -322,25 +322,25 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiG
// Execute executes the request
// @return Order
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) {
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Order
localVarReturnValue *Order
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/order/{order_id}"
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.orderId < 1 {
return localVarReturnValue, nil, reportError("orderId must be greater than 1")
}
@ -375,15 +375,15 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -392,7 +392,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -403,7 +403,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
}
type ApiPlaceOrderRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
body *Order
}
@ -414,17 +414,17 @@ func (r ApiPlaceOrderRequest) Body(body Order) ApiPlaceOrderRequest {
return r
}
func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
func (r ApiPlaceOrderRequest) Execute() (*Order, *http.Response, error) {
return r.ApiService.PlaceOrderExecute(r)
}
/*
PlaceOrder Place an order for a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiPlaceOrderRequest
*/
func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest {
func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest {
return ApiPlaceOrderRequest{
ApiService: a,
ctx: ctx,
@ -433,24 +433,24 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest
// Execute executes the request
// @return Order
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) {
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Order
localVarReturnValue *Order
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/order"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return localVarReturnValue, nil, reportError("body is required and must be specified")
}
@ -484,15 +484,15 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -501,7 +501,7 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -12,16 +12,16 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type UserApi interface {
@ -31,106 +31,106 @@ type UserApi interface {
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUserRequest
*/
CreateUser(ctx _context.Context) ApiCreateUserRequest
CreateUser(ctx context.Context) ApiCreateUserRequest
// CreateUserExecute executes the request
CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error)
CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error)
/*
CreateUsersWithArrayInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithArrayInputRequest
*/
CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest
CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest
// CreateUsersWithArrayInputExecute executes the request
CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error)
CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error)
/*
CreateUsersWithListInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithListInputRequest
*/
CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest
CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest
// CreateUsersWithListInputExecute executes the request
CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error)
CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error)
/*
DeleteUser Delete user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be deleted
@return ApiDeleteUserRequest
*/
DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest
DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest
// DeleteUserExecute executes the request
DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error)
DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error)
/*
GetUserByName Get user by user name
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be fetched. Use user1 for testing.
@return ApiGetUserByNameRequest
*/
GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest
GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest
// GetUserByNameExecute executes the request
// @return User
GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error)
GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error)
/*
LoginUser Logs user into the system
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLoginUserRequest
*/
LoginUser(ctx _context.Context) ApiLoginUserRequest
LoginUser(ctx context.Context) ApiLoginUserRequest
// LoginUserExecute executes the request
// @return string
LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error)
LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error)
/*
LogoutUser Logs out current logged in user session
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLogoutUserRequest
*/
LogoutUser(ctx _context.Context) ApiLogoutUserRequest
LogoutUser(ctx context.Context) ApiLogoutUserRequest
// LogoutUserExecute executes the request
LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error)
LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error)
/*
UpdateUser Updated user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username name that need to be deleted
@return ApiUpdateUserRequest
*/
UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest
UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest
// UpdateUserExecute executes the request
UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error)
UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error)
}
// UserApiService UserApi service
type UserApiService service
type ApiCreateUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
body *User
}
@ -141,7 +141,7 @@ func (r ApiCreateUserRequest) Body(body User) ApiCreateUserRequest {
return r
}
func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiCreateUserRequest) Execute() (*http.Response, error) {
return r.ApiService.CreateUserExecute(r)
}
@ -150,10 +150,10 @@ CreateUser Create user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUserRequest
*/
func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest {
func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest {
return ApiCreateUserRequest{
ApiService: a,
ctx: ctx,
@ -161,23 +161,23 @@ func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest {
}
// Execute executes the request
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return nil, reportError("body is required and must be specified")
}
@ -211,15 +211,15 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -230,7 +230,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re
}
type ApiCreateUsersWithArrayInputRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
body *[]User
}
@ -241,17 +241,17 @@ func (r ApiCreateUsersWithArrayInputRequest) Body(body []User) ApiCreateUsersWit
return r
}
func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) {
func (r ApiCreateUsersWithArrayInputRequest) Execute() (*http.Response, error) {
return r.ApiService.CreateUsersWithArrayInputExecute(r)
}
/*
CreateUsersWithArrayInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithArrayInputRequest
*/
func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest {
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest {
return ApiCreateUsersWithArrayInputRequest{
ApiService: a,
ctx: ctx,
@ -259,23 +259,23 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCrea
}
// Execute executes the request
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) {
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/createWithArray"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return nil, reportError("body is required and must be specified")
}
@ -309,15 +309,15 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -328,7 +328,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
}
type ApiCreateUsersWithListInputRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
body *[]User
}
@ -339,17 +339,17 @@ func (r ApiCreateUsersWithListInputRequest) Body(body []User) ApiCreateUsersWith
return r
}
func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) {
func (r ApiCreateUsersWithListInputRequest) Execute() (*http.Response, error) {
return r.ApiService.CreateUsersWithListInputExecute(r)
}
/*
CreateUsersWithListInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithListInputRequest
*/
func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest {
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest {
return ApiCreateUsersWithListInputRequest{
ApiService: a,
ctx: ctx,
@ -357,23 +357,23 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreat
}
// Execute executes the request
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) {
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/createWithList"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return nil, reportError("body is required and must be specified")
}
@ -407,15 +407,15 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -426,13 +426,13 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
}
type ApiDeleteUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username string
}
func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiDeleteUserRequest) Execute() (*http.Response, error) {
return r.ApiService.DeleteUserExecute(r)
}
@ -441,11 +441,11 @@ DeleteUser Delete user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be deleted
@return ApiDeleteUserRequest
*/
func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest {
func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest {
return ApiDeleteUserRequest{
ApiService: a,
ctx: ctx,
@ -454,24 +454,24 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDe
}
// Execute executes the request
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -500,15 +500,15 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -519,24 +519,24 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re
}
type ApiGetUserByNameRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username string
}
func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
func (r ApiGetUserByNameRequest) Execute() (*User, *http.Response, error) {
return r.ApiService.GetUserByNameExecute(r)
}
/*
GetUserByName Get user by user name
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be fetched. Use user1 for testing.
@return ApiGetUserByNameRequest
*/
func (a *UserApiService) GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest {
func (a *UserApiService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest {
return ApiGetUserByNameRequest{
ApiService: a,
ctx: ctx,
@ -546,25 +546,25 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) Ap
// Execute executes the request
// @return User
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) {
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue User
localVarReturnValue *User
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -593,15 +593,15 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -610,7 +610,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -621,7 +621,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
}
type ApiLoginUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username *string
password *string
@ -638,17 +638,17 @@ func (r ApiLoginUserRequest) Password(password string) ApiLoginUserRequest {
return r
}
func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
func (r ApiLoginUserRequest) Execute() (string, *http.Response, error) {
return r.ApiService.LoginUserExecute(r)
}
/*
LoginUser Logs user into the system
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLoginUserRequest
*/
func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest {
func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest {
return ApiLoginUserRequest{
ApiService: a,
ctx: ctx,
@ -657,9 +657,9 @@ func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest {
// Execute executes the request
// @return string
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) {
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue string
@ -667,14 +667,14 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/login"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.username == nil {
return localVarReturnValue, nil, reportError("username is required and must be specified")
}
@ -711,15 +711,15 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -728,7 +728,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -739,22 +739,22 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
}
type ApiLogoutUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
}
func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiLogoutUserRequest) Execute() (*http.Response, error) {
return r.ApiService.LogoutUserExecute(r)
}
/*
LogoutUser Logs out current logged in user session
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLogoutUserRequest
*/
func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest {
func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest {
return ApiLogoutUserRequest{
ApiService: a,
ctx: ctx,
@ -762,23 +762,23 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest {
}
// Execute executes the request
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/logout"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -807,15 +807,15 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -826,7 +826,7 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re
}
type ApiUpdateUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username string
body *User
@ -838,7 +838,7 @@ func (r ApiUpdateUserRequest) Body(body User) ApiUpdateUserRequest {
return r
}
func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiUpdateUserRequest) Execute() (*http.Response, error) {
return r.ApiService.UpdateUserExecute(r)
}
@ -847,11 +847,11 @@ UpdateUser Updated user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username name that need to be deleted
@return ApiUpdateUserRequest
*/
func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest {
func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest {
return ApiUpdateUserRequest{
ApiService: a,
ctx: ctx,
@ -860,24 +860,24 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUp
}
// Execute executes the request
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.body == nil {
return nil, reportError("body is required and must be specified")
}
@ -911,15 +911,15 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}

View File

@ -437,6 +437,13 @@ func reportError(format string, a ...interface{}) error {
return fmt.Errorf(format, a...)
}
// A wrapper for strict JSON decoding
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}
// Set request body from an interface{}
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
if bodyBuf == nil {

View File

@ -32,8 +32,8 @@ func main() {
body := *openapiclient.NewClient() // Client | client model
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -45,8 +45,8 @@ func main() {
xmlItem := *openapiclient.NewXmlItem() // XmlItem | XmlItem Body
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.CreateXmlItem(context.Background()).XmlItem(xmlItem).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.CreateXmlItem``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -109,8 +109,8 @@ func main() {
body := true // bool | Input boolean as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -175,8 +175,8 @@ func main() {
body := *openapiclient.NewOuterComposite() // OuterComposite | Input composite as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -241,8 +241,8 @@ func main() {
body := float32(8.14) // float32 | Input number as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -307,8 +307,8 @@ func main() {
body := "body_example" // string | Input string as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -373,8 +373,8 @@ func main() {
body := *openapiclient.NewFileSchemaTestClass() // FileSchemaTestClass |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -436,8 +436,8 @@ func main() {
body := *openapiclient.NewUser() // User |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -501,8 +501,8 @@ func main() {
body := *openapiclient.NewClient() // Client | client model
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestClientModel(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestClientModel(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -581,8 +581,8 @@ func main() {
callback := "callback_example" // string | None (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -665,8 +665,8 @@ func main() {
enumFormString := "enumFormString_example" // string | Form parameter enum test (string) (optional) (default to "-efg")
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -741,8 +741,8 @@ func main() {
int64Group := int64(789) // int64 | Integer in group parameters (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -808,8 +808,8 @@ func main() {
param := map[string]string{"key": "Inner_example"} // map[string]string | request body
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background()).Param(param).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).Param(param).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -871,8 +871,8 @@ func main() {
param2 := "param2_example" // string | field2
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -940,8 +940,8 @@ func main() {
context := []string{"Inner_example"} // []string |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -32,8 +32,8 @@ func main() {
body := *openapiclient.NewClient() // Client | client model
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -38,8 +38,8 @@ func main() {
body := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.AddPet(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.AddPet(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -101,8 +101,8 @@ func main() {
apiKey := "apiKey_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.DeletePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -170,8 +170,8 @@ func main() {
status := []string{"Status_example"} // []string | Status values that need to be considered for filter
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -236,8 +236,8 @@ func main() {
tags := []string{"Inner_example"} // []string | Tags to filter by
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -302,8 +302,8 @@ func main() {
petId := int64(789) // int64 | ID of pet to return
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.GetPetById(context.Background(), petId).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.GetPetById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -370,8 +370,8 @@ func main() {
body := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UpdatePet(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UpdatePet(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -434,8 +434,8 @@ func main() {
status := "status_example" // string | Updated status of the pet (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePetWithForm``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -504,8 +504,8 @@ func main() {
file := os.NewFile(1234, "some_file") // *os.File | file to upload (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -576,8 +576,8 @@ func main() {
additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -35,8 +35,8 @@ func main() {
orderId := "orderId_example" // string | ID of the order that needs to be deleted
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.DeleteOrder(context.Background(), orderId).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.DeleteOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -102,8 +102,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.GetInventory(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetInventory(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -164,8 +164,8 @@ func main() {
orderId := int64(789) // int64 | ID of pet that needs to be fetched
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.GetOrderById(context.Background(), orderId).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetOrderById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -232,8 +232,8 @@ func main() {
body := *openapiclient.NewOrder() // Order | order placed for purchasing the pet
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.PlaceOrder(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.PlaceOrder(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -39,8 +39,8 @@ func main() {
body := *openapiclient.NewUser() // User | Created user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.CreateUser(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.CreateUser(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -101,8 +101,8 @@ func main() {
body := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -163,8 +163,8 @@ func main() {
body := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -227,8 +227,8 @@ func main() {
username := "username_example" // string | The name that needs to be deleted
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.DeleteUser(context.Background(), username).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -293,8 +293,8 @@ func main() {
username := "username_example" // string | The name that needs to be fetched. Use user1 for testing.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.GetUserByName(context.Background(), username).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -362,8 +362,8 @@ func main() {
password := "password_example" // string | The password for login in clear text
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -426,8 +426,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.LogoutUser(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.LogoutUser(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -487,8 +487,8 @@ func main() {
body := *openapiclient.NewUser() // User | Updated user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.UpdateUser(context.Background(), username).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -3,5 +3,5 @@ module github.com/GIT_USER_ID/GIT_REPO_ID
go 1.13
require (
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558
)

View File

@ -24,9 +24,9 @@ type AdditionalPropertiesClass struct {
MapArrayAnytype *map[string][]map[string]interface{} `json:"map_array_anytype,omitempty"`
MapMapString *map[string]map[string]string `json:"map_map_string,omitempty"`
MapMapAnytype *map[string]map[string]map[string]interface{} `json:"map_map_anytype,omitempty"`
Anytype1 *map[string]interface{} `json:"anytype_1,omitempty"`
Anytype2 *map[string]interface{} `json:"anytype_2,omitempty"`
Anytype3 *map[string]interface{} `json:"anytype_3,omitempty"`
Anytype1 map[string]interface{} `json:"anytype_1,omitempty"`
Anytype2 map[string]interface{} `json:"anytype_2,omitempty"`
Anytype3 map[string]interface{} `json:"anytype_3,omitempty"`
}
// NewAdditionalPropertiesClass instantiates a new AdditionalPropertiesClass object
@ -308,12 +308,12 @@ func (o *AdditionalPropertiesClass) GetAnytype1() map[string]interface{} {
var ret map[string]interface{}
return ret
}
return *o.Anytype1
return o.Anytype1
}
// GetAnytype1Ok returns a tuple with the Anytype1 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetAnytype1Ok() (*map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetAnytype1Ok() (map[string]interface{}, bool) {
if o == nil || o.Anytype1 == nil {
return nil, false
}
@ -331,7 +331,7 @@ func (o *AdditionalPropertiesClass) HasAnytype1() bool {
// SetAnytype1 gets a reference to the given map[string]interface{} and assigns it to the Anytype1 field.
func (o *AdditionalPropertiesClass) SetAnytype1(v map[string]interface{}) {
o.Anytype1 = &v
o.Anytype1 = v
}
// GetAnytype2 returns the Anytype2 field value if set, zero value otherwise.
@ -340,12 +340,12 @@ func (o *AdditionalPropertiesClass) GetAnytype2() map[string]interface{} {
var ret map[string]interface{}
return ret
}
return *o.Anytype2
return o.Anytype2
}
// GetAnytype2Ok returns a tuple with the Anytype2 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetAnytype2Ok() (*map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetAnytype2Ok() (map[string]interface{}, bool) {
if o == nil || o.Anytype2 == nil {
return nil, false
}
@ -363,7 +363,7 @@ func (o *AdditionalPropertiesClass) HasAnytype2() bool {
// SetAnytype2 gets a reference to the given map[string]interface{} and assigns it to the Anytype2 field.
func (o *AdditionalPropertiesClass) SetAnytype2(v map[string]interface{}) {
o.Anytype2 = &v
o.Anytype2 = v
}
// GetAnytype3 returns the Anytype3 field value if set, zero value otherwise.
@ -372,12 +372,12 @@ func (o *AdditionalPropertiesClass) GetAnytype3() map[string]interface{} {
var ret map[string]interface{}
return ret
}
return *o.Anytype3
return o.Anytype3
}
// GetAnytype3Ok returns a tuple with the Anytype3 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdditionalPropertiesClass) GetAnytype3Ok() (*map[string]interface{}, bool) {
func (o *AdditionalPropertiesClass) GetAnytype3Ok() (map[string]interface{}, bool) {
if o == nil || o.Anytype3 == nil {
return nil, false
}
@ -395,7 +395,7 @@ func (o *AdditionalPropertiesClass) HasAnytype3() bool {
// SetAnytype3 gets a reference to the given map[string]interface{} and assigns it to the Anytype3 field.
func (o *AdditionalPropertiesClass) SetAnytype3(v map[string]interface{}) {
o.Anytype3 = &v
o.Anytype3 = v
}
func (o AdditionalPropertiesClass) MarshalJSON() ([]byte, error) {

View File

@ -16,7 +16,7 @@ import (
// ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly
type ArrayOfArrayOfNumberOnly struct {
ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"`
ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"`
}
// NewArrayOfArrayOfNumberOnly instantiates a new ArrayOfArrayOfNumberOnly object
@ -42,12 +42,12 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 {
var ret [][]float32
return ret
}
return *o.ArrayArrayNumber
return o.ArrayArrayNumber
}
// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() (*[][]float32, bool) {
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) {
if o == nil || o.ArrayArrayNumber == nil {
return nil, false
}
@ -65,7 +65,7 @@ func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool {
// SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field.
func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) {
o.ArrayArrayNumber = &v
o.ArrayArrayNumber = v
}
func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) {

View File

@ -16,7 +16,7 @@ import (
// ArrayOfNumberOnly struct for ArrayOfNumberOnly
type ArrayOfNumberOnly struct {
ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"`
ArrayNumber []float32 `json:"ArrayNumber,omitempty"`
}
// NewArrayOfNumberOnly instantiates a new ArrayOfNumberOnly object
@ -42,12 +42,12 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 {
var ret []float32
return ret
}
return *o.ArrayNumber
return o.ArrayNumber
}
// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayOfNumberOnly) GetArrayNumberOk() (*[]float32, bool) {
func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) {
if o == nil || o.ArrayNumber == nil {
return nil, false
}
@ -65,7 +65,7 @@ func (o *ArrayOfNumberOnly) HasArrayNumber() bool {
// SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field.
func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) {
o.ArrayNumber = &v
o.ArrayNumber = v
}
func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) {

View File

@ -16,9 +16,9 @@ import (
// ArrayTest struct for ArrayTest
type ArrayTest struct {
ArrayOfString *[]string `json:"array_of_string,omitempty"`
ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"`
ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
ArrayOfString []string `json:"array_of_string,omitempty"`
ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"`
ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
}
// NewArrayTest instantiates a new ArrayTest object
@ -44,12 +44,12 @@ func (o *ArrayTest) GetArrayOfString() []string {
var ret []string
return ret
}
return *o.ArrayOfString
return o.ArrayOfString
}
// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayTest) GetArrayOfStringOk() (*[]string, bool) {
func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) {
if o == nil || o.ArrayOfString == nil {
return nil, false
}
@ -67,7 +67,7 @@ func (o *ArrayTest) HasArrayOfString() bool {
// SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field.
func (o *ArrayTest) SetArrayOfString(v []string) {
o.ArrayOfString = &v
o.ArrayOfString = v
}
// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field value if set, zero value otherwise.
@ -76,12 +76,12 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 {
var ret [][]int64
return ret
}
return *o.ArrayArrayOfInteger
return o.ArrayArrayOfInteger
}
// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayTest) GetArrayArrayOfIntegerOk() (*[][]int64, bool) {
func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) {
if o == nil || o.ArrayArrayOfInteger == nil {
return nil, false
}
@ -99,7 +99,7 @@ func (o *ArrayTest) HasArrayArrayOfInteger() bool {
// SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field.
func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) {
o.ArrayArrayOfInteger = &v
o.ArrayArrayOfInteger = v
}
// GetArrayArrayOfModel returns the ArrayArrayOfModel field value if set, zero value otherwise.
@ -108,12 +108,12 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst {
var ret [][]ReadOnlyFirst
return ret
}
return *o.ArrayArrayOfModel
return o.ArrayArrayOfModel
}
// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayTest) GetArrayArrayOfModelOk() (*[][]ReadOnlyFirst, bool) {
func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) {
if o == nil || o.ArrayArrayOfModel == nil {
return nil, false
}
@ -131,7 +131,7 @@ func (o *ArrayTest) HasArrayArrayOfModel() bool {
// SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field.
func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) {
o.ArrayArrayOfModel = &v
o.ArrayArrayOfModel = v
}
func (o ArrayTest) MarshalJSON() ([]byte, error) {

View File

@ -17,7 +17,7 @@ import (
// EnumArrays struct for EnumArrays
type EnumArrays struct {
JustSymbol *string `json:"just_symbol,omitempty"`
ArrayEnum *[]string `json:"array_enum,omitempty"`
ArrayEnum []string `json:"array_enum,omitempty"`
}
// NewEnumArrays instantiates a new EnumArrays object
@ -75,12 +75,12 @@ func (o *EnumArrays) GetArrayEnum() []string {
var ret []string
return ret
}
return *o.ArrayEnum
return o.ArrayEnum
}
// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EnumArrays) GetArrayEnumOk() (*[]string, bool) {
func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) {
if o == nil || o.ArrayEnum == nil {
return nil, false
}
@ -98,7 +98,7 @@ func (o *EnumArrays) HasArrayEnum() bool {
// SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field.
func (o *EnumArrays) SetArrayEnum(v []string) {
o.ArrayEnum = &v
o.ArrayEnum = v
}
func (o EnumArrays) MarshalJSON() ([]byte, error) {

View File

@ -17,7 +17,7 @@ import (
// FileSchemaTestClass struct for FileSchemaTestClass
type FileSchemaTestClass struct {
File *File `json:"file,omitempty"`
Files *[]File `json:"files,omitempty"`
Files []File `json:"files,omitempty"`
}
// NewFileSchemaTestClass instantiates a new FileSchemaTestClass object
@ -75,12 +75,12 @@ func (o *FileSchemaTestClass) GetFiles() []File {
var ret []File
return ret
}
return *o.Files
return o.Files
}
// GetFilesOk returns a tuple with the Files field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FileSchemaTestClass) GetFilesOk() (*[]File, bool) {
func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) {
if o == nil || o.Files == nil {
return nil, false
}
@ -98,7 +98,7 @@ func (o *FileSchemaTestClass) HasFiles() bool {
// SetFiles gets a reference to the given []File and assigns it to the Files field.
func (o *FileSchemaTestClass) SetFiles(v []File) {
o.Files = &v
o.Files = v
}
func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) {

View File

@ -20,7 +20,7 @@ type Pet struct {
Category *Category `json:"category,omitempty"`
Name string `json:"name"`
PhotoUrls []string `json:"photoUrls"`
Tags *[]Tag `json:"tags,omitempty"`
Tags []Tag `json:"tags,omitempty"`
// pet status in the store
Status *string `json:"status,omitempty"`
}
@ -144,11 +144,11 @@ func (o *Pet) GetPhotoUrls() []string {
// GetPhotoUrlsOk returns a tuple with the PhotoUrls field value
// and a boolean to check if the value has been set.
func (o *Pet) GetPhotoUrlsOk() (*[]string, bool) {
func (o *Pet) GetPhotoUrlsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return &o.PhotoUrls, true
return o.PhotoUrls, true
}
// SetPhotoUrls sets field value
@ -162,12 +162,12 @@ func (o *Pet) GetTags() []Tag {
var ret []Tag
return ret
}
return *o.Tags
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Pet) GetTagsOk() (*[]Tag, bool) {
func (o *Pet) GetTagsOk() ([]Tag, bool) {
if o == nil || o.Tags == nil {
return nil, false
}
@ -185,7 +185,7 @@ func (o *Pet) HasTags() bool {
// SetTags gets a reference to the given []Tag and assigns it to the Tags field.
func (o *Pet) SetTags(v []Tag) {
o.Tags = &v
o.Tags = v
}
// GetStatus returns the Status field value if set, zero value otherwise.

View File

@ -157,11 +157,11 @@ func (o *TypeHolderDefault) GetArrayItem() []int32 {
// GetArrayItemOk returns a tuple with the ArrayItem field value
// and a boolean to check if the value has been set.
func (o *TypeHolderDefault) GetArrayItemOk() (*[]int32, bool) {
func (o *TypeHolderDefault) GetArrayItemOk() ([]int32, bool) {
if o == nil {
return nil, false
}
return &o.ArrayItem, true
return o.ArrayItem, true
}
// SetArrayItem sets field value

View File

@ -179,11 +179,11 @@ func (o *TypeHolderExample) GetArrayItem() []int32 {
// GetArrayItemOk returns a tuple with the ArrayItem field value
// and a boolean to check if the value has been set.
func (o *TypeHolderExample) GetArrayItemOk() (*[]int32, bool) {
func (o *TypeHolderExample) GetArrayItemOk() ([]int32, bool) {
if o == nil {
return nil, false
}
return &o.ArrayItem, true
return o.ArrayItem, true
}
// SetArrayItem sets field value

View File

@ -20,31 +20,31 @@ type XmlItem struct {
AttributeNumber *float32 `json:"attribute_number,omitempty"`
AttributeInteger *int32 `json:"attribute_integer,omitempty"`
AttributeBoolean *bool `json:"attribute_boolean,omitempty"`
WrappedArray *[]int32 `json:"wrapped_array,omitempty"`
WrappedArray []int32 `json:"wrapped_array,omitempty"`
NameString *string `json:"name_string,omitempty"`
NameNumber *float32 `json:"name_number,omitempty"`
NameInteger *int32 `json:"name_integer,omitempty"`
NameBoolean *bool `json:"name_boolean,omitempty"`
NameArray *[]int32 `json:"name_array,omitempty"`
NameWrappedArray *[]int32 `json:"name_wrapped_array,omitempty"`
NameArray []int32 `json:"name_array,omitempty"`
NameWrappedArray []int32 `json:"name_wrapped_array,omitempty"`
PrefixString *string `json:"prefix_string,omitempty"`
PrefixNumber *float32 `json:"prefix_number,omitempty"`
PrefixInteger *int32 `json:"prefix_integer,omitempty"`
PrefixBoolean *bool `json:"prefix_boolean,omitempty"`
PrefixArray *[]int32 `json:"prefix_array,omitempty"`
PrefixWrappedArray *[]int32 `json:"prefix_wrapped_array,omitempty"`
PrefixArray []int32 `json:"prefix_array,omitempty"`
PrefixWrappedArray []int32 `json:"prefix_wrapped_array,omitempty"`
NamespaceString *string `json:"namespace_string,omitempty"`
NamespaceNumber *float32 `json:"namespace_number,omitempty"`
NamespaceInteger *int32 `json:"namespace_integer,omitempty"`
NamespaceBoolean *bool `json:"namespace_boolean,omitempty"`
NamespaceArray *[]int32 `json:"namespace_array,omitempty"`
NamespaceWrappedArray *[]int32 `json:"namespace_wrapped_array,omitempty"`
NamespaceArray []int32 `json:"namespace_array,omitempty"`
NamespaceWrappedArray []int32 `json:"namespace_wrapped_array,omitempty"`
PrefixNsString *string `json:"prefix_ns_string,omitempty"`
PrefixNsNumber *float32 `json:"prefix_ns_number,omitempty"`
PrefixNsInteger *int32 `json:"prefix_ns_integer,omitempty"`
PrefixNsBoolean *bool `json:"prefix_ns_boolean,omitempty"`
PrefixNsArray *[]int32 `json:"prefix_ns_array,omitempty"`
PrefixNsWrappedArray *[]int32 `json:"prefix_ns_wrapped_array,omitempty"`
PrefixNsArray []int32 `json:"prefix_ns_array,omitempty"`
PrefixNsWrappedArray []int32 `json:"prefix_ns_wrapped_array,omitempty"`
}
// NewXmlItem instantiates a new XmlItem object
@ -198,12 +198,12 @@ func (o *XmlItem) GetWrappedArray() []int32 {
var ret []int32
return ret
}
return *o.WrappedArray
return o.WrappedArray
}
// GetWrappedArrayOk returns a tuple with the WrappedArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetWrappedArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetWrappedArrayOk() ([]int32, bool) {
if o == nil || o.WrappedArray == nil {
return nil, false
}
@ -221,7 +221,7 @@ func (o *XmlItem) HasWrappedArray() bool {
// SetWrappedArray gets a reference to the given []int32 and assigns it to the WrappedArray field.
func (o *XmlItem) SetWrappedArray(v []int32) {
o.WrappedArray = &v
o.WrappedArray = v
}
// GetNameString returns the NameString field value if set, zero value otherwise.
@ -358,12 +358,12 @@ func (o *XmlItem) GetNameArray() []int32 {
var ret []int32
return ret
}
return *o.NameArray
return o.NameArray
}
// GetNameArrayOk returns a tuple with the NameArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetNameArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetNameArrayOk() ([]int32, bool) {
if o == nil || o.NameArray == nil {
return nil, false
}
@ -381,7 +381,7 @@ func (o *XmlItem) HasNameArray() bool {
// SetNameArray gets a reference to the given []int32 and assigns it to the NameArray field.
func (o *XmlItem) SetNameArray(v []int32) {
o.NameArray = &v
o.NameArray = v
}
// GetNameWrappedArray returns the NameWrappedArray field value if set, zero value otherwise.
@ -390,12 +390,12 @@ func (o *XmlItem) GetNameWrappedArray() []int32 {
var ret []int32
return ret
}
return *o.NameWrappedArray
return o.NameWrappedArray
}
// GetNameWrappedArrayOk returns a tuple with the NameWrappedArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetNameWrappedArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetNameWrappedArrayOk() ([]int32, bool) {
if o == nil || o.NameWrappedArray == nil {
return nil, false
}
@ -413,7 +413,7 @@ func (o *XmlItem) HasNameWrappedArray() bool {
// SetNameWrappedArray gets a reference to the given []int32 and assigns it to the NameWrappedArray field.
func (o *XmlItem) SetNameWrappedArray(v []int32) {
o.NameWrappedArray = &v
o.NameWrappedArray = v
}
// GetPrefixString returns the PrefixString field value if set, zero value otherwise.
@ -550,12 +550,12 @@ func (o *XmlItem) GetPrefixArray() []int32 {
var ret []int32
return ret
}
return *o.PrefixArray
return o.PrefixArray
}
// GetPrefixArrayOk returns a tuple with the PrefixArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetPrefixArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetPrefixArrayOk() ([]int32, bool) {
if o == nil || o.PrefixArray == nil {
return nil, false
}
@ -573,7 +573,7 @@ func (o *XmlItem) HasPrefixArray() bool {
// SetPrefixArray gets a reference to the given []int32 and assigns it to the PrefixArray field.
func (o *XmlItem) SetPrefixArray(v []int32) {
o.PrefixArray = &v
o.PrefixArray = v
}
// GetPrefixWrappedArray returns the PrefixWrappedArray field value if set, zero value otherwise.
@ -582,12 +582,12 @@ func (o *XmlItem) GetPrefixWrappedArray() []int32 {
var ret []int32
return ret
}
return *o.PrefixWrappedArray
return o.PrefixWrappedArray
}
// GetPrefixWrappedArrayOk returns a tuple with the PrefixWrappedArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetPrefixWrappedArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetPrefixWrappedArrayOk() ([]int32, bool) {
if o == nil || o.PrefixWrappedArray == nil {
return nil, false
}
@ -605,7 +605,7 @@ func (o *XmlItem) HasPrefixWrappedArray() bool {
// SetPrefixWrappedArray gets a reference to the given []int32 and assigns it to the PrefixWrappedArray field.
func (o *XmlItem) SetPrefixWrappedArray(v []int32) {
o.PrefixWrappedArray = &v
o.PrefixWrappedArray = v
}
// GetNamespaceString returns the NamespaceString field value if set, zero value otherwise.
@ -742,12 +742,12 @@ func (o *XmlItem) GetNamespaceArray() []int32 {
var ret []int32
return ret
}
return *o.NamespaceArray
return o.NamespaceArray
}
// GetNamespaceArrayOk returns a tuple with the NamespaceArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetNamespaceArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetNamespaceArrayOk() ([]int32, bool) {
if o == nil || o.NamespaceArray == nil {
return nil, false
}
@ -765,7 +765,7 @@ func (o *XmlItem) HasNamespaceArray() bool {
// SetNamespaceArray gets a reference to the given []int32 and assigns it to the NamespaceArray field.
func (o *XmlItem) SetNamespaceArray(v []int32) {
o.NamespaceArray = &v
o.NamespaceArray = v
}
// GetNamespaceWrappedArray returns the NamespaceWrappedArray field value if set, zero value otherwise.
@ -774,12 +774,12 @@ func (o *XmlItem) GetNamespaceWrappedArray() []int32 {
var ret []int32
return ret
}
return *o.NamespaceWrappedArray
return o.NamespaceWrappedArray
}
// GetNamespaceWrappedArrayOk returns a tuple with the NamespaceWrappedArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetNamespaceWrappedArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetNamespaceWrappedArrayOk() ([]int32, bool) {
if o == nil || o.NamespaceWrappedArray == nil {
return nil, false
}
@ -797,7 +797,7 @@ func (o *XmlItem) HasNamespaceWrappedArray() bool {
// SetNamespaceWrappedArray gets a reference to the given []int32 and assigns it to the NamespaceWrappedArray field.
func (o *XmlItem) SetNamespaceWrappedArray(v []int32) {
o.NamespaceWrappedArray = &v
o.NamespaceWrappedArray = v
}
// GetPrefixNsString returns the PrefixNsString field value if set, zero value otherwise.
@ -934,12 +934,12 @@ func (o *XmlItem) GetPrefixNsArray() []int32 {
var ret []int32
return ret
}
return *o.PrefixNsArray
return o.PrefixNsArray
}
// GetPrefixNsArrayOk returns a tuple with the PrefixNsArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetPrefixNsArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetPrefixNsArrayOk() ([]int32, bool) {
if o == nil || o.PrefixNsArray == nil {
return nil, false
}
@ -957,7 +957,7 @@ func (o *XmlItem) HasPrefixNsArray() bool {
// SetPrefixNsArray gets a reference to the given []int32 and assigns it to the PrefixNsArray field.
func (o *XmlItem) SetPrefixNsArray(v []int32) {
o.PrefixNsArray = &v
o.PrefixNsArray = v
}
// GetPrefixNsWrappedArray returns the PrefixNsWrappedArray field value if set, zero value otherwise.
@ -966,12 +966,12 @@ func (o *XmlItem) GetPrefixNsWrappedArray() []int32 {
var ret []int32
return ret
}
return *o.PrefixNsWrappedArray
return o.PrefixNsWrappedArray
}
// GetPrefixNsWrappedArrayOk returns a tuple with the PrefixNsWrappedArray field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XmlItem) GetPrefixNsWrappedArrayOk() (*[]int32, bool) {
func (o *XmlItem) GetPrefixNsWrappedArrayOk() ([]int32, bool) {
if o == nil || o.PrefixNsWrappedArray == nil {
return nil, false
}
@ -989,7 +989,7 @@ func (o *XmlItem) HasPrefixNsWrappedArray() bool {
// SetPrefixNsWrappedArray gets a reference to the given []int32 and assigns it to the PrefixNsWrappedArray field.
func (o *XmlItem) SetPrefixNsWrappedArray(v []int32) {
o.PrefixNsWrappedArray = &v
o.PrefixNsWrappedArray = v
}
func (o XmlItem) MarshalJSON() ([]byte, error) {

View File

@ -0,0 +1,11 @@
module github.com/OpenAPITools/openapi-generator/samples/client/petstore/go
replace github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore => ./go-petstore
go 1.13
require (
github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore v0.0.0-00010101000000-000000000000
github.com/stretchr/testify v1.7.0
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558
)

View File

@ -0,0 +1,371 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY=
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

View File

@ -4,7 +4,7 @@ import (
"context"
"net/http"
sw "../go-petstore"
sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore"
)
// MockPetApi is a mock of the PetApi interface
@ -21,7 +21,7 @@ func (m *MockPetApi) AddPet(ctx context.Context) sw.ApiAddPetRequest {
}
func (m *MockPetApi) AddPetExecute(r sw.ApiAddPetRequest) (*http.Response, error) {
return &http.Response{StatusCode:200}, nil
return &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) DeletePet(ctx context.Context, petId int64) sw.ApiDeletePetRequest {
@ -29,7 +29,7 @@ func (m *MockPetApi) DeletePet(ctx context.Context, petId int64) sw.ApiDeletePet
}
func (m *MockPetApi) DeletePetExecute(r sw.ApiDeletePetRequest) (*http.Response, error) {
return &http.Response{StatusCode:200}, nil
return &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) FindPetsByStatus(ctx context.Context) sw.ApiFindPetsByStatusRequest {
@ -37,7 +37,7 @@ func (m *MockPetApi) FindPetsByStatus(ctx context.Context) sw.ApiFindPetsByStatu
}
func (m *MockPetApi) FindPetsByStatusExecute(r sw.ApiFindPetsByStatusRequest) ([]sw.Pet, *http.Response, error) {
return []sw.Pet{}, &http.Response{StatusCode:200}, nil
return []sw.Pet{}, &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) FindPetsByTags(ctx context.Context) sw.ApiFindPetsByTagsRequest {
@ -45,15 +45,15 @@ func (m *MockPetApi) FindPetsByTags(ctx context.Context) sw.ApiFindPetsByTagsReq
}
func (m *MockPetApi) FindPetsByTagsExecute(r sw.ApiFindPetsByTagsRequest) ([]sw.Pet, *http.Response, error) {
return []sw.Pet{}, &http.Response{StatusCode:200}, nil
return []sw.Pet{}, &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) GetPetById(ctx context.Context, petId int64) sw.ApiGetPetByIdRequest {
return sw.ApiGetPetByIdRequest{ApiService: m}
}
func (m *MockPetApi) GetPetByIdExecute(r sw.ApiGetPetByIdRequest) (sw.Pet, *http.Response, error) {
return sw.Pet{}, &http.Response{StatusCode:200}, nil
func (m *MockPetApi) GetPetByIdExecute(r sw.ApiGetPetByIdRequest) (*sw.Pet, *http.Response, error) {
return &sw.Pet{}, &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) UpdatePet(ctx context.Context) sw.ApiUpdatePetRequest {
@ -61,7 +61,7 @@ func (m *MockPetApi) UpdatePet(ctx context.Context) sw.ApiUpdatePetRequest {
}
func (m *MockPetApi) UpdatePetExecute(r sw.ApiUpdatePetRequest) (*http.Response, error) {
return &http.Response{StatusCode:200}, nil
return &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) UpdatePetWithForm(ctx context.Context, petId int64) sw.ApiUpdatePetWithFormRequest {
@ -69,21 +69,21 @@ func (m *MockPetApi) UpdatePetWithForm(ctx context.Context, petId int64) sw.ApiU
}
func (m *MockPetApi) UpdatePetWithFormExecute(r sw.ApiUpdatePetWithFormRequest) (*http.Response, error) {
return &http.Response{StatusCode:200}, nil
return &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) UploadFile(ctx context.Context, petId int64) sw.ApiUploadFileRequest {
return sw.ApiUploadFileRequest{ApiService: m}
}
func (m *MockPetApi) UploadFileExecute(r sw.ApiUploadFileRequest) (sw.ApiResponse, *http.Response, error) {
return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil
func (m *MockPetApi) UploadFileExecute(r sw.ApiUploadFileRequest) (*sw.ApiResponse, *http.Response, error) {
return &sw.ApiResponse{}, &http.Response{StatusCode: 200}, nil
}
func (m *MockPetApi) UploadFileWithRequiredFile(ctx context.Context, petId int64) sw.ApiUploadFileWithRequiredFileRequest {
return sw.ApiUploadFileWithRequiredFileRequest{ApiService: m}
}
func (m *MockPetApi) UploadFileWithRequiredFileExecute(r sw.ApiUploadFileWithRequiredFileRequest) (sw.ApiResponse, *http.Response, error) {
return sw.ApiResponse{}, &http.Response{StatusCode:200}, nil
func (m *MockPetApi) UploadFileWithRequiredFileExecute(r sw.ApiUploadFileWithRequiredFileRequest) (*sw.ApiResponse, *http.Response, error) {
return &sw.ApiResponse{}, &http.Response{StatusCode: 200}, nil
}

View File

@ -8,8 +8,8 @@ import (
"github.com/stretchr/testify/assert"
sw "./go-petstore"
mock "./mock"
sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore"
mock "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/mock"
)
var client *sw.APIClient
@ -30,7 +30,7 @@ func TestMain(m *testing.M) {
func TestAddPet(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Body(newPet).Execute()
@ -69,7 +69,7 @@ func TestGetPetById(t *testing.T) {
func TestGetPetByIdWithInvalidID(t *testing.T) {
resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999).Execute()
if r != nil && r.StatusCode == 404 {
assertedError, ok := err.(sw.GenericOpenAPIError)
assertedError, ok := err.(*sw.GenericOpenAPIError)
a := assert.New(t)
a.True(ok)
a.Contains(string(assertedError.Body()), "type")

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
sw "./go-petstore"
sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore"
)
func TestPlaceOrder(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
sw "./go-petstore"
sw "github.com/OpenAPITools/openapi-generator/samples/client/petstore/go/go-petstore"
)
func TestCreateUser(t *testing.T) {
@ -33,7 +33,7 @@ func TestCreateUser(t *testing.T) {
//adding x to skip the test, currently it is failing
func TestCreateUsersWithArrayInput(t *testing.T) {
newUsers := []sw.User{
sw.User{
{
Id: sw.PtrInt64(1001),
FirstName: sw.PtrString("gopher1"),
LastName: sw.PtrString("lang1"),
@ -43,7 +43,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
Phone: sw.PtrString("5101112222"),
UserStatus: sw.PtrInt32(1),
},
sw.User{
{
Id: sw.PtrInt64(1002),
FirstName: sw.PtrString("gopher2"),
LastName: sw.PtrString("lang2"),
@ -62,7 +62,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
if apiResponse.StatusCode != 200 {
t.Log(apiResponse)
}
/* issue deleting users due to issue in the server side (500). commented out below for the time being
/* issue deleting users due to issue in the server side (500). commented out below for the time being
//tear down
_, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1").Execute()
if err1 != nil {
@ -75,7 +75,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
t.Errorf("Error while deleting user")
t.Log(err2)
}
*/
*/
}
func TestGetUserByName(t *testing.T) {

View File

@ -22,7 +22,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
```golang
import sw "./x_auth_id_alias"
import x_auth_id_alias "github.com/GIT_USER_ID/GIT_REPO_ID"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
@ -40,7 +40,7 @@ Default configuration comes with `Servers` field that contains server objects as
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextServerIndex, 1)
```
### Templated Server URL
@ -48,7 +48,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
@ -62,10 +62,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
```
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
ctx := context.WithValue(context.Background(), x_auth_id_alias.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
ctx = context.WithValue(context.Background(), x_auth_id_alias.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},

View File

@ -12,27 +12,27 @@ package x_auth_id_alias
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
// UsageApiService UsageApi service
type UsageApiService service
type ApiAnyKeyRequest struct {
ctx _context.Context
ctx context.Context
ApiService *UsageApiService
}
func (r ApiAnyKeyRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) {
func (r ApiAnyKeyRequest) Execute() (map[string]interface{}, *http.Response, error) {
return r.ApiService.AnyKeyExecute(r)
}
@ -41,10 +41,10 @@ AnyKey Use any API key
Use any API key
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAnyKeyRequest
*/
func (a *UsageApiService) AnyKey(ctx _context.Context) ApiAnyKeyRequest {
func (a *UsageApiService) AnyKey(ctx context.Context) ApiAnyKeyRequest {
return ApiAnyKeyRequest{
ApiService: a,
ctx: ctx,
@ -53,9 +53,9 @@ func (a *UsageApiService) AnyKey(ctx _context.Context) ApiAnyKeyRequest {
// Execute executes the request
// @return map[string]interface{}
func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interface{}, *_nethttp.Response, error) {
func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interface{}, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue map[string]interface{}
@ -63,14 +63,14 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.AnyKey")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/any"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -127,15 +127,15 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -144,7 +144,7 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -155,12 +155,12 @@ func (a *UsageApiService) AnyKeyExecute(r ApiAnyKeyRequest) (map[string]interfac
}
type ApiBothKeysRequest struct {
ctx _context.Context
ctx context.Context
ApiService *UsageApiService
}
func (r ApiBothKeysRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) {
func (r ApiBothKeysRequest) Execute() (map[string]interface{}, *http.Response, error) {
return r.ApiService.BothKeysExecute(r)
}
@ -169,10 +169,10 @@ BothKeys Use both API keys
Use both API keys
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiBothKeysRequest
*/
func (a *UsageApiService) BothKeys(ctx _context.Context) ApiBothKeysRequest {
func (a *UsageApiService) BothKeys(ctx context.Context) ApiBothKeysRequest {
return ApiBothKeysRequest{
ApiService: a,
ctx: ctx,
@ -181,9 +181,9 @@ func (a *UsageApiService) BothKeys(ctx _context.Context) ApiBothKeysRequest {
// Execute executes the request
// @return map[string]interface{}
func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]interface{}, *_nethttp.Response, error) {
func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]interface{}, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue map[string]interface{}
@ -191,14 +191,14 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.BothKeys")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/both"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -255,15 +255,15 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -272,7 +272,7 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -283,12 +283,12 @@ func (a *UsageApiService) BothKeysExecute(r ApiBothKeysRequest) (map[string]inte
}
type ApiKeyInHeaderRequest struct {
ctx _context.Context
ctx context.Context
ApiService *UsageApiService
}
func (r ApiKeyInHeaderRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) {
func (r ApiKeyInHeaderRequest) Execute() (map[string]interface{}, *http.Response, error) {
return r.ApiService.KeyInHeaderExecute(r)
}
@ -297,10 +297,10 @@ KeyInHeader Use API key in header
Use API key in header
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiKeyInHeaderRequest
*/
func (a *UsageApiService) KeyInHeader(ctx _context.Context) ApiKeyInHeaderRequest {
func (a *UsageApiService) KeyInHeader(ctx context.Context) ApiKeyInHeaderRequest {
return ApiKeyInHeaderRequest{
ApiService: a,
ctx: ctx,
@ -309,9 +309,9 @@ func (a *UsageApiService) KeyInHeader(ctx _context.Context) ApiKeyInHeaderReques
// Execute executes the request
// @return map[string]interface{}
func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[string]interface{}, *_nethttp.Response, error) {
func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[string]interface{}, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue map[string]interface{}
@ -319,14 +319,14 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.KeyInHeader")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/header"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -369,15 +369,15 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -386,7 +386,7 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -397,12 +397,12 @@ func (a *UsageApiService) KeyInHeaderExecute(r ApiKeyInHeaderRequest) (map[strin
}
type ApiKeyInQueryRequest struct {
ctx _context.Context
ctx context.Context
ApiService *UsageApiService
}
func (r ApiKeyInQueryRequest) Execute() (map[string]interface{}, *_nethttp.Response, error) {
func (r ApiKeyInQueryRequest) Execute() (map[string]interface{}, *http.Response, error) {
return r.ApiService.KeyInQueryExecute(r)
}
@ -411,10 +411,10 @@ KeyInQuery Use API key in query
Use API key in query
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiKeyInQueryRequest
*/
func (a *UsageApiService) KeyInQuery(ctx _context.Context) ApiKeyInQueryRequest {
func (a *UsageApiService) KeyInQuery(ctx context.Context) ApiKeyInQueryRequest {
return ApiKeyInQueryRequest{
ApiService: a,
ctx: ctx,
@ -423,9 +423,9 @@ func (a *UsageApiService) KeyInQuery(ctx _context.Context) ApiKeyInQueryRequest
// Execute executes the request
// @return map[string]interface{}
func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]interface{}, *_nethttp.Response, error) {
func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]interface{}, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue map[string]interface{}
@ -433,14 +433,14 @@ func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UsageApiService.KeyInQuery")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/query"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -483,15 +483,15 @@ func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -500,7 +500,7 @@ func (a *UsageApiService) KeyInQueryExecute(r ApiKeyInQueryRequest) (map[string]
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -422,6 +422,13 @@ func reportError(format string, a ...interface{}) error {
return fmt.Errorf(format, a...)
}
// A wrapper for strict JSON decoding
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}
// Set request body from an interface{}
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
if bodyBuf == nil {

View File

@ -34,8 +34,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UsageApi.AnyKey(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.AnyKey(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.AnyKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -95,8 +95,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UsageApi.BothKeys(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.BothKeys(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.BothKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -156,8 +156,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UsageApi.KeyInHeader(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.KeyInHeader(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInHeader``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -217,8 +217,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UsageApi.KeyInQuery(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UsageApi.KeyInQuery(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UsageApi.KeyInQuery``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -3,5 +3,5 @@ module github.com/GIT_USER_ID/GIT_REPO_ID
go 1.13
require (
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558
)

View File

@ -10,7 +10,7 @@ import (
"golang.org/x/oauth2"
sw "./go-petstore"
sw "go-petstore"
)
func TestOAuth2(t *testing.T) {
@ -39,7 +39,7 @@ func TestOAuth2(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute()
@ -74,7 +74,7 @@ func TestBasicAuth(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(auth).Pet(newPet).Execute()
@ -104,7 +104,7 @@ func TestAccessToken(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil).Pet(newPet).Execute()
@ -130,11 +130,11 @@ func TestAccessToken(t *testing.T) {
}
func TestAPIKeyNoPrefix(t *testing.T) {
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123"}})
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123"}})
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute()
@ -165,11 +165,11 @@ func TestAPIKeyNoPrefix(t *testing.T) {
}
func TestAPIKeyWithPrefix(t *testing.T) {
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": sw.APIKey{Key: "TEST123", Prefix: "Bearer"}})
auth := context.WithValue(context.Background(), sw.ContextAPIKeys, map[string]sw.APIKey{"api_key": {Key: "TEST123", Prefix: "Bearer"}})
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(nil).Pet(newPet).Execute()
@ -202,7 +202,7 @@ func TestAPIKeyWithPrefix(t *testing.T) {
func TestDefaultHeader(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute()

View File

@ -4,7 +4,7 @@ import (
"context"
"testing"
sw "./go-petstore"
sw "go-petstore"
)
// TestPutBodyWithFileSchema ensures a model with the name 'File'
@ -15,7 +15,7 @@ func TestPutBodyWithFileSchema(t *testing.T) {
schema := sw.FileSchemaTestClass{
File: &sw.File{SourceURI: sw.PtrString("https://example.com/image.png")},
Files: &[]sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}}
Files: []sw.File{{SourceURI: sw.PtrString("https://example.com/image.png")}}}
r, err := client.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(schema).Execute()

View File

@ -22,7 +22,7 @@ go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
```golang
import sw "./petstore"
import petstore "github.com/GIT_USER_ID/GIT_REPO_ID"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
@ -40,7 +40,7 @@ Default configuration comes with `Servers` field that contains server objects as
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
ctx := context.WithValue(context.Background(), petstore.ContextServerIndex, 1)
```
### Templated Server URL
@ -48,7 +48,7 @@ ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
ctx := context.WithValue(context.Background(), petstore.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
@ -62,10 +62,10 @@ An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
```
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
ctx := context.WithValue(context.Background(), petstore.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
ctx = context.WithValue(context.Background(), petstore.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
@ -206,7 +206,7 @@ Note, each API key must be added to a map of `map[string]APIKey` where the key i
Example
```golang
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
```
@ -233,7 +233,7 @@ r, err := client.Service.Operation(auth, args)
Example
```golang
authConfig := sw.HttpSignatureAuth{
authConfig := client.HttpSignatureAuth{
KeyId: "my-key-id",
PrivateKeyPath: "rsa.pem",
Passphrase: "my-passphrase",

View File

@ -12,15 +12,15 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type AnotherFakeApi interface {
@ -30,21 +30,21 @@ type AnotherFakeApi interface {
To test special tags and operation ID starting with number
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCall123TestSpecialTagsRequest
*/
Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest
Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest
// Call123TestSpecialTagsExecute executes the request
// @return Client
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error)
Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error)
}
// AnotherFakeApiService AnotherFakeApi service
type AnotherFakeApiService service
type ApiCall123TestSpecialTagsRequest struct {
ctx _context.Context
ctx context.Context
ApiService AnotherFakeApi
client *Client
}
@ -55,7 +55,7 @@ func (r ApiCall123TestSpecialTagsRequest) Client(client Client) ApiCall123TestSp
return r
}
func (r ApiCall123TestSpecialTagsRequest) Execute() (Client, *_nethttp.Response, error) {
func (r ApiCall123TestSpecialTagsRequest) Execute() (*Client, *http.Response, error) {
return r.ApiService.Call123TestSpecialTagsExecute(r)
}
@ -64,10 +64,10 @@ Call123TestSpecialTags To test special tags
To test special tags and operation ID starting with number
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCall123TestSpecialTagsRequest
*/
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) ApiCall123TestSpecialTagsRequest {
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context) ApiCall123TestSpecialTagsRequest {
return ApiCall123TestSpecialTagsRequest{
ApiService: a,
ctx: ctx,
@ -76,24 +76,24 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context) Api
// Execute executes the request
// @return Client
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (Client, *_nethttp.Response, error) {
func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSpecialTagsRequest) (*Client, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Client
localVarReturnValue *Client
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AnotherFakeApiService.Call123TestSpecialTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/another-fake/dummy"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.client == nil {
return localVarReturnValue, nil, reportError("client is required and must be specified")
}
@ -127,15 +127,15 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -144,7 +144,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTagsExecute(r ApiCall123TestSp
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -12,15 +12,15 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type DefaultApi interface {
@ -28,36 +28,36 @@ type DefaultApi interface {
/*
FooGet Method for FooGet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFooGetRequest
*/
FooGet(ctx _context.Context) ApiFooGetRequest
FooGet(ctx context.Context) ApiFooGetRequest
// FooGetExecute executes the request
// @return InlineResponseDefault
FooGetExecute(r ApiFooGetRequest) (InlineResponseDefault, *_nethttp.Response, error)
FooGetExecute(r ApiFooGetRequest) (*InlineResponseDefault, *http.Response, error)
}
// DefaultApiService DefaultApi service
type DefaultApiService service
type ApiFooGetRequest struct {
ctx _context.Context
ctx context.Context
ApiService DefaultApi
}
func (r ApiFooGetRequest) Execute() (InlineResponseDefault, *_nethttp.Response, error) {
func (r ApiFooGetRequest) Execute() (*InlineResponseDefault, *http.Response, error) {
return r.ApiService.FooGetExecute(r)
}
/*
FooGet Method for FooGet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFooGetRequest
*/
func (a *DefaultApiService) FooGet(ctx _context.Context) ApiFooGetRequest {
func (a *DefaultApiService) FooGet(ctx context.Context) ApiFooGetRequest {
return ApiFooGetRequest{
ApiService: a,
ctx: ctx,
@ -66,24 +66,24 @@ func (a *DefaultApiService) FooGet(ctx _context.Context) ApiFooGetRequest {
// Execute executes the request
// @return InlineResponseDefault
func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (InlineResponseDefault, *_nethttp.Response, error) {
func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (*InlineResponseDefault, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue InlineResponseDefault
localVarReturnValue *InlineResponseDefault
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.FooGet")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/foo"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -112,15 +112,15 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (InlineResponseDef
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -156,7 +156,7 @@ func (a *DefaultApiService) FooGetExecute(r ApiFooGetRequest) (InlineResponseDef
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

File diff suppressed because it is too large Load Diff

View File

@ -12,15 +12,15 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type FakeClassnameTags123Api interface {
@ -30,21 +30,21 @@ type FakeClassnameTags123Api interface {
To test class name in snake case
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClassnameRequest
*/
TestClassname(ctx _context.Context) ApiTestClassnameRequest
TestClassname(ctx context.Context) ApiTestClassnameRequest
// TestClassnameExecute executes the request
// @return Client
TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error)
TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error)
}
// FakeClassnameTags123ApiService FakeClassnameTags123Api service
type FakeClassnameTags123ApiService service
type ApiTestClassnameRequest struct {
ctx _context.Context
ctx context.Context
ApiService FakeClassnameTags123Api
client *Client
}
@ -55,7 +55,7 @@ func (r ApiTestClassnameRequest) Client(client Client) ApiTestClassnameRequest {
return r
}
func (r ApiTestClassnameRequest) Execute() (Client, *_nethttp.Response, error) {
func (r ApiTestClassnameRequest) Execute() (*Client, *http.Response, error) {
return r.ApiService.TestClassnameExecute(r)
}
@ -64,10 +64,10 @@ TestClassname To test class name in snake case
To test class name in snake case
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiTestClassnameRequest
*/
func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) ApiTestClassnameRequest {
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context) ApiTestClassnameRequest {
return ApiTestClassnameRequest{
ApiService: a,
ctx: ctx,
@ -76,24 +76,24 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context) Api
// Execute executes the request
// @return Client
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (Client, *_nethttp.Response, error) {
func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassnameRequest) (*Client, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPatch
localVarHTTPMethod = http.MethodPatch
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Client
localVarReturnValue *Client
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FakeClassnameTags123ApiService.TestClassname")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/fake_classname_test"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.client == nil {
return localVarReturnValue, nil, reportError("client is required and must be specified")
}
@ -141,15 +141,15 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -158,7 +158,7 @@ func (a *FakeClassnameTags123ApiService) TestClassnameExecute(r ApiTestClassname
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -12,17 +12,17 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
"os"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type PetApi interface {
@ -30,127 +30,127 @@ type PetApi interface {
/*
AddPet Add a new pet to the store
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAddPetRequest
*/
AddPet(ctx _context.Context) ApiAddPetRequest
AddPet(ctx context.Context) ApiAddPetRequest
// AddPetExecute executes the request
AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error)
AddPetExecute(r ApiAddPetRequest) (*http.Response, error)
/*
DeletePet Deletes a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId Pet id to delete
@return ApiDeletePetRequest
*/
DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest
DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest
// DeletePetExecute executes the request
DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error)
DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error)
/*
FindPetsByStatus Finds Pets by status
Multiple status values can be provided with comma separated strings
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByStatusRequest
*/
FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest
FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest
// FindPetsByStatusExecute executes the request
// @return []Pet
FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error)
FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error)
/*
FindPetsByTags Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByTagsRequest
Deprecated
*/
FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest
FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest
// FindPetsByTagsExecute executes the request
// @return []Pet
// Deprecated
FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error)
FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error)
/*
GetPetById Find pet by ID
Returns a single pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to return
@return ApiGetPetByIdRequest
*/
GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest
GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest
// GetPetByIdExecute executes the request
// @return Pet
GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error)
GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error)
/*
UpdatePet Update an existing pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiUpdatePetRequest
*/
UpdatePet(ctx _context.Context) ApiUpdatePetRequest
UpdatePet(ctx context.Context) ApiUpdatePetRequest
// UpdatePetExecute executes the request
UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error)
UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error)
/*
UpdatePetWithForm Updates a pet in the store with form data
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet that needs to be updated
@return ApiUpdatePetWithFormRequest
*/
UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest
UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest
// UpdatePetWithFormExecute executes the request
UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error)
UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error)
/*
UploadFile uploads an image
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileRequest
*/
UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest
UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest
// UploadFileExecute executes the request
// @return ApiResponse
UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error)
UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error)
/*
UploadFileWithRequiredFile uploads an image (required)
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileWithRequiredFileRequest
*/
UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest
UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest
// UploadFileWithRequiredFileExecute executes the request
// @return ApiResponse
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error)
UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error)
}
// PetApiService PetApi service
type PetApiService service
type ApiAddPetRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
pet *Pet
}
@ -161,17 +161,17 @@ func (r ApiAddPetRequest) Pet(pet Pet) ApiAddPetRequest {
return r
}
func (r ApiAddPetRequest) Execute() (*_nethttp.Response, error) {
func (r ApiAddPetRequest) Execute() (*http.Response, error) {
return r.ApiService.AddPetExecute(r)
}
/*
AddPet Add a new pet to the store
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiAddPetRequest
*/
func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest {
func (a *PetApiService) AddPet(ctx context.Context) ApiAddPetRequest {
return ApiAddPetRequest{
ApiService: a,
ctx: ctx,
@ -179,23 +179,23 @@ func (a *PetApiService) AddPet(ctx _context.Context) ApiAddPetRequest {
}
// Execute executes the request
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, error) {
func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.AddPet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.pet == nil {
return nil, reportError("pet is required and must be specified")
}
@ -229,15 +229,15 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -248,7 +248,7 @@ func (a *PetApiService) AddPetExecute(r ApiAddPetRequest) (*_nethttp.Response, e
}
type ApiDeletePetRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
apiKey *string
@ -259,18 +259,18 @@ func (r ApiDeletePetRequest) ApiKey(apiKey string) ApiDeletePetRequest {
return r
}
func (r ApiDeletePetRequest) Execute() (*_nethttp.Response, error) {
func (r ApiDeletePetRequest) Execute() (*http.Response, error) {
return r.ApiService.DeletePetExecute(r)
}
/*
DeletePet Deletes a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId Pet id to delete
@return ApiDeletePetRequest
*/
func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePetRequest {
func (a *PetApiService) DeletePet(ctx context.Context, petId int64) ApiDeletePetRequest {
return ApiDeletePetRequest{
ApiService: a,
ctx: ctx,
@ -279,24 +279,24 @@ func (a *PetApiService) DeletePet(ctx _context.Context, petId int64) ApiDeletePe
}
// Execute executes the request
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Response, error) {
func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.DeletePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -328,15 +328,15 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -347,7 +347,7 @@ func (a *PetApiService) DeletePetExecute(r ApiDeletePetRequest) (*_nethttp.Respo
}
type ApiFindPetsByStatusRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
status *[]string
}
@ -359,7 +359,7 @@ func (r ApiFindPetsByStatusRequest) Status(status []string) ApiFindPetsByStatusR
return r
}
func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *_nethttp.Response, error) {
func (r ApiFindPetsByStatusRequest) Execute() ([]Pet, *http.Response, error) {
return r.ApiService.FindPetsByStatusExecute(r)
}
@ -368,10 +368,10 @@ FindPetsByStatus Finds Pets by status
Multiple status values can be provided with comma separated strings
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByStatusRequest
*/
func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStatusRequest {
func (a *PetApiService) FindPetsByStatus(ctx context.Context) ApiFindPetsByStatusRequest {
return ApiFindPetsByStatusRequest{
ApiService: a,
ctx: ctx,
@ -380,9 +380,9 @@ func (a *PetApiService) FindPetsByStatus(ctx _context.Context) ApiFindPetsByStat
// Execute executes the request
// @return []Pet
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *_nethttp.Response, error) {
func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([]Pet, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue []Pet
@ -390,14 +390,14 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByStatus")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/findByStatus"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.status == nil {
return localVarReturnValue, nil, reportError("status is required and must be specified")
}
@ -430,15 +430,15 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -447,7 +447,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -458,7 +458,7 @@ func (a *PetApiService) FindPetsByStatusExecute(r ApiFindPetsByStatusRequest) ([
}
type ApiFindPetsByTagsRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
tags *[]string
}
@ -469,7 +469,7 @@ func (r ApiFindPetsByTagsRequest) Tags(tags []string) ApiFindPetsByTagsRequest {
return r
}
func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *_nethttp.Response, error) {
func (r ApiFindPetsByTagsRequest) Execute() ([]Pet, *http.Response, error) {
return r.ApiService.FindPetsByTagsExecute(r)
}
@ -478,12 +478,12 @@ FindPetsByTags Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiFindPetsByTagsRequest
Deprecated
*/
func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRequest {
func (a *PetApiService) FindPetsByTags(ctx context.Context) ApiFindPetsByTagsRequest {
return ApiFindPetsByTagsRequest{
ApiService: a,
ctx: ctx,
@ -493,9 +493,9 @@ func (a *PetApiService) FindPetsByTags(ctx _context.Context) ApiFindPetsByTagsRe
// Execute executes the request
// @return []Pet
// Deprecated
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *_nethttp.Response, error) {
func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue []Pet
@ -503,14 +503,14 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.FindPetsByTags")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/findByTags"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.tags == nil {
return localVarReturnValue, nil, reportError("tags is required and must be specified")
}
@ -543,15 +543,15 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -560,7 +560,7 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -571,13 +571,13 @@ func (a *PetApiService) FindPetsByTagsExecute(r ApiFindPetsByTagsRequest) ([]Pet
}
type ApiGetPetByIdRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
}
func (r ApiGetPetByIdRequest) Execute() (Pet, *_nethttp.Response, error) {
func (r ApiGetPetByIdRequest) Execute() (*Pet, *http.Response, error) {
return r.ApiService.GetPetByIdExecute(r)
}
@ -586,11 +586,11 @@ GetPetById Find pet by ID
Returns a single pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to return
@return ApiGetPetByIdRequest
*/
func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetByIdRequest {
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) ApiGetPetByIdRequest {
return ApiGetPetByIdRequest{
ApiService: a,
ctx: ctx,
@ -600,25 +600,25 @@ func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) ApiGetPetB
// Execute executes the request
// @return Pet
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethttp.Response, error) {
func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (*Pet, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Pet
localVarReturnValue *Pet
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.GetPetById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -661,15 +661,15 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -678,7 +678,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -689,7 +689,7 @@ func (a *PetApiService) GetPetByIdExecute(r ApiGetPetByIdRequest) (Pet, *_nethtt
}
type ApiUpdatePetRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
pet *Pet
}
@ -700,17 +700,17 @@ func (r ApiUpdatePetRequest) Pet(pet Pet) ApiUpdatePetRequest {
return r
}
func (r ApiUpdatePetRequest) Execute() (*_nethttp.Response, error) {
func (r ApiUpdatePetRequest) Execute() (*http.Response, error) {
return r.ApiService.UpdatePetExecute(r)
}
/*
UpdatePet Update an existing pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiUpdatePetRequest
*/
func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest {
func (a *PetApiService) UpdatePet(ctx context.Context) ApiUpdatePetRequest {
return ApiUpdatePetRequest{
ApiService: a,
ctx: ctx,
@ -718,23 +718,23 @@ func (a *PetApiService) UpdatePet(ctx _context.Context) ApiUpdatePetRequest {
}
// Execute executes the request
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Response, error) {
func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePet")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.pet == nil {
return nil, reportError("pet is required and must be specified")
}
@ -768,15 +768,15 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -787,7 +787,7 @@ func (a *PetApiService) UpdatePetExecute(r ApiUpdatePetRequest) (*_nethttp.Respo
}
type ApiUpdatePetWithFormRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
name *string
@ -805,18 +805,18 @@ func (r ApiUpdatePetWithFormRequest) Status(status string) ApiUpdatePetWithFormR
return r
}
func (r ApiUpdatePetWithFormRequest) Execute() (*_nethttp.Response, error) {
func (r ApiUpdatePetWithFormRequest) Execute() (*http.Response, error) {
return r.ApiService.UpdatePetWithFormExecute(r)
}
/*
UpdatePetWithForm Updates a pet in the store with form data
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet that needs to be updated
@return ApiUpdatePetWithFormRequest
*/
func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) ApiUpdatePetWithFormRequest {
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64) ApiUpdatePetWithFormRequest {
return ApiUpdatePetWithFormRequest{
ApiService: a,
ctx: ctx,
@ -825,24 +825,24 @@ func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64) Api
}
// Execute executes the request
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*_nethttp.Response, error) {
func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UpdatePetWithForm")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"}
@ -877,15 +877,15 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -896,7 +896,7 @@ func (a *PetApiService) UpdatePetWithFormExecute(r ApiUpdatePetWithFormRequest)
}
type ApiUploadFileRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
additionalMetadata *string
@ -914,18 +914,18 @@ func (r ApiUploadFileRequest) File(file *os.File) ApiUploadFileRequest {
return r
}
func (r ApiUploadFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
func (r ApiUploadFileRequest) Execute() (*ApiResponse, *http.Response, error) {
return r.ApiService.UploadFileExecute(r)
}
/*
UploadFile uploads an image
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileRequest
*/
func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadFileRequest {
func (a *PetApiService) UploadFile(ctx context.Context, petId int64) ApiUploadFileRequest {
return ApiUploadFileRequest{
ApiService: a,
ctx: ctx,
@ -935,25 +935,25 @@ func (a *PetApiService) UploadFile(ctx _context.Context, petId int64) ApiUploadF
// Execute executes the request
// @return ApiResponse
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse, *_nethttp.Response, error) {
func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (*ApiResponse, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue ApiResponse
localVarReturnValue *ApiResponse
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/pet/{petId}/uploadImage"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{"multipart/form-data"}
@ -986,7 +986,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
fileLocalVarFile = *r.file
}
if fileLocalVarFile != nil {
fbs, _ := _ioutil.ReadAll(fileLocalVarFile)
fbs, _ := ioutil.ReadAll(fileLocalVarFile)
fileLocalVarFileBytes = fbs
fileLocalVarFileName = fileLocalVarFile.Name()
fileLocalVarFile.Close()
@ -1002,15 +1002,15 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -1019,7 +1019,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -1030,7 +1030,7 @@ func (a *PetApiService) UploadFileExecute(r ApiUploadFileRequest) (ApiResponse,
}
type ApiUploadFileWithRequiredFileRequest struct {
ctx _context.Context
ctx context.Context
ApiService PetApi
petId int64
requiredFile **os.File
@ -1048,18 +1048,18 @@ func (r ApiUploadFileWithRequiredFileRequest) AdditionalMetadata(additionalMetad
return r
}
func (r ApiUploadFileWithRequiredFileRequest) Execute() (ApiResponse, *_nethttp.Response, error) {
func (r ApiUploadFileWithRequiredFileRequest) Execute() (*ApiResponse, *http.Response, error) {
return r.ApiService.UploadFileWithRequiredFileExecute(r)
}
/*
UploadFileWithRequiredFile uploads an image (required)
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param petId ID of pet to update
@return ApiUploadFileWithRequiredFileRequest
*/
func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64) ApiUploadFileWithRequiredFileRequest {
return ApiUploadFileWithRequiredFileRequest{
ApiService: a,
ctx: ctx,
@ -1069,25 +1069,25 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId i
// Execute executes the request
// @return ApiResponse
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (ApiResponse, *_nethttp.Response, error) {
func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithRequiredFileRequest) (*ApiResponse, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue ApiResponse
localVarReturnValue *ApiResponse
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "PetApiService.UploadFileWithRequiredFile")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/fake/{petId}/uploadImageWithRequiredFile"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.PathEscape(parameterToString(r.petId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", url.PathEscape(parameterToString(r.petId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.requiredFile == nil {
return localVarReturnValue, nil, reportError("requiredFile is required and must be specified")
}
@ -1120,7 +1120,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
requiredFileLocalVarFile := *r.requiredFile
if requiredFileLocalVarFile != nil {
fbs, _ := _ioutil.ReadAll(requiredFileLocalVarFile)
fbs, _ := ioutil.ReadAll(requiredFileLocalVarFile)
requiredFileLocalVarFileBytes = fbs
requiredFileLocalVarFileName = requiredFileLocalVarFile.Name()
requiredFileLocalVarFile.Close()
@ -1136,15 +1136,15 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -1153,7 +1153,7 @@ func (a *PetApiService) UploadFileWithRequiredFileExecute(r ApiUploadFileWithReq
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -12,16 +12,16 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type StoreApi interface {
@ -31,68 +31,68 @@ type StoreApi interface {
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of the order that needs to be deleted
@return ApiDeleteOrderRequest
*/
DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest
DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest
// DeleteOrderExecute executes the request
DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error)
DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error)
/*
GetInventory Returns pet inventories by status
Returns a map of status codes to quantities
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetInventoryRequest
*/
GetInventory(ctx _context.Context) ApiGetInventoryRequest
GetInventory(ctx context.Context) ApiGetInventoryRequest
// GetInventoryExecute executes the request
// @return map[string]int32
GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error)
GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error)
/*
GetOrderById Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of pet that needs to be fetched
@return ApiGetOrderByIdRequest
*/
GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest
GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest
// GetOrderByIdExecute executes the request
// @return Order
GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error)
GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error)
/*
PlaceOrder Place an order for a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiPlaceOrderRequest
*/
PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest
PlaceOrder(ctx context.Context) ApiPlaceOrderRequest
// PlaceOrderExecute executes the request
// @return Order
PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error)
PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error)
}
// StoreApiService StoreApi service
type StoreApiService service
type ApiDeleteOrderRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
orderId string
}
func (r ApiDeleteOrderRequest) Execute() (*_nethttp.Response, error) {
func (r ApiDeleteOrderRequest) Execute() (*http.Response, error) {
return r.ApiService.DeleteOrderExecute(r)
}
@ -101,11 +101,11 @@ DeleteOrder Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of the order that needs to be deleted
@return ApiDeleteOrderRequest
*/
func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiDeleteOrderRequest {
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) ApiDeleteOrderRequest {
return ApiDeleteOrderRequest{
ApiService: a,
ctx: ctx,
@ -114,24 +114,24 @@ func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) ApiD
}
// Execute executes the request
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp.Response, error) {
func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.DeleteOrder")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/order/{order_id}"
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -160,15 +160,15 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -179,12 +179,12 @@ func (a *StoreApiService) DeleteOrderExecute(r ApiDeleteOrderRequest) (*_nethttp
}
type ApiGetInventoryRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
}
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *_nethttp.Response, error) {
func (r ApiGetInventoryRequest) Execute() (map[string]int32, *http.Response, error) {
return r.ApiService.GetInventoryExecute(r)
}
@ -193,10 +193,10 @@ GetInventory Returns pet inventories by status
Returns a map of status codes to quantities
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetInventoryRequest
*/
func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequest {
func (a *StoreApiService) GetInventory(ctx context.Context) ApiGetInventoryRequest {
return ApiGetInventoryRequest{
ApiService: a,
ctx: ctx,
@ -205,9 +205,9 @@ func (a *StoreApiService) GetInventory(ctx _context.Context) ApiGetInventoryRequ
// Execute executes the request
// @return map[string]int32
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *_nethttp.Response, error) {
func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[string]int32, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue map[string]int32
@ -215,14 +215,14 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetInventory")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/inventory"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -265,15 +265,15 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -282,7 +282,7 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -293,13 +293,13 @@ func (a *StoreApiService) GetInventoryExecute(r ApiGetInventoryRequest) (map[str
}
type ApiGetOrderByIdRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
orderId int64
}
func (r ApiGetOrderByIdRequest) Execute() (Order, *_nethttp.Response, error) {
func (r ApiGetOrderByIdRequest) Execute() (*Order, *http.Response, error) {
return r.ApiService.GetOrderByIdExecute(r)
}
@ -308,11 +308,11 @@ GetOrderById Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param orderId ID of pet that needs to be fetched
@return ApiGetOrderByIdRequest
*/
func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiGetOrderByIdRequest {
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) ApiGetOrderByIdRequest {
return ApiGetOrderByIdRequest{
ApiService: a,
ctx: ctx,
@ -322,25 +322,25 @@ func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) ApiG
// Execute executes the request
// @return Order
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order, *_nethttp.Response, error) {
func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (*Order, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Order
localVarReturnValue *Order
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.GetOrderById")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/order/{order_id}"
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.PathEscape(parameterToString(r.orderId, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", url.PathEscape(parameterToString(r.orderId, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.orderId < 1 {
return localVarReturnValue, nil, reportError("orderId must be greater than 1")
}
@ -375,15 +375,15 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -392,7 +392,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -403,7 +403,7 @@ func (a *StoreApiService) GetOrderByIdExecute(r ApiGetOrderByIdRequest) (Order,
}
type ApiPlaceOrderRequest struct {
ctx _context.Context
ctx context.Context
ApiService StoreApi
order *Order
}
@ -414,17 +414,17 @@ func (r ApiPlaceOrderRequest) Order(order Order) ApiPlaceOrderRequest {
return r
}
func (r ApiPlaceOrderRequest) Execute() (Order, *_nethttp.Response, error) {
func (r ApiPlaceOrderRequest) Execute() (*Order, *http.Response, error) {
return r.ApiService.PlaceOrderExecute(r)
}
/*
PlaceOrder Place an order for a pet
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiPlaceOrderRequest
*/
func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest {
func (a *StoreApiService) PlaceOrder(ctx context.Context) ApiPlaceOrderRequest {
return ApiPlaceOrderRequest{
ApiService: a,
ctx: ctx,
@ -433,24 +433,24 @@ func (a *StoreApiService) PlaceOrder(ctx _context.Context) ApiPlaceOrderRequest
// Execute executes the request
// @return Order
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_nethttp.Response, error) {
func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (*Order, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue Order
localVarReturnValue *Order
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "StoreApiService.PlaceOrder")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/store/order"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.order == nil {
return localVarReturnValue, nil, reportError("order is required and must be specified")
}
@ -484,15 +484,15 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -501,7 +501,7 @@ func (a *StoreApiService) PlaceOrderExecute(r ApiPlaceOrderRequest) (Order, *_ne
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}

View File

@ -12,16 +12,16 @@ package petstore
import (
"bytes"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// Linger please
var (
_ _context.Context
_ context.Context
)
type UserApi interface {
@ -31,106 +31,106 @@ type UserApi interface {
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUserRequest
*/
CreateUser(ctx _context.Context) ApiCreateUserRequest
CreateUser(ctx context.Context) ApiCreateUserRequest
// CreateUserExecute executes the request
CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error)
CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error)
/*
CreateUsersWithArrayInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithArrayInputRequest
*/
CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest
CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest
// CreateUsersWithArrayInputExecute executes the request
CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error)
CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error)
/*
CreateUsersWithListInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithListInputRequest
*/
CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest
CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest
// CreateUsersWithListInputExecute executes the request
CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error)
CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error)
/*
DeleteUser Delete user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be deleted
@return ApiDeleteUserRequest
*/
DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest
DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest
// DeleteUserExecute executes the request
DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error)
DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error)
/*
GetUserByName Get user by user name
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be fetched. Use user1 for testing.
@return ApiGetUserByNameRequest
*/
GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest
GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest
// GetUserByNameExecute executes the request
// @return User
GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error)
GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error)
/*
LoginUser Logs user into the system
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLoginUserRequest
*/
LoginUser(ctx _context.Context) ApiLoginUserRequest
LoginUser(ctx context.Context) ApiLoginUserRequest
// LoginUserExecute executes the request
// @return string
LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error)
LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error)
/*
LogoutUser Logs out current logged in user session
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLogoutUserRequest
*/
LogoutUser(ctx _context.Context) ApiLogoutUserRequest
LogoutUser(ctx context.Context) ApiLogoutUserRequest
// LogoutUserExecute executes the request
LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error)
LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error)
/*
UpdateUser Updated user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username name that need to be deleted
@return ApiUpdateUserRequest
*/
UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest
UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest
// UpdateUserExecute executes the request
UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error)
UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error)
}
// UserApiService UserApi service
type UserApiService service
type ApiCreateUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
user *User
}
@ -141,7 +141,7 @@ func (r ApiCreateUserRequest) User(user User) ApiCreateUserRequest {
return r
}
func (r ApiCreateUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiCreateUserRequest) Execute() (*http.Response, error) {
return r.ApiService.CreateUserExecute(r)
}
@ -150,10 +150,10 @@ CreateUser Create user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUserRequest
*/
func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest {
func (a *UserApiService) CreateUser(ctx context.Context) ApiCreateUserRequest {
return ApiCreateUserRequest{
ApiService: a,
ctx: ctx,
@ -161,23 +161,23 @@ func (a *UserApiService) CreateUser(ctx _context.Context) ApiCreateUserRequest {
}
// Execute executes the request
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.user == nil {
return nil, reportError("user is required and must be specified")
}
@ -211,15 +211,15 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -230,7 +230,7 @@ func (a *UserApiService) CreateUserExecute(r ApiCreateUserRequest) (*_nethttp.Re
}
type ApiCreateUsersWithArrayInputRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
user *[]User
}
@ -241,17 +241,17 @@ func (r ApiCreateUsersWithArrayInputRequest) User(user []User) ApiCreateUsersWit
return r
}
func (r ApiCreateUsersWithArrayInputRequest) Execute() (*_nethttp.Response, error) {
func (r ApiCreateUsersWithArrayInputRequest) Execute() (*http.Response, error) {
return r.ApiService.CreateUsersWithArrayInputExecute(r)
}
/*
CreateUsersWithArrayInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithArrayInputRequest
*/
func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCreateUsersWithArrayInputRequest {
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context) ApiCreateUsersWithArrayInputRequest {
return ApiCreateUsersWithArrayInputRequest{
ApiService: a,
ctx: ctx,
@ -259,23 +259,23 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context) ApiCrea
}
// Execute executes the request
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*_nethttp.Response, error) {
func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithArrayInputRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithArrayInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/createWithArray"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.user == nil {
return nil, reportError("user is required and must be specified")
}
@ -309,15 +309,15 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -328,7 +328,7 @@ func (a *UserApiService) CreateUsersWithArrayInputExecute(r ApiCreateUsersWithAr
}
type ApiCreateUsersWithListInputRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
user *[]User
}
@ -339,17 +339,17 @@ func (r ApiCreateUsersWithListInputRequest) User(user []User) ApiCreateUsersWith
return r
}
func (r ApiCreateUsersWithListInputRequest) Execute() (*_nethttp.Response, error) {
func (r ApiCreateUsersWithListInputRequest) Execute() (*http.Response, error) {
return r.ApiService.CreateUsersWithListInputExecute(r)
}
/*
CreateUsersWithListInput Creates list of users with given input array
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiCreateUsersWithListInputRequest
*/
func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreateUsersWithListInputRequest {
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context) ApiCreateUsersWithListInputRequest {
return ApiCreateUsersWithListInputRequest{
ApiService: a,
ctx: ctx,
@ -357,23 +357,23 @@ func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context) ApiCreat
}
// Execute executes the request
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*_nethttp.Response, error) {
func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithListInputRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPost
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.CreateUsersWithListInput")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/createWithList"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.user == nil {
return nil, reportError("user is required and must be specified")
}
@ -407,15 +407,15 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -426,13 +426,13 @@ func (a *UserApiService) CreateUsersWithListInputExecute(r ApiCreateUsersWithLis
}
type ApiDeleteUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username string
}
func (r ApiDeleteUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiDeleteUserRequest) Execute() (*http.Response, error) {
return r.ApiService.DeleteUserExecute(r)
}
@ -441,11 +441,11 @@ DeleteUser Delete user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be deleted
@return ApiDeleteUserRequest
*/
func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDeleteUserRequest {
func (a *UserApiService) DeleteUser(ctx context.Context, username string) ApiDeleteUserRequest {
return ApiDeleteUserRequest{
ApiService: a,
ctx: ctx,
@ -454,24 +454,24 @@ func (a *UserApiService) DeleteUser(ctx _context.Context, username string) ApiDe
}
// Execute executes the request
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodDelete
localVarHTTPMethod = http.MethodDelete
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.DeleteUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -500,15 +500,15 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -519,24 +519,24 @@ func (a *UserApiService) DeleteUserExecute(r ApiDeleteUserRequest) (*_nethttp.Re
}
type ApiGetUserByNameRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username string
}
func (r ApiGetUserByNameRequest) Execute() (User, *_nethttp.Response, error) {
func (r ApiGetUserByNameRequest) Execute() (*User, *http.Response, error) {
return r.ApiService.GetUserByNameExecute(r)
}
/*
GetUserByName Get user by user name
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username The name that needs to be fetched. Use user1 for testing.
@return ApiGetUserByNameRequest
*/
func (a *UserApiService) GetUserByName(ctx _context.Context, username string) ApiGetUserByNameRequest {
func (a *UserApiService) GetUserByName(ctx context.Context, username string) ApiGetUserByNameRequest {
return ApiGetUserByNameRequest{
ApiService: a,
ctx: ctx,
@ -546,25 +546,25 @@ func (a *UserApiService) GetUserByName(ctx _context.Context, username string) Ap
// Execute executes the request
// @return User
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User, *_nethttp.Response, error) {
func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (*User, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue User
localVarReturnValue *User
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.GetUserByName")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -593,15 +593,15 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -610,7 +610,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -621,7 +621,7 @@ func (a *UserApiService) GetUserByNameExecute(r ApiGetUserByNameRequest) (User,
}
type ApiLoginUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username *string
password *string
@ -638,17 +638,17 @@ func (r ApiLoginUserRequest) Password(password string) ApiLoginUserRequest {
return r
}
func (r ApiLoginUserRequest) Execute() (string, *_nethttp.Response, error) {
func (r ApiLoginUserRequest) Execute() (string, *http.Response, error) {
return r.ApiService.LoginUserExecute(r)
}
/*
LoginUser Logs user into the system
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLoginUserRequest
*/
func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest {
func (a *UserApiService) LoginUser(ctx context.Context) ApiLoginUserRequest {
return ApiLoginUserRequest{
ApiService: a,
ctx: ctx,
@ -657,9 +657,9 @@ func (a *UserApiService) LoginUser(ctx _context.Context) ApiLoginUserRequest {
// Execute executes the request
// @return string
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_nethttp.Response, error) {
func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue string
@ -667,14 +667,14 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LoginUser")
if err != nil {
return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()}
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/login"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.username == nil {
return localVarReturnValue, nil, reportError("username is required and must be specified")
}
@ -711,15 +711,15 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -728,7 +728,7 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
@ -739,22 +739,22 @@ func (a *UserApiService) LoginUserExecute(r ApiLoginUserRequest) (string, *_neth
}
type ApiLogoutUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
}
func (r ApiLogoutUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiLogoutUserRequest) Execute() (*http.Response, error) {
return r.ApiService.LogoutUserExecute(r)
}
/*
LogoutUser Logs out current logged in user session
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiLogoutUserRequest
*/
func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest {
func (a *UserApiService) LogoutUser(ctx context.Context) ApiLogoutUserRequest {
return ApiLogoutUserRequest{
ApiService: a,
ctx: ctx,
@ -762,23 +762,23 @@ func (a *UserApiService) LogoutUser(ctx _context.Context) ApiLogoutUserRequest {
}
// Execute executes the request
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.LogoutUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/logout"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
@ -807,15 +807,15 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
@ -826,7 +826,7 @@ func (a *UserApiService) LogoutUserExecute(r ApiLogoutUserRequest) (*_nethttp.Re
}
type ApiUpdateUserRequest struct {
ctx _context.Context
ctx context.Context
ApiService UserApi
username string
user *User
@ -838,7 +838,7 @@ func (r ApiUpdateUserRequest) User(user User) ApiUpdateUserRequest {
return r
}
func (r ApiUpdateUserRequest) Execute() (*_nethttp.Response, error) {
func (r ApiUpdateUserRequest) Execute() (*http.Response, error) {
return r.ApiService.UpdateUserExecute(r)
}
@ -847,11 +847,11 @@ UpdateUser Updated user
This can only be done by the logged in user.
@param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param username name that need to be deleted
@return ApiUpdateUserRequest
*/
func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUpdateUserRequest {
func (a *UserApiService) UpdateUser(ctx context.Context, username string) ApiUpdateUserRequest {
return ApiUpdateUserRequest{
ApiService: a,
ctx: ctx,
@ -860,24 +860,24 @@ func (a *UserApiService) UpdateUser(ctx _context.Context, username string) ApiUp
}
// Execute executes the request
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Response, error) {
func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*http.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodPut
localVarHTTPMethod = http.MethodPut
localVarPostBody interface{}
formFiles []formFile
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "UserApiService.UpdateUser")
if err != nil {
return nil, GenericOpenAPIError{error: err.Error()}
return nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", url.PathEscape(parameterToString(r.username, "")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.user == nil {
return nil, reportError("user is required and must be specified")
}
@ -911,15 +911,15 @@ func (a *UserApiService) UpdateUserExecute(r ApiUpdateUserRequest) (*_nethttp.Re
return localVarHTTPResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body)
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = _ioutil.NopCloser(bytes.NewBuffer(localVarBody))
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}

View File

@ -450,6 +450,13 @@ func reportError(format string, a ...interface{}) error {
return fmt.Errorf(format, a...)
}
// A wrapper for strict JSON decoding
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}
// Set request body from an interface{}
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
if bodyBuf == nil {

View File

@ -32,8 +32,8 @@ func main() {
client := *openapiclient.NewClient() // Client | client model
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Client(client).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnotherFakeApi.Call123TestSpecialTags(context.Background()).Client(client).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeApi.Call123TestSpecialTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -29,8 +29,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.DefaultApi.FooGet(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.FooGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.FooGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -43,8 +43,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeHealthGet(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeHealthGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeHealthGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -105,8 +105,8 @@ func main() {
body := true // bool | Input boolean as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterBooleanSerialize(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterBooleanSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -171,8 +171,8 @@ func main() {
outerComposite := *openapiclient.NewOuterComposite() // OuterComposite | Input composite as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterCompositeSerialize(context.Background()).OuterComposite(outerComposite).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterCompositeSerialize(context.Background()).OuterComposite(outerComposite).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterCompositeSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -237,8 +237,8 @@ func main() {
body := float32(8.14) // float32 | Input number as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterNumberSerialize(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterNumberSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -303,8 +303,8 @@ func main() {
body := "body_example" // string | Input string as post body (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.FakeOuterStringSerialize(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.FakeOuterStringSerialize``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -369,8 +369,8 @@ func main() {
fileSchemaTestClass := *openapiclient.NewFileSchemaTestClass() // FileSchemaTestClass |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(fileSchemaTestClass).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestBodyWithFileSchema(context.Background()).FileSchemaTestClass(fileSchemaTestClass).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithFileSchema``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -432,8 +432,8 @@ func main() {
user := *openapiclient.NewUser() // User |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).User(user).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestBodyWithQueryParams(context.Background()).Query(query).User(user).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestBodyWithQueryParams``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -497,8 +497,8 @@ func main() {
client := *openapiclient.NewClient() // Client | client model
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestClientModel(context.Background()).Client(client).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestClientModel(context.Background()).Client(client).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestClientModel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -577,8 +577,8 @@ func main() {
callback := "callback_example" // string | None (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestEndpointParameters(context.Background()).Number(number).Double(double).PatternWithoutDelimiter(patternWithoutDelimiter).Byte_(byte_).Integer(integer).Int32_(int32_).Int64_(int64_).Float(float).String_(string_).Binary(binary).Date(date).DateTime(dateTime).Password(password).Callback(callback).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEndpointParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -661,8 +661,8 @@ func main() {
enumFormString := "enumFormString_example" // string | Form parameter enum test (string) (optional) (default to "-efg")
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestEnumParameters(context.Background()).EnumHeaderStringArray(enumHeaderStringArray).EnumHeaderString(enumHeaderString).EnumQueryStringArray(enumQueryStringArray).EnumQueryString(enumQueryString).EnumQueryInteger(enumQueryInteger).EnumQueryDouble(enumQueryDouble).EnumFormStringArray(enumFormStringArray).EnumFormString(enumFormString).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestEnumParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -737,8 +737,8 @@ func main() {
int64Group := int64(789) // int64 | Integer in group parameters (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestGroupParameters(context.Background()).RequiredStringGroup(requiredStringGroup).RequiredBooleanGroup(requiredBooleanGroup).RequiredInt64Group(requiredInt64Group).StringGroup(stringGroup).BooleanGroup(booleanGroup).Int64Group(int64Group).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestGroupParameters``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -804,8 +804,8 @@ func main() {
requestBody := map[string]string{"key": "Inner_example"} // map[string]string | request body
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestInlineAdditionalProperties(context.Background()).RequestBody(requestBody).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestInlineAdditionalProperties(context.Background()).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestInlineAdditionalProperties``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -867,8 +867,8 @@ func main() {
param2 := "param2_example" // string | field2
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestJsonFormData(context.Background()).Param(param).Param2(param2).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestJsonFormData``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -936,8 +936,8 @@ func main() {
context := []string{"Inner_example"} // []string |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestQueryParameterCollectionFormat(context.Background()).Pipe(pipe).Ioutil(ioutil).Http(http).Url(url).Context(context).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestQueryParameterCollectionFormat``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -1005,8 +1005,8 @@ func main() {
headerUnique := []string{"Inner_example"} // []string |
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).QueryUnique(queryUnique).HeaderUnique(headerUnique).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat(context.Background()).QueryUnique(queryUnique).HeaderUnique(headerUnique).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeApi.TestUniqueItemsHeaderAndQueryParameterCollectionFormat``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -32,8 +32,8 @@ func main() {
client := *openapiclient.NewClient() // Client | client model
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.FakeClassnameTags123Api.TestClassname(context.Background()).Client(client).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FakeClassnameTags123Api.TestClassname(context.Background()).Client(client).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FakeClassnameTags123Api.TestClassname``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -38,8 +38,8 @@ func main() {
pet := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.AddPet(context.Background()).Pet(pet).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.AddPet(context.Background()).Pet(pet).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.AddPet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -101,8 +101,8 @@ func main() {
apiKey := "apiKey_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.DeletePet(context.Background(), petId).ApiKey(apiKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.DeletePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -170,8 +170,8 @@ func main() {
status := []string{"Status_example"} // []string | Status values that need to be considered for filter
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByStatus(context.Background()).Status(status).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -236,8 +236,8 @@ func main() {
tags := []string{"Inner_example"} // []string | Tags to filter by
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.FindPetsByTags(context.Background()).Tags(tags).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.FindPetsByTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -302,8 +302,8 @@ func main() {
petId := int64(789) // int64 | ID of pet to return
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.GetPetById(context.Background(), petId).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.GetPetById(context.Background(), petId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.GetPetById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -370,8 +370,8 @@ func main() {
pet := *openapiclient.NewPet("doggie", []string{"PhotoUrls_example"}) // Pet | Pet object that needs to be added to the store
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UpdatePet(context.Background()).Pet(pet).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UpdatePet(context.Background()).Pet(pet).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -434,8 +434,8 @@ func main() {
status := "status_example" // string | Updated status of the pet (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UpdatePetWithForm(context.Background(), petId).Name(name).Status(status).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UpdatePetWithForm``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -504,8 +504,8 @@ func main() {
file := os.NewFile(1234, "some_file") // *os.File | file to upload (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFile(context.Background(), petId).AdditionalMetadata(additionalMetadata).File(file).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -576,8 +576,8 @@ func main() {
additionalMetadata := "additionalMetadata_example" // string | Additional data to pass to server (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PetApi.UploadFileWithRequiredFile(context.Background(), petId).RequiredFile(requiredFile).AdditionalMetadata(additionalMetadata).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PetApi.UploadFileWithRequiredFile``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -35,8 +35,8 @@ func main() {
orderId := "orderId_example" // string | ID of the order that needs to be deleted
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.DeleteOrder(context.Background(), orderId).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.DeleteOrder(context.Background(), orderId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.DeleteOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -102,8 +102,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.GetInventory(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetInventory(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetInventory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -164,8 +164,8 @@ func main() {
orderId := int64(789) // int64 | ID of pet that needs to be fetched
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.GetOrderById(context.Background(), orderId).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.GetOrderById(context.Background(), orderId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.GetOrderById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -232,8 +232,8 @@ func main() {
order := *openapiclient.NewOrder() // Order | order placed for purchasing the pet
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.StoreApi.PlaceOrder(context.Background()).Order(order).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StoreApi.PlaceOrder(context.Background()).Order(order).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StoreApi.PlaceOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -39,8 +39,8 @@ func main() {
user := *openapiclient.NewUser() // User | Created user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.CreateUser(context.Background()).User(user).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.CreateUser(context.Background()).User(user).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -101,8 +101,8 @@ func main() {
user := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.CreateUsersWithArrayInput(context.Background()).User(user).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.CreateUsersWithArrayInput(context.Background()).User(user).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithArrayInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -163,8 +163,8 @@ func main() {
user := []openapiclient.User{*openapiclient.NewUser()} // []User | List of user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.CreateUsersWithListInput(context.Background()).User(user).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.CreateUsersWithListInput(context.Background()).User(user).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.CreateUsersWithListInput``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -227,8 +227,8 @@ func main() {
username := "username_example" // string | The name that needs to be deleted
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.DeleteUser(context.Background(), username).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.DeleteUser(context.Background(), username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.DeleteUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -293,8 +293,8 @@ func main() {
username := "username_example" // string | The name that needs to be fetched. Use user1 for testing.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.GetUserByName(context.Background(), username).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.GetUserByName(context.Background(), username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.GetUserByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -362,8 +362,8 @@ func main() {
password := "password_example" // string | The password for login in clear text
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.LoginUser(context.Background()).Username(username).Password(password).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LoginUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -426,8 +426,8 @@ import (
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.LogoutUser(context.Background()).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.LogoutUser(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.LogoutUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@ -487,8 +487,8 @@ func main() {
user := *openapiclient.NewUser() // User | Updated user object
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.UserApi.UpdateUser(context.Background(), username).User(user).Execute()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.UserApi.UpdateUser(context.Background(), username).User(user).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `UserApi.UpdateUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)

View File

@ -3,5 +3,5 @@ module github.com/GIT_USER_ID/GIT_REPO_ID
go 1.13
require (
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558
)

View File

@ -16,7 +16,7 @@ import (
// ArrayOfArrayOfNumberOnly struct for ArrayOfArrayOfNumberOnly
type ArrayOfArrayOfNumberOnly struct {
ArrayArrayNumber *[][]float32 `json:"ArrayArrayNumber,omitempty"`
ArrayArrayNumber [][]float32 `json:"ArrayArrayNumber,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -45,12 +45,12 @@ func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumber() [][]float32 {
var ret [][]float32
return ret
}
return *o.ArrayArrayNumber
return o.ArrayArrayNumber
}
// GetArrayArrayNumberOk returns a tuple with the ArrayArrayNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() (*[][]float32, bool) {
func (o *ArrayOfArrayOfNumberOnly) GetArrayArrayNumberOk() ([][]float32, bool) {
if o == nil || o.ArrayArrayNumber == nil {
return nil, false
}
@ -68,7 +68,7 @@ func (o *ArrayOfArrayOfNumberOnly) HasArrayArrayNumber() bool {
// SetArrayArrayNumber gets a reference to the given [][]float32 and assigns it to the ArrayArrayNumber field.
func (o *ArrayOfArrayOfNumberOnly) SetArrayArrayNumber(v [][]float32) {
o.ArrayArrayNumber = &v
o.ArrayArrayNumber = v
}
func (o ArrayOfArrayOfNumberOnly) MarshalJSON() ([]byte, error) {

View File

@ -16,7 +16,7 @@ import (
// ArrayOfNumberOnly struct for ArrayOfNumberOnly
type ArrayOfNumberOnly struct {
ArrayNumber *[]float32 `json:"ArrayNumber,omitempty"`
ArrayNumber []float32 `json:"ArrayNumber,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -45,12 +45,12 @@ func (o *ArrayOfNumberOnly) GetArrayNumber() []float32 {
var ret []float32
return ret
}
return *o.ArrayNumber
return o.ArrayNumber
}
// GetArrayNumberOk returns a tuple with the ArrayNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayOfNumberOnly) GetArrayNumberOk() (*[]float32, bool) {
func (o *ArrayOfNumberOnly) GetArrayNumberOk() ([]float32, bool) {
if o == nil || o.ArrayNumber == nil {
return nil, false
}
@ -68,7 +68,7 @@ func (o *ArrayOfNumberOnly) HasArrayNumber() bool {
// SetArrayNumber gets a reference to the given []float32 and assigns it to the ArrayNumber field.
func (o *ArrayOfNumberOnly) SetArrayNumber(v []float32) {
o.ArrayNumber = &v
o.ArrayNumber = v
}
func (o ArrayOfNumberOnly) MarshalJSON() ([]byte, error) {

View File

@ -16,9 +16,9 @@ import (
// ArrayTest struct for ArrayTest
type ArrayTest struct {
ArrayOfString *[]string `json:"array_of_string,omitempty"`
ArrayArrayOfInteger *[][]int64 `json:"array_array_of_integer,omitempty"`
ArrayArrayOfModel *[][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
ArrayOfString []string `json:"array_of_string,omitempty"`
ArrayArrayOfInteger [][]int64 `json:"array_array_of_integer,omitempty"`
ArrayArrayOfModel [][]ReadOnlyFirst `json:"array_array_of_model,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -47,12 +47,12 @@ func (o *ArrayTest) GetArrayOfString() []string {
var ret []string
return ret
}
return *o.ArrayOfString
return o.ArrayOfString
}
// GetArrayOfStringOk returns a tuple with the ArrayOfString field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayTest) GetArrayOfStringOk() (*[]string, bool) {
func (o *ArrayTest) GetArrayOfStringOk() ([]string, bool) {
if o == nil || o.ArrayOfString == nil {
return nil, false
}
@ -70,7 +70,7 @@ func (o *ArrayTest) HasArrayOfString() bool {
// SetArrayOfString gets a reference to the given []string and assigns it to the ArrayOfString field.
func (o *ArrayTest) SetArrayOfString(v []string) {
o.ArrayOfString = &v
o.ArrayOfString = v
}
// GetArrayArrayOfInteger returns the ArrayArrayOfInteger field value if set, zero value otherwise.
@ -79,12 +79,12 @@ func (o *ArrayTest) GetArrayArrayOfInteger() [][]int64 {
var ret [][]int64
return ret
}
return *o.ArrayArrayOfInteger
return o.ArrayArrayOfInteger
}
// GetArrayArrayOfIntegerOk returns a tuple with the ArrayArrayOfInteger field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayTest) GetArrayArrayOfIntegerOk() (*[][]int64, bool) {
func (o *ArrayTest) GetArrayArrayOfIntegerOk() ([][]int64, bool) {
if o == nil || o.ArrayArrayOfInteger == nil {
return nil, false
}
@ -102,7 +102,7 @@ func (o *ArrayTest) HasArrayArrayOfInteger() bool {
// SetArrayArrayOfInteger gets a reference to the given [][]int64 and assigns it to the ArrayArrayOfInteger field.
func (o *ArrayTest) SetArrayArrayOfInteger(v [][]int64) {
o.ArrayArrayOfInteger = &v
o.ArrayArrayOfInteger = v
}
// GetArrayArrayOfModel returns the ArrayArrayOfModel field value if set, zero value otherwise.
@ -111,12 +111,12 @@ func (o *ArrayTest) GetArrayArrayOfModel() [][]ReadOnlyFirst {
var ret [][]ReadOnlyFirst
return ret
}
return *o.ArrayArrayOfModel
return o.ArrayArrayOfModel
}
// GetArrayArrayOfModelOk returns a tuple with the ArrayArrayOfModel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayTest) GetArrayArrayOfModelOk() (*[][]ReadOnlyFirst, bool) {
func (o *ArrayTest) GetArrayArrayOfModelOk() ([][]ReadOnlyFirst, bool) {
if o == nil || o.ArrayArrayOfModel == nil {
return nil, false
}
@ -134,7 +134,7 @@ func (o *ArrayTest) HasArrayArrayOfModel() bool {
// SetArrayArrayOfModel gets a reference to the given [][]ReadOnlyFirst and assigns it to the ArrayArrayOfModel field.
func (o *ArrayTest) SetArrayArrayOfModel(v [][]ReadOnlyFirst) {
o.ArrayArrayOfModel = &v
o.ArrayArrayOfModel = v
}
func (o ArrayTest) MarshalJSON() ([]byte, error) {

View File

@ -17,7 +17,7 @@ import (
// EnumArrays struct for EnumArrays
type EnumArrays struct {
JustSymbol *string `json:"just_symbol,omitempty"`
ArrayEnum *[]string `json:"array_enum,omitempty"`
ArrayEnum []string `json:"array_enum,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -78,12 +78,12 @@ func (o *EnumArrays) GetArrayEnum() []string {
var ret []string
return ret
}
return *o.ArrayEnum
return o.ArrayEnum
}
// GetArrayEnumOk returns a tuple with the ArrayEnum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EnumArrays) GetArrayEnumOk() (*[]string, bool) {
func (o *EnumArrays) GetArrayEnumOk() ([]string, bool) {
if o == nil || o.ArrayEnum == nil {
return nil, false
}
@ -101,7 +101,7 @@ func (o *EnumArrays) HasArrayEnum() bool {
// SetArrayEnum gets a reference to the given []string and assigns it to the ArrayEnum field.
func (o *EnumArrays) SetArrayEnum(v []string) {
o.ArrayEnum = &v
o.ArrayEnum = v
}
func (o EnumArrays) MarshalJSON() ([]byte, error) {

View File

@ -17,7 +17,7 @@ import (
// FileSchemaTestClass struct for FileSchemaTestClass
type FileSchemaTestClass struct {
File *File `json:"file,omitempty"`
Files *[]File `json:"files,omitempty"`
Files []File `json:"files,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -78,12 +78,12 @@ func (o *FileSchemaTestClass) GetFiles() []File {
var ret []File
return ret
}
return *o.Files
return o.Files
}
// GetFilesOk returns a tuple with the Files field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FileSchemaTestClass) GetFilesOk() (*[]File, bool) {
func (o *FileSchemaTestClass) GetFilesOk() ([]File, bool) {
if o == nil || o.Files == nil {
return nil, false
}
@ -101,7 +101,7 @@ func (o *FileSchemaTestClass) HasFiles() bool {
// SetFiles gets a reference to the given []File and assigns it to the Files field.
func (o *FileSchemaTestClass) SetFiles(v []File) {
o.Files = &v
o.Files = v
}
func (o FileSchemaTestClass) MarshalJSON() ([]byte, error) {

View File

@ -23,12 +23,16 @@ type Fruit struct {
// AppleAsFruit is a convenience function that returns Apple wrapped in Fruit
func AppleAsFruit(v *Apple) Fruit {
return Fruit{ Apple: v}
return Fruit{
Apple: v,
}
}
// BananaAsFruit is a convenience function that returns Banana wrapped in Fruit
func BananaAsFruit(v *Banana) Fruit {
return Fruit{ Banana: v}
return Fruit{
Banana: v,
}
}
@ -37,7 +41,7 @@ func (dst *Fruit) UnmarshalJSON(data []byte) error {
var err error
match := 0
// try to unmarshal data into Apple
err = json.Unmarshal(data, &dst.Apple)
err = newStrictDecoder(data).Decode(&dst.Apple)
if err == nil {
jsonApple, _ := json.Marshal(dst.Apple)
if string(jsonApple) == "{}" { // empty struct
@ -50,7 +54,7 @@ func (dst *Fruit) UnmarshalJSON(data []byte) error {
}
// try to unmarshal data into Banana
err = json.Unmarshal(data, &dst.Banana)
err = newStrictDecoder(data).Decode(&dst.Banana)
if err == nil {
jsonBanana, _ := json.Marshal(dst.Banana)
if string(jsonBanana) == "{}" { // empty struct
@ -90,6 +94,9 @@ func (src Fruit) MarshalJSON() ([]byte, error) {
// Get the actual instance
func (obj *Fruit) GetActualInstance() (interface{}) {
if obj == nil {
return nil
}
if obj.Apple != nil {
return obj.Apple
}

View File

@ -23,12 +23,16 @@ type FruitReq struct {
// AppleReqAsFruitReq is a convenience function that returns AppleReq wrapped in FruitReq
func AppleReqAsFruitReq(v *AppleReq) FruitReq {
return FruitReq{ AppleReq: v}
return FruitReq{
AppleReq: v,
}
}
// BananaReqAsFruitReq is a convenience function that returns BananaReq wrapped in FruitReq
func BananaReqAsFruitReq(v *BananaReq) FruitReq {
return FruitReq{ BananaReq: v}
return FruitReq{
BananaReq: v,
}
}
@ -37,7 +41,7 @@ func (dst *FruitReq) UnmarshalJSON(data []byte) error {
var err error
match := 0
// try to unmarshal data into AppleReq
err = json.Unmarshal(data, &dst.AppleReq)
err = newStrictDecoder(data).Decode(&dst.AppleReq)
if err == nil {
jsonAppleReq, _ := json.Marshal(dst.AppleReq)
if string(jsonAppleReq) == "{}" { // empty struct
@ -50,7 +54,7 @@ func (dst *FruitReq) UnmarshalJSON(data []byte) error {
}
// try to unmarshal data into BananaReq
err = json.Unmarshal(data, &dst.BananaReq)
err = newStrictDecoder(data).Decode(&dst.BananaReq)
if err == nil {
jsonBananaReq, _ := json.Marshal(dst.BananaReq)
if string(jsonBananaReq) == "{}" { // empty struct
@ -90,6 +94,9 @@ func (src FruitReq) MarshalJSON() ([]byte, error) {
// Get the actual instance
func (obj *FruitReq) GetActualInstance() (interface{}) {
if obj == nil {
return nil
}
if obj.AppleReq != nil {
return obj.AppleReq
}

View File

@ -19,7 +19,7 @@ type InlineObject struct {
// Updated name of the pet
Name *string `json:"name,omitempty"`
// Updated status of the pet
Status *string `json:"status,omitempty"`
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -175,5 +175,3 @@ func (v *NullableInlineObject) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -20,7 +20,7 @@ type InlineObject1 struct {
// Additional data to pass to server
AdditionalMetadata *string `json:"additionalMetadata,omitempty"`
// file to upload
File **os.File `json:"file,omitempty"`
File **os.File `json:"file,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -176,5 +176,3 @@ func (v *NullableInlineObject1) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -19,7 +19,7 @@ type InlineObject2 struct {
// Form parameter enum test (string array)
EnumFormStringArray *[]string `json:"enum_form_string_array,omitempty"`
// Form parameter enum test (string)
EnumFormString *string `json:"enum_form_string,omitempty"`
EnumFormString *string `json:"enum_form_string,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -179,5 +179,3 @@ func (v *NullableInlineObject2) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -45,7 +45,7 @@ type InlineObject3 struct {
// None
Password *string `json:"password,omitempty"`
// None
Callback *string `json:"callback,omitempty"`
Callback *string `json:"callback,omitempty"`
AdditionalProperties map[string]interface{}
}
@ -55,7 +55,7 @@ type _InlineObject3 InlineObject3
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string, ) *InlineObject3 {
func NewInlineObject3(number float32, double float64, patternWithoutDelimiter string, byte_ string) *InlineObject3 {
this := InlineObject3{}
this.Number = number
this.Double = double
@ -170,7 +170,7 @@ func (o *InlineObject3) SetInt64(v int64) {
// GetNumber returns the Number field value
func (o *InlineObject3) GetNumber() float32 {
if o == nil {
if o == nil {
var ret float32
return ret
}
@ -181,7 +181,7 @@ func (o *InlineObject3) GetNumber() float32 {
// GetNumberOk returns a tuple with the Number field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetNumberOk() (*float32, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.Number, true
@ -226,7 +226,7 @@ func (o *InlineObject3) SetFloat(v float32) {
// GetDouble returns the Double field value
func (o *InlineObject3) GetDouble() float64 {
if o == nil {
if o == nil {
var ret float64
return ret
}
@ -237,7 +237,7 @@ func (o *InlineObject3) GetDouble() float64 {
// GetDoubleOk returns a tuple with the Double field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetDoubleOk() (*float64, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.Double, true
@ -282,7 +282,7 @@ func (o *InlineObject3) SetString(v string) {
// GetPatternWithoutDelimiter returns the PatternWithoutDelimiter field value
func (o *InlineObject3) GetPatternWithoutDelimiter() string {
if o == nil {
if o == nil {
var ret string
return ret
}
@ -293,7 +293,7 @@ func (o *InlineObject3) GetPatternWithoutDelimiter() string {
// GetPatternWithoutDelimiterOk returns a tuple with the PatternWithoutDelimiter field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetPatternWithoutDelimiterOk() (*string, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.PatternWithoutDelimiter, true
@ -306,7 +306,7 @@ func (o *InlineObject3) SetPatternWithoutDelimiter(v string) {
// GetByte returns the Byte field value
func (o *InlineObject3) GetByte() string {
if o == nil {
if o == nil {
var ret string
return ret
}
@ -317,7 +317,7 @@ func (o *InlineObject3) GetByte() string {
// GetByteOk returns a tuple with the Byte field value
// and a boolean to check if the value has been set.
func (o *InlineObject3) GetByteOk() (*string, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.Byte, true
@ -605,5 +605,3 @@ func (v *NullableInlineObject3) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -19,7 +19,7 @@ type InlineObject4 struct {
// field1
Param string `json:"param"`
// field2
Param2 string `json:"param2"`
Param2 string `json:"param2"`
AdditionalProperties map[string]interface{}
}
@ -29,7 +29,7 @@ type _InlineObject4 InlineObject4
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject4(param string, param2 string, ) *InlineObject4 {
func NewInlineObject4(param string, param2 string) *InlineObject4 {
this := InlineObject4{}
this.Param = param
this.Param2 = param2
@ -46,7 +46,7 @@ func NewInlineObject4WithDefaults() *InlineObject4 {
// GetParam returns the Param field value
func (o *InlineObject4) GetParam() string {
if o == nil {
if o == nil {
var ret string
return ret
}
@ -57,7 +57,7 @@ func (o *InlineObject4) GetParam() string {
// GetParamOk returns a tuple with the Param field value
// and a boolean to check if the value has been set.
func (o *InlineObject4) GetParamOk() (*string, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.Param, true
@ -70,7 +70,7 @@ func (o *InlineObject4) SetParam(v string) {
// GetParam2 returns the Param2 field value
func (o *InlineObject4) GetParam2() string {
if o == nil {
if o == nil {
var ret string
return ret
}
@ -81,7 +81,7 @@ func (o *InlineObject4) GetParam2() string {
// GetParam2Ok returns a tuple with the Param2 field value
// and a boolean to check if the value has been set.
func (o *InlineObject4) GetParam2Ok() (*string, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.Param2, true
@ -161,5 +161,3 @@ func (v *NullableInlineObject4) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -20,7 +20,7 @@ type InlineObject5 struct {
// Additional data to pass to server
AdditionalMetadata *string `json:"additionalMetadata,omitempty"`
// file to upload
RequiredFile *os.File `json:"requiredFile"`
RequiredFile *os.File `json:"requiredFile"`
AdditionalProperties map[string]interface{}
}
@ -30,7 +30,7 @@ type _InlineObject5 InlineObject5
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewInlineObject5(requiredFile *os.File, ) *InlineObject5 {
func NewInlineObject5(requiredFile *os.File) *InlineObject5 {
this := InlineObject5{}
this.RequiredFile = requiredFile
return &this
@ -78,7 +78,7 @@ func (o *InlineObject5) SetAdditionalMetadata(v string) {
// GetRequiredFile returns the RequiredFile field value
func (o *InlineObject5) GetRequiredFile() *os.File {
if o == nil {
if o == nil {
var ret *os.File
return ret
}
@ -89,7 +89,7 @@ func (o *InlineObject5) GetRequiredFile() *os.File {
// GetRequiredFileOk returns a tuple with the RequiredFile field value
// and a boolean to check if the value has been set.
func (o *InlineObject5) GetRequiredFileOk() (**os.File, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.RequiredFile, true
@ -169,5 +169,3 @@ func (v *NullableInlineObject5) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -23,12 +23,16 @@ type Mammal struct {
// WhaleAsMammal is a convenience function that returns Whale wrapped in Mammal
func WhaleAsMammal(v *Whale) Mammal {
return Mammal{ Whale: v}
return Mammal{
Whale: v,
}
}
// ZebraAsMammal is a convenience function that returns Zebra wrapped in Mammal
func ZebraAsMammal(v *Zebra) Mammal {
return Mammal{ Zebra: v}
return Mammal{
Zebra: v,
}
}
@ -37,7 +41,7 @@ func (dst *Mammal) UnmarshalJSON(data []byte) error {
var err error
match := 0
// try to unmarshal data into Whale
err = json.Unmarshal(data, &dst.Whale)
err = newStrictDecoder(data).Decode(&dst.Whale)
if err == nil {
jsonWhale, _ := json.Marshal(dst.Whale)
if string(jsonWhale) == "{}" { // empty struct
@ -50,7 +54,7 @@ func (dst *Mammal) UnmarshalJSON(data []byte) error {
}
// try to unmarshal data into Zebra
err = json.Unmarshal(data, &dst.Zebra)
err = newStrictDecoder(data).Decode(&dst.Zebra)
if err == nil {
jsonZebra, _ := json.Marshal(dst.Zebra)
if string(jsonZebra) == "{}" { // empty struct
@ -90,6 +94,9 @@ func (src Mammal) MarshalJSON() ([]byte, error) {
// Get the actual instance
func (obj *Mammal) GetActualInstance() (interface{}) {
if obj == nil {
return nil
}
if obj.Whale != nil {
return obj.Whale
}

View File

@ -25,10 +25,10 @@ type NullableClass struct {
DatetimeProp NullableTime `json:"datetime_prop,omitempty"`
ArrayNullableProp []map[string]interface{} `json:"array_nullable_prop,omitempty"`
ArrayAndItemsNullableProp []*map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"`
ArrayItemsNullable *[]*map[string]interface{} `json:"array_items_nullable,omitempty"`
ArrayItemsNullable []*map[string]interface{} `json:"array_items_nullable,omitempty"`
ObjectNullableProp map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"`
ObjectAndItemsNullableProp map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"`
ObjectItemsNullable *map[string]map[string]interface{} `json:"object_items_nullable,omitempty"`
ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"`
}
// NewNullableClass instantiates a new NullableClass object
@ -316,11 +316,11 @@ func (o *NullableClass) GetArrayNullableProp() []map[string]interface{} {
// GetArrayNullablePropOk returns a tuple with the ArrayNullableProp field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NullableClass) GetArrayNullablePropOk() (*[]map[string]interface{}, bool) {
func (o *NullableClass) GetArrayNullablePropOk() ([]map[string]interface{}, bool) {
if o == nil || o.ArrayNullableProp == nil {
return nil, false
}
return &o.ArrayNullableProp, true
return o.ArrayNullableProp, true
}
// HasArrayNullableProp returns a boolean if a field has been set.
@ -349,11 +349,11 @@ func (o *NullableClass) GetArrayAndItemsNullableProp() []*map[string]interface{}
// GetArrayAndItemsNullablePropOk returns a tuple with the ArrayAndItemsNullableProp field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NullableClass) GetArrayAndItemsNullablePropOk() (*[]*map[string]interface{}, bool) {
func (o *NullableClass) GetArrayAndItemsNullablePropOk() ([]*map[string]interface{}, bool) {
if o == nil || o.ArrayAndItemsNullableProp == nil {
return nil, false
}
return &o.ArrayAndItemsNullableProp, true
return o.ArrayAndItemsNullableProp, true
}
// HasArrayAndItemsNullableProp returns a boolean if a field has been set.
@ -376,12 +376,12 @@ func (o *NullableClass) GetArrayItemsNullable() []*map[string]interface{} {
var ret []*map[string]interface{}
return ret
}
return *o.ArrayItemsNullable
return o.ArrayItemsNullable
}
// GetArrayItemsNullableOk returns a tuple with the ArrayItemsNullable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NullableClass) GetArrayItemsNullableOk() (*[]*map[string]interface{}, bool) {
func (o *NullableClass) GetArrayItemsNullableOk() ([]*map[string]interface{}, bool) {
if o == nil || o.ArrayItemsNullable == nil {
return nil, false
}
@ -399,7 +399,7 @@ func (o *NullableClass) HasArrayItemsNullable() bool {
// SetArrayItemsNullable gets a reference to the given []*map[string]interface{} and assigns it to the ArrayItemsNullable field.
func (o *NullableClass) SetArrayItemsNullable(v []*map[string]interface{}) {
o.ArrayItemsNullable = &v
o.ArrayItemsNullable = v
}
// GetObjectNullableProp returns the ObjectNullableProp field value if set, zero value otherwise (both if not set or set to explicit null).
@ -414,11 +414,11 @@ func (o *NullableClass) GetObjectNullableProp() map[string]map[string]interface{
// GetObjectNullablePropOk returns a tuple with the ObjectNullableProp field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NullableClass) GetObjectNullablePropOk() (*map[string]map[string]interface{}, bool) {
func (o *NullableClass) GetObjectNullablePropOk() (map[string]map[string]interface{}, bool) {
if o == nil || o.ObjectNullableProp == nil {
return nil, false
}
return &o.ObjectNullableProp, true
return o.ObjectNullableProp, true
}
// HasObjectNullableProp returns a boolean if a field has been set.
@ -447,11 +447,11 @@ func (o *NullableClass) GetObjectAndItemsNullableProp() map[string]map[string]in
// GetObjectAndItemsNullablePropOk returns a tuple with the ObjectAndItemsNullableProp field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NullableClass) GetObjectAndItemsNullablePropOk() (*map[string]map[string]interface{}, bool) {
func (o *NullableClass) GetObjectAndItemsNullablePropOk() (map[string]map[string]interface{}, bool) {
if o == nil || o.ObjectAndItemsNullableProp == nil {
return nil, false
}
return &o.ObjectAndItemsNullableProp, true
return o.ObjectAndItemsNullableProp, true
}
// HasObjectAndItemsNullableProp returns a boolean if a field has been set.
@ -474,12 +474,12 @@ func (o *NullableClass) GetObjectItemsNullable() map[string]map[string]interface
var ret map[string]map[string]interface{}
return ret
}
return *o.ObjectItemsNullable
return o.ObjectItemsNullable
}
// GetObjectItemsNullableOk returns a tuple with the ObjectItemsNullable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NullableClass) GetObjectItemsNullableOk() (*map[string]map[string]interface{}, bool) {
func (o *NullableClass) GetObjectItemsNullableOk() (map[string]map[string]interface{}, bool) {
if o == nil || o.ObjectItemsNullable == nil {
return nil, false
}
@ -497,7 +497,7 @@ func (o *NullableClass) HasObjectItemsNullable() bool {
// SetObjectItemsNullable gets a reference to the given map[string]map[string]interface{} and assigns it to the ObjectItemsNullable field.
func (o *NullableClass) SetObjectItemsNullable(v map[string]map[string]interface{}) {
o.ObjectItemsNullable = &v
o.ObjectItemsNullable = v
}
func (o NullableClass) MarshalJSON() ([]byte, error) {

View File

@ -50,7 +50,7 @@ func (o *OuterObjectWithEnumProperty) GetValue() OuterEnumInteger {
// GetValueOk returns a tuple with the Value field value
// and a boolean to check if the value has been set.
func (o *OuterObjectWithEnumProperty) GetValueOk() (*OuterEnumInteger, bool) {
if o == nil {
if o == nil {
return nil, false
}
return &o.Value, true
@ -104,5 +104,3 @@ func (v *NullableOuterObjectWithEnumProperty) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@ -20,7 +20,7 @@ type Pet struct {
Category *Category `json:"category,omitempty"`
Name string `json:"name"`
PhotoUrls []string `json:"photoUrls"`
Tags *[]Tag `json:"tags,omitempty"`
Tags []Tag `json:"tags,omitempty"`
// pet status in the store
// Deprecated
Status *string `json:"status,omitempty"`
@ -148,11 +148,11 @@ func (o *Pet) GetPhotoUrls() []string {
// GetPhotoUrlsOk returns a tuple with the PhotoUrls field value
// and a boolean to check if the value has been set.
func (o *Pet) GetPhotoUrlsOk() (*[]string, bool) {
func (o *Pet) GetPhotoUrlsOk() ([]string, bool) {
if o == nil {
return nil, false
}
return &o.PhotoUrls, true
return o.PhotoUrls, true
}
// SetPhotoUrls sets field value
@ -166,12 +166,12 @@ func (o *Pet) GetTags() []Tag {
var ret []Tag
return ret
}
return *o.Tags
return o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Pet) GetTagsOk() (*[]Tag, bool) {
func (o *Pet) GetTagsOk() ([]Tag, bool) {
if o == nil || o.Tags == nil {
return nil, false
}
@ -189,7 +189,7 @@ func (o *Pet) HasTags() bool {
// SetTags gets a reference to the given []Tag and assigns it to the Tags field.
func (o *Pet) SetTags(v []Tag) {
o.Tags = &v
o.Tags = v
}
// GetStatus returns the Status field value if set, zero value otherwise.

View File

@ -26,7 +26,7 @@ type User struct {
// User Status
UserStatus *int32 `json:"userStatus,omitempty"`
// test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value.
ArbitraryObject *map[string]interface{} `json:"arbitraryObject,omitempty"`
ArbitraryObject map[string]interface{} `json:"arbitraryObject,omitempty"`
// test code generation for nullable objects. Value must be a map of strings to values or the 'null' value.
ArbitraryNullableObject map[string]interface{} `json:"arbitraryNullableObject,omitempty"`
// test code generation for any type Value can be any type - string, number, boolean, array or object.
@ -317,12 +317,12 @@ func (o *User) GetArbitraryObject() map[string]interface{} {
var ret map[string]interface{}
return ret
}
return *o.ArbitraryObject
return o.ArbitraryObject
}
// GetArbitraryObjectOk returns a tuple with the ArbitraryObject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *User) GetArbitraryObjectOk() (*map[string]interface{}, bool) {
func (o *User) GetArbitraryObjectOk() (map[string]interface{}, bool) {
if o == nil || o.ArbitraryObject == nil {
return nil, false
}
@ -340,7 +340,7 @@ func (o *User) HasArbitraryObject() bool {
// SetArbitraryObject gets a reference to the given map[string]interface{} and assigns it to the ArbitraryObject field.
func (o *User) SetArbitraryObject(v map[string]interface{}) {
o.ArbitraryObject = &v
o.ArbitraryObject = v
}
// GetArbitraryNullableObject returns the ArbitraryNullableObject field value if set, zero value otherwise (both if not set or set to explicit null).
@ -355,11 +355,11 @@ func (o *User) GetArbitraryNullableObject() map[string]interface{} {
// GetArbitraryNullableObjectOk returns a tuple with the ArbitraryNullableObject field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *User) GetArbitraryNullableObjectOk() (*map[string]interface{}, bool) {
func (o *User) GetArbitraryNullableObjectOk() (map[string]interface{}, bool) {
if o == nil || o.ArbitraryNullableObject == nil {
return nil, false
}
return &o.ArbitraryNullableObject, true
return o.ArbitraryNullableObject, true
}
// HasArbitraryNullableObject returns a boolean if a field has been set.

View File

@ -0,0 +1,11 @@
module github.com/OpenAPITools/openapi-generator/samples/openapi3/client/petstore/go
go 1.16
replace go-petstore => ./go-petstore
require (
github.com/stretchr/testify v1.7.0
go-petstore v0.0.0-00010101000000-000000000000
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558
)

View File

@ -0,0 +1,371 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558 h1:D7nTwh4J0i+5mW4Zjzn5omvlr6YBcWywE6KOcatyNxY=
golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

View File

@ -30,7 +30,7 @@ import (
"testing"
"time"
sw "./go-petstore"
sw "go-petstore"
)
// Test RSA private key as published in Appendix C 'Test Values' of
@ -276,7 +276,7 @@ func executeHttpSignatureAuth(t *testing.T, authConfig *sw.HttpSignatureAuth, ex
newPet := (sw.Pet{Id: sw.PtrInt64(12992), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"},
Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
fmt.Printf("Request with HTTP signature. Scheme: '%s'. Algorithm: '%s'. MaxValidity: %v. Headers: '%v'\n",
authConfig.SigningScheme, authConfig.SigningAlgorithm, authConfig.SignatureMaxValidity, authConfig.SignedHeaders)

View File

@ -4,8 +4,8 @@ import (
"encoding/json"
"testing"
sw "./go-petstore"
"github.com/stretchr/testify/assert"
sw "go-petstore"
)
func TestBanana(t *testing.T) {

View File

@ -1,71 +1,71 @@
package main
import (
"encoding/json"
"fmt"
"testing"
"encoding/json"
"fmt"
"testing"
sw "./go-petstore"
sw "go-petstore"
)
func TestNullableMarshalling(t *testing.T) {
var fv float32 = 1.1
nc := sw.NullableClass{
IntegerProp: *sw.NewNullableInt32(nil),
NumberProp: *sw.NewNullableFloat32(&fv),
// BooleanProp is also nullable, but we leave it unset, so it shouldn't be in the JSON
}
res, err := json.Marshal(nc)
if err != nil {
t.Errorf("Error while marshalling structure with Nullables: %v", err)
}
expected := `{"integer_prop":null,"number_prop":1.1}`
assertStringsEqual(t, expected, string(res))
// try unmarshalling now
var unc sw.NullableClass
err = json.Unmarshal(res, &unc)
if err != nil {
t.Errorf("Error while unmarshalling structure with Nullables: %v", err)
}
if unc.BooleanProp.IsSet() || unc.BooleanProp.Get() != nil {
t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc.BooleanProp)
}
if !unc.IntegerProp.IsSet() || unc.IntegerProp.Get() != nil {
t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc.IntegerProp)
}
if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv {
t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp)
}
var fv float32 = 1.1
nc := sw.NullableClass{
IntegerProp: *sw.NewNullableInt32(nil),
NumberProp: *sw.NewNullableFloat32(&fv),
// BooleanProp is also nullable, but we leave it unset, so it shouldn't be in the JSON
}
res, err := json.Marshal(nc)
if err != nil {
t.Errorf("Error while marshalling structure with Nullables: %v", err)
}
expected := `{"integer_prop":null,"number_prop":1.1}`
assertStringsEqual(t, expected, string(res))
// try unmarshalling now
var unc sw.NullableClass
err = json.Unmarshal(res, &unc)
if err != nil {
t.Errorf("Error while unmarshalling structure with Nullables: %v", err)
}
if unc.BooleanProp.IsSet() || unc.BooleanProp.Get() != nil {
t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc.BooleanProp)
}
if !unc.IntegerProp.IsSet() || unc.IntegerProp.Get() != nil {
t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc.IntegerProp)
}
if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv {
t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp)
}
// change the values a bit to make sure the Set/Unset methods work correctly
nc.IntegerProp.Unset()
bv := false
nc.BooleanProp.Set(&bv)
res, err = json.Marshal(nc)
if err != nil {
t.Errorf("Error while marshalling structure with Nullables: %v", err)
}
expected = `{"boolean_prop":false,"number_prop":1.1}`
assertStringsEqual(t, expected, string(res))
// try unmarshalling now
var unc2 sw.NullableClass
err = json.Unmarshal(res, &unc2)
if err != nil {
t.Errorf("Error while unmarshalling structure with Nullables: %v", err)
}
if !unc2.BooleanProp.IsSet() || *unc2.BooleanProp.Get() != false {
t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc2.BooleanProp)
}
if unc2.IntegerProp.IsSet() || unc2.IntegerProp.Get() != nil {
t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc2.IntegerProp)
}
if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv {
t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp)
}
// change the values a bit to make sure the Set/Unset methods work correctly
nc.IntegerProp.Unset()
bv := false
nc.BooleanProp.Set(&bv)
res, err = json.Marshal(nc)
if err != nil {
t.Errorf("Error while marshalling structure with Nullables: %v", err)
}
expected = `{"boolean_prop":false,"number_prop":1.1}`
assertStringsEqual(t, expected, string(res))
// try unmarshalling now
var unc2 sw.NullableClass
err = json.Unmarshal(res, &unc2)
if err != nil {
t.Errorf("Error while unmarshalling structure with Nullables: %v", err)
}
if !unc2.BooleanProp.IsSet() || *unc2.BooleanProp.Get() != false {
t.Errorf("Unmarshalled BooleanProp not empty+unset: %+v", unc2.BooleanProp)
}
if unc2.IntegerProp.IsSet() || unc2.IntegerProp.Get() != nil {
t.Errorf("Unmarshalled IntegerProp not explicit null: %+v", unc2.IntegerProp)
}
if !unc.NumberProp.IsSet() || *unc.NumberProp.Get() != fv {
t.Errorf("Unmarshalled NumberProp not set to value 1.1: %+v", unc.NumberProp)
}
}
func assertStringsEqual(t *testing.T, expected, actual string) {
if expected != actual {
t.Errorf(fmt.Sprintf("`%s` (expected) != `%s` (actual)", expected, actual))
}
if expected != actual {
t.Errorf(fmt.Sprintf("`%s` (expected) != `%s` (actual)", expected, actual))
}
}

View File

@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
sw "./go-petstore"
sw "go-petstore"
)
var client *sw.APIClient
@ -29,7 +29,7 @@ func TestMain(m *testing.M) {
func TestAddPet(t *testing.T) {
newPet := (sw.Pet{Id: sw.PtrInt64(12830), Name: "gopher",
PhotoUrls: []string{"http://1.com", "http://2.com"}, Status: sw.PtrString("pending"),
Tags: &[]sw.Tag{sw.Tag{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
Tags: []sw.Tag{{Id: sw.PtrInt64(1), Name: sw.PtrString("tag2")}}})
r, err := client.PetApi.AddPet(context.Background()).Pet(newPet).Execute()
@ -59,7 +59,7 @@ func TestGetPetById(t *testing.T) {
func TestGetPetByIdWithInvalidID(t *testing.T) {
resp, r, err := client.PetApi.GetPetById(context.Background(), 999999999).Execute()
if r != nil && r.StatusCode == 404 {
assertedError, ok := err.(sw.GenericOpenAPIError)
assertedError, ok := err.(*sw.GenericOpenAPIError)
a := assert.New(t)
a.True(ok)
a.Contains(string(assertedError.Body()), "type")

View File

@ -6,7 +6,7 @@ import (
"testing"
"time"
sw "./go-petstore"
sw "go-petstore"
)
func TestPlaceOrder(t *testing.T) {

View File

@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/assert"
sw "./go-petstore"
sw "go-petstore"
)
func TestCreateUser(t *testing.T) {
@ -33,7 +33,7 @@ func TestCreateUser(t *testing.T) {
//adding x to skip the test, currently it is failing
func TestCreateUsersWithArrayInput(t *testing.T) {
newUsers := []sw.User{
sw.User{
{
Id: sw.PtrInt64(1001),
FirstName: sw.PtrString("gopher1"),
LastName: sw.PtrString("lang1"),
@ -43,7 +43,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
Phone: sw.PtrString("5101112222"),
UserStatus: sw.PtrInt32(1),
},
sw.User{
{
Id: sw.PtrInt64(1002),
FirstName: sw.PtrString("gopher2"),
LastName: sw.PtrString("lang2"),
@ -63,7 +63,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
t.Log(apiResponse)
}
/* issue deleting users due to issue in the server side (500). commented out below for the time being
/* issue deleting users due to issue in the server side (500). commented out below for the time being
//tear down
_, err1 := client.UserApi.DeleteUser(context.Background(), "gopher1").Execute()
if err1 != nil {
@ -76,7 +76,7 @@ func TestCreateUsersWithArrayInput(t *testing.T) {
t.Errorf("Error while deleting user")
t.Log(err2)
}
*/
*/
}
func TestGetUserByName(t *testing.T) {