[WIP] Escape import with underscore in go-experimental client (#3659)

* escape import with underscore in go client

* update ioutil

* Fix collectionFormat=multi request bug in go experimental
This commit is contained in:
William Cheng 2019-08-26 10:38:24 +08:00 committed by GitHub
parent 7e772e1b71
commit 7afd350616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 606 additions and 404 deletions

View File

@ -3,17 +3,17 @@ package {{packageName}}
{{#operations}}
import (
"context"
"io/ioutil"
"net/http"
"net/url"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
{{#imports}} "{{import}}"
{{/imports}}
)
// Linger please
var (
_ context.Context
_ _context.Context
)
type {{classname}}Service service
@ -24,7 +24,7 @@ type {{classname}}Service service
{{#notes}}
{{notes}}
{{/notes}}
* @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().
{{#allParams}}
{{#required}}
* @param {{paramName}}{{#description}} {{{.}}}{{/description}}
@ -63,9 +63,9 @@ type {{{nickname}}}Opts struct {
}
{{/hasOptionalParams}}
func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*http.Response, error) {
func (a *{{{classname}}}Service) {{{nickname}}}(ctx _context.Context{{#hasParams}}, {{/hasParams}}{{#allParams}}{{#required}}{{paramName}} {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}localVarOptionals *{{{nickname}}}Opts{{/hasOptionalParams}}) ({{#returnType}}{{{returnType}}}, {{/returnType}}*_nethttp.Response, error) {
var (
localVarHttpMethod = http.Method{{httpMethod}}
localVarHttpMethod = _nethttp.Method{{httpMethod}}
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -77,11 +77,11 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
// create path and map variables
localVarPath := a.client.cfg.BasePath + "{{{path}}}"{{#pathParams}}
localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", url.QueryEscape(fmt.Sprintf("%v", {{paramName}})), -1){{/pathParams}}
localVarPath = strings.Replace(localVarPath, "{"+"{{baseName}}"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", {{paramName}})), -1){{/pathParams}}
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
{{#allParams}}
{{#required}}
{{#minItems}}
@ -132,11 +132,37 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
{{#hasQueryParams}}
{{#queryParams}}
{{#required}}
{{#isCollectionFormatMulti}}
t:={{paramName}}
if reflect.TypeOf(t).Kind() == reflect.Slice {
s := reflect.ValueOf(t)
for i := 0; i < s.Len(); i++ {
localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
}
} else {
localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
}
{{/isCollectionFormatMulti}}
{{^isCollectionFormatMulti}}
localVarQueryParams.Add("{{baseName}}", parameterToString({{paramName}}, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
{{/isCollectionFormatMulti}}
{{/required}}
{{^required}}
if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() {
{{#isCollectionFormatMulti}}
t:=localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value()
if reflect.TypeOf(t).Kind() == reflect.Slice {
s := reflect.ValueOf(t)
for i := 0; i < s.Len(); i++ {
localVarQueryParams.Add("{{baseName}}", parameterToString(s.Index(i), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
}
} else {
localVarQueryParams.Add("{{baseName}}", parameterToString(t, "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
}
{{/isCollectionFormatMulti}}
{{^isCollectionFormatMulti}}
localVarQueryParams.Add("{{baseName}}", parameterToString(localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value(), "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"))
{{/isCollectionFormatMulti}}
}
{{/required}}
{{/queryParams}}
@ -192,7 +218,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
}
{{/required}}
if localVarFile != nil {
fbs, _ := ioutil.ReadAll(localVarFile)
fbs, _ := _ioutil.ReadAll(localVarFile)
localVarFileBytes = fbs
localVarFileName = localVarFile.Name()
localVarFile.Close()
@ -277,7 +303,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHttpResponse, err

View File

@ -1 +1 @@
4.1.0-SNAPSHOT
4.1.1-SNAPSHOT

View File

@ -46,6 +46,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data
*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **Put** /fake/test-query-paramters |
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case
*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **Post** /pet | Add a new pet to the store
*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **Delete** /pet/{petId} | Deletes a pet

View File

@ -1100,6 +1100,59 @@ paths:
tags:
- fake
x-codegen-request-body-name: body
/fake/test-query-paramters:
put:
description: To test the collection format in query parameters
operationId: testQueryParameterCollectionFormat
parameters:
- explode: false
in: query
name: pipe
required: true
schema:
items:
type: string
type: array
style: form
- in: query
name: ioutil
required: true
schema:
items:
type: string
type: array
- in: query
name: http
required: true
schema:
items:
type: string
type: array
style: spaceDelimited
- explode: false
in: query
name: url
required: true
schema:
items:
type: string
type: array
style: form
- explode: true
in: query
name: context
required: true
schema:
items:
type: string
type: array
style: form
responses:
200:
content: {}
description: Success
tags:
- fake
/fake/{petId}/uploadImageWithRequiredFile:
post:
operationId: uploadFileWithRequiredFile

View File

@ -10,15 +10,15 @@
package petstore
import (
"context"
"io/ioutil"
"net/http"
"net/url"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
)
// Linger please
var (
_ context.Context
_ _context.Context
)
type AnotherFakeApiService service
@ -26,13 +26,13 @@ type AnotherFakeApiService service
/*
AnotherFakeApiService 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().
* @param body client model
@return Client
*/
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body Client) (Client, *http.Response, error) {
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPatch
localVarHttpMethod = _nethttp.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -44,8 +44,8 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body
localVarPath := a.client.cfg.BasePath + "/another-fake/dummy"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}
@ -76,7 +76,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err

View File

@ -10,17 +10,18 @@
package petstore
import (
"context"
"io/ioutil"
"net/http"
"net/url"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"github.com/antihax/optional"
"os"
"reflect"
)
// Linger please
var (
_ context.Context
_ _context.Context
)
type FakeApiService service
@ -28,12 +29,12 @@ type FakeApiService service
/*
FakeApiService creates an XmlItem
this route creates an XmlItem
* @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 xmlItem XmlItem Body
*/
func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*http.Response, error) {
func (a *FakeApiService) CreateXmlItem(ctx _context.Context, xmlItem XmlItem) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -44,8 +45,8 @@ func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*h
localVarPath := a.client.cfg.BasePath + "/fake/create_xml_item"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"}
@ -76,7 +77,7 @@ func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*h
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -96,7 +97,7 @@ func (a *FakeApiService) CreateXmlItem(ctx context.Context, xmlItem XmlItem) (*h
/*
FakeApiService
Test serialization of outer boolean types
* @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 optional nil or *FakeOuterBooleanSerializeOpts - Optional Parameters:
* @param "Body" (optional.Bool) - Input boolean as post body
@return bool
@ -106,9 +107,9 @@ type FakeOuterBooleanSerializeOpts struct {
Body optional.Bool
}
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) {
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx _context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -120,8 +121,8 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
localVarPath := a.client.cfg.BasePath + "/fake/outer/boolean"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -155,7 +156,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -194,7 +195,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
/*
FakeApiService
Test serialization of object with outer number type
* @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 optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters:
* @param "Body" (optional.Interface of OuterComposite) - Input composite as post body
@return OuterComposite
@ -204,9 +205,9 @@ type FakeOuterCompositeSerializeOpts struct {
Body optional.Interface
}
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) {
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx _context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -218,8 +219,8 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
localVarPath := a.client.cfg.BasePath + "/fake/outer/composite"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -257,7 +258,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -296,7 +297,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
/*
FakeApiService
Test serialization of outer number types
* @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 optional nil or *FakeOuterNumberSerializeOpts - Optional Parameters:
* @param "Body" (optional.Float32) - Input number as post body
@return float32
@ -306,9 +307,9 @@ type FakeOuterNumberSerializeOpts struct {
Body optional.Float32
}
func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) {
func (a *FakeApiService) FakeOuterNumberSerialize(ctx _context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -320,8 +321,8 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
localVarPath := a.client.cfg.BasePath + "/fake/outer/number"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -355,7 +356,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -394,7 +395,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
/*
FakeApiService
Test serialization of outer string types
* @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 optional nil or *FakeOuterStringSerializeOpts - Optional Parameters:
* @param "Body" (optional.String) - Input string as post body
@return string
@ -404,9 +405,9 @@ type FakeOuterStringSerializeOpts struct {
Body optional.String
}
func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) {
func (a *FakeApiService) FakeOuterStringSerialize(ctx _context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -418,8 +419,8 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
localVarPath := a.client.cfg.BasePath + "/fake/outer/string"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -453,7 +454,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -492,12 +493,12 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
/*
FakeApiService
For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @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 body
*/
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSchemaTestClass) (*http.Response, error) {
func (a *FakeApiService) TestBodyWithFileSchema(ctx _context.Context, body FileSchemaTestClass) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPut
localVarHttpMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -508,8 +509,8 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSc
localVarPath := a.client.cfg.BasePath + "/fake/body-with-file-schema"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}
@ -540,7 +541,7 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSc
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -559,13 +560,13 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSc
/*
FakeApiService
* @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 query
* @param body
*/
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, body User) (*http.Response, error) {
func (a *FakeApiService) TestBodyWithQueryParams(ctx _context.Context, query string, body User) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPut
localVarHttpMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -576,8 +577,8 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
localVarPath := a.client.cfg.BasePath + "/fake/body-with-query-params"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams.Add("query", parameterToString(query, ""))
// to determine the Content-Type header
@ -609,7 +610,7 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -629,13 +630,13 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
/*
FakeApiService To test \"client\" model
To test \&quot;client\&quot; model
* @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 body client model
@return Client
*/
func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Client, *http.Response, error) {
func (a *FakeApiService) TestClientModel(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPatch
localVarHttpMethod = _nethttp.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -647,8 +648,8 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Clie
localVarPath := a.client.cfg.BasePath + "/fake"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}
@ -679,7 +680,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Clie
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -718,7 +719,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Clie
/*
FakeApiService Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @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 number None
* @param double None
* @param patternWithoutDelimiter None
@ -749,9 +750,9 @@ type TestEndpointParametersOpts struct {
Callback optional.String
}
func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) {
func (a *FakeApiService) TestEndpointParameters(ctx _context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -762,8 +763,8 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
localVarPath := a.client.cfg.BasePath + "/fake"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
if number < 32.1 {
return nil, reportError("number must be greater than 32.1")
}
@ -823,7 +824,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
}
}
if localVarFile != nil {
fbs, _ := ioutil.ReadAll(localVarFile)
fbs, _ := _ioutil.ReadAll(localVarFile)
localVarFileBytes = fbs
localVarFileName = localVarFile.Name()
localVarFile.Close()
@ -854,7 +855,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -874,7 +875,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
/*
FakeApiService To test enum parameters
To test enum parameters
* @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 optional nil or *TestEnumParametersOpts - Optional Parameters:
* @param "EnumHeaderStringArray" (optional.Interface of []string) - Header parameter enum test (string array)
* @param "EnumHeaderString" (optional.String) - Header parameter enum test (string)
@ -897,9 +898,9 @@ type TestEnumParametersOpts struct {
EnumFormString optional.String
}
func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) {
func (a *FakeApiService) TestEnumParameters(ctx _context.Context, localVarOptionals *TestEnumParametersOpts) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -910,8 +911,8 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona
localVarPath := a.client.cfg.BasePath + "/fake"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
if localVarOptionals != nil && localVarOptionals.EnumQueryStringArray.IsSet() {
localVarQueryParams.Add("enum_query_string_array", parameterToString(localVarOptionals.EnumQueryStringArray.Value(), "csv"))
@ -964,7 +965,7 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -984,7 +985,7 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona
/*
FakeApiService Fake endpoint to test group parameters (optional)
Fake endpoint to test group parameters (optional)
* @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 requiredStringGroup Required String in group parameters
* @param requiredBooleanGroup Required Boolean in group parameters
* @param requiredInt64Group Required Integer in group parameters
@ -1000,9 +1001,9 @@ type TestGroupParametersOpts struct {
Int64Group optional.Int64
}
func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) {
func (a *FakeApiService) TestGroupParameters(ctx _context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodDelete
localVarHttpMethod = _nethttp.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -1013,8 +1014,8 @@ func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredString
localVarPath := a.client.cfg.BasePath + "/fake"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams.Add("required_string_group", parameterToString(requiredStringGroup, ""))
localVarQueryParams.Add("required_int64_group", parameterToString(requiredInt64Group, ""))
@ -1055,7 +1056,7 @@ func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredString
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -1074,12 +1075,12 @@ func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredString
/*
FakeApiService test inline additionalProperties
* @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 param request body
*/
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, param map[string]string) (*http.Response, error) {
func (a *FakeApiService) TestInlineAdditionalProperties(ctx _context.Context, param map[string]string) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -1090,8 +1091,8 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, par
localVarPath := a.client.cfg.BasePath + "/fake/inline-additionalProperties"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}
@ -1122,7 +1123,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, par
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -1141,13 +1142,13 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, par
/*
FakeApiService test json serialization of 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 param field1
* @param param2 field2
*/
func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) {
func (a *FakeApiService) TestJsonFormData(ctx _context.Context, param string, param2 string) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -1158,8 +1159,8 @@ func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, par
localVarPath := a.client.cfg.BasePath + "/fake/jsonFormData"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/x-www-form-urlencoded"}
@ -1190,7 +1191,90 @@ func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, par
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericOpenAPIError{
body: localVarBody,
error: localVarHttpResponse.Status,
}
return localVarHttpResponse, newErr
}
return localVarHttpResponse, nil
}
/*
FakeApiService
To test the collection format in query parameters
* @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param pipe
* @param ioutil
* @param http
* @param url
* @param context
*/
func (a *FakeApiService) TestQueryParameterCollectionFormat(ctx _context.Context, pipe []string, ioutil []string, http []string, url []string, context []string) (*_nethttp.Response, error) {
var (
localVarHttpMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/fake/test-query-paramters"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams.Add("pipe", parameterToString(pipe, "csv"))
localVarQueryParams.Add("ioutil", parameterToString(ioutil, "csv"))
localVarQueryParams.Add("http", parameterToString(http, "space"))
localVarQueryParams.Add("url", parameterToString(url, "csv"))
t:=context
if reflect.TypeOf(t).Kind() == reflect.Slice {
s := reflect.ValueOf(t)
for i := 0; i < s.Len(); i++ {
localVarQueryParams.Add("context", parameterToString(s.Index(i), "multi"))
}
} else {
localVarQueryParams.Add("context", parameterToString(t, "multi"))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
// set Content-Type header
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
if localVarHttpContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHttpContentType
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
if localVarHttpHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
}
localVarHttpResponse, err := a.client.callAPI(r)
if err != nil || localVarHttpResponse == nil {
return localVarHttpResponse, err
}
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err

View File

@ -10,15 +10,15 @@
package petstore
import (
"context"
"io/ioutil"
"net/http"
"net/url"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
)
// Linger please
var (
_ context.Context
_ _context.Context
)
type FakeClassnameTags123ApiService service
@ -26,13 +26,13 @@ type FakeClassnameTags123ApiService service
/*
FakeClassnameTags123ApiService 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().
* @param body client model
@return Client
*/
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body Client) (Client, *http.Response, error) {
func (a *FakeClassnameTags123ApiService) TestClassname(ctx _context.Context, body Client) (Client, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPatch
localVarHttpMethod = _nethttp.MethodPatch
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -44,8 +44,8 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body
localVarPath := a.client.cfg.BasePath + "/fake_classname_test"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json"}
@ -88,7 +88,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err

View File

@ -10,10 +10,10 @@
package petstore
import (
"context"
"io/ioutil"
"net/http"
"net/url"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"fmt"
"strings"
"github.com/antihax/optional"
@ -22,19 +22,19 @@ import (
// Linger please
var (
_ context.Context
_ _context.Context
)
type PetApiService service
/*
PetApiService 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().
* @param body Pet object that needs to be added to the store
*/
func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, error) {
func (a *PetApiService) AddPet(ctx _context.Context, body Pet) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -45,8 +45,8 @@ func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, e
localVarPath := a.client.cfg.BasePath + "/pet"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/xml"}
@ -77,7 +77,7 @@ func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, e
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -96,7 +96,7 @@ func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, e
/*
PetApiService 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
* @param optional nil or *DeletePetOpts - Optional Parameters:
* @param "ApiKey" (optional.String) -
@ -106,9 +106,9 @@ type DeletePetOpts struct {
ApiKey optional.String
}
func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) {
func (a *PetApiService) DeletePet(ctx _context.Context, petId int64, localVarOptionals *DeletePetOpts) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodDelete
localVarHttpMethod = _nethttp.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -117,11 +117,11 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOpti
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -153,7 +153,7 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOpti
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -173,13 +173,13 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOpti
/*
PetApiService 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().
* @param status Status values that need to be considered for filter
@return []Pet
*/
func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) {
func (a *PetApiService) FindPetsByStatus(ctx _context.Context, status []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -191,8 +191,8 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
localVarPath := a.client.cfg.BasePath + "/pet/findByStatus"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams.Add("status", parameterToString(status, "csv"))
// to determine the Content-Type header
@ -222,7 +222,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -261,13 +261,13 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
/*
PetApiService 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().
* @param tags Tags to filter by
@return []Pet
*/
func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) {
func (a *PetApiService) FindPetsByTags(ctx _context.Context, tags []string) ([]Pet, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -279,8 +279,8 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
localVarPath := a.client.cfg.BasePath + "/pet/findByTags"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams.Add("tags", parameterToString(tags, "csv"))
// to determine the Content-Type header
@ -310,7 +310,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -349,13 +349,13 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
/*
PetApiService 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 Pet
*/
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) {
func (a *PetApiService) GetPetById(ctx _context.Context, petId int64) (Pet, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -365,11 +365,11 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -410,7 +410,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -448,12 +448,12 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
/*
PetApiService 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().
* @param body Pet object that needs to be added to the store
*/
func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response, error) {
func (a *PetApiService) UpdatePet(ctx _context.Context, body Pet) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPut
localVarHttpMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -464,8 +464,8 @@ func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response
localVarPath := a.client.cfg.BasePath + "/pet"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/json", "application/xml"}
@ -496,7 +496,7 @@ func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -515,7 +515,7 @@ func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response
/*
PetApiService 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
* @param optional nil or *UpdatePetWithFormOpts - Optional Parameters:
* @param "Name" (optional.String) - Updated name of the pet
@ -527,9 +527,9 @@ type UpdatePetWithFormOpts struct {
Status optional.String
}
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) {
func (a *PetApiService) UpdatePetWithForm(ctx _context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -538,11 +538,11 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, loca
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/pet/{petId}"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"application/x-www-form-urlencoded"}
@ -577,7 +577,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, loca
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -596,7 +596,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, loca
/*
PetApiService 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
* @param optional nil or *UploadFileOpts - Optional Parameters:
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
@ -609,9 +609,9 @@ type UploadFileOpts struct {
File optional.Interface
}
func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) {
func (a *PetApiService) UploadFile(ctx _context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -621,11 +621,11 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImage"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"multipart/form-data"}
@ -657,7 +657,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
}
}
if localVarFile != nil {
fbs, _ := ioutil.ReadAll(localVarFile)
fbs, _ := _ioutil.ReadAll(localVarFile)
localVarFileBytes = fbs
localVarFileName = localVarFile.Name()
localVarFile.Close()
@ -672,7 +672,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -710,7 +710,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
/*
PetApiService 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
* @param requiredFile file to upload
* @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
@ -722,9 +722,9 @@ type UploadFileWithRequiredFileOpts struct {
AdditionalMetadata optional.String
}
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) {
func (a *PetApiService) UploadFileWithRequiredFile(ctx _context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -734,11 +734,11 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", petId)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{"multipart/form-data"}
@ -763,7 +763,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
localVarFormFileName = "requiredFile"
localVarFile := requiredFile
if localVarFile != nil {
fbs, _ := ioutil.ReadAll(localVarFile)
fbs, _ := _ioutil.ReadAll(localVarFile)
localVarFileBytes = fbs
localVarFileName = localVarFile.Name()
localVarFile.Close()
@ -778,7 +778,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err

View File

@ -10,17 +10,17 @@
package petstore
import (
"context"
"io/ioutil"
"net/http"
"net/url"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"fmt"
"strings"
)
// Linger please
var (
_ context.Context
_ _context.Context
)
type StoreApiService service
@ -28,12 +28,12 @@ type StoreApiService service
/*
StoreApiService Delete purchase order by ID
For valid response try integer IDs with value &lt; 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
*/
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) {
func (a *StoreApiService) DeleteOrder(ctx _context.Context, orderId string) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodDelete
localVarHttpMethod = _nethttp.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -42,11 +42,11 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*htt
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}"
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", fmt.Sprintf("%v", orderId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", orderId)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -75,7 +75,7 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*htt
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -95,12 +95,12 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*htt
/*
StoreApiService 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 map[string]int32
*/
func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) {
func (a *StoreApiService) GetInventory(ctx _context.Context) (map[string]int32, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -112,8 +112,8 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
localVarPath := a.client.cfg.BasePath + "/store/inventory"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -154,7 +154,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -193,13 +193,13 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
/*
StoreApiService Find purchase order by ID
For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 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 Order
*/
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) {
func (a *StoreApiService) GetOrderById(ctx _context.Context, orderId int64) (Order, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -209,11 +209,11 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/store/order/{order_id}"
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", fmt.Sprintf("%v", orderId), -1)
localVarPath = strings.Replace(localVarPath, "{"+"order_id"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", orderId)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
if orderId < 1 {
return localVarReturnValue, nil, reportError("orderId must be greater than 1")
}
@ -248,7 +248,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -286,13 +286,13 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
/*
StoreApiService 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().
* @param body order placed for purchasing the pet
@return Order
*/
func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *http.Response, error) {
func (a *StoreApiService) PlaceOrder(ctx _context.Context, body Order) (Order, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -304,8 +304,8 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *h
localVarPath := a.client.cfg.BasePath + "/store/order"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -336,7 +336,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *h
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err

View File

@ -10,17 +10,17 @@
package petstore
import (
"context"
"io/ioutil"
"net/http"
"net/url"
_context "context"
_ioutil "io/ioutil"
_nethttp "net/http"
_neturl "net/url"
"fmt"
"strings"
)
// Linger please
var (
_ context.Context
_ _context.Context
)
type UserApiService service
@ -28,12 +28,12 @@ type UserApiService service
/*
UserApiService 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().
* @param body Created user object
*/
func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Response, error) {
func (a *UserApiService) CreateUser(ctx _context.Context, body User) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -44,8 +44,8 @@ func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Respo
localVarPath := a.client.cfg.BasePath + "/user"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -76,7 +76,7 @@ func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Respo
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -95,12 +95,12 @@ func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Respo
/*
UserApiService 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().
* @param body List of user object
*/
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []User) (*http.Response, error) {
func (a *UserApiService) CreateUsersWithArrayInput(ctx _context.Context, body []User) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -111,8 +111,8 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []U
localVarPath := a.client.cfg.BasePath + "/user/createWithArray"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -143,7 +143,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []U
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -162,12 +162,12 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []U
/*
UserApiService 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().
* @param body List of user object
*/
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []User) (*http.Response, error) {
func (a *UserApiService) CreateUsersWithListInput(ctx _context.Context, body []User) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPost
localVarHttpMethod = _nethttp.MethodPost
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -178,8 +178,8 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []Us
localVarPath := a.client.cfg.BasePath + "/user/createWithList"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -210,7 +210,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []Us
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -230,12 +230,12 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []Us
/*
UserApiService 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
*/
func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) {
func (a *UserApiService) DeleteUser(ctx _context.Context, username string) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodDelete
localVarHttpMethod = _nethttp.MethodDelete
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -244,11 +244,11 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -277,7 +277,7 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -296,13 +296,13 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http
/*
UserApiService 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 User
*/
func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) {
func (a *UserApiService) GetUserByName(ctx _context.Context, username string) (User, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -312,11 +312,11 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -345,7 +345,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -383,14 +383,14 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
/*
UserApiService 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().
* @param username The user name for login
* @param password The password for login in clear text
@return string
*/
func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) {
func (a *UserApiService) LoginUser(ctx _context.Context, username string, password string) (string, *_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -402,8 +402,8 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
localVarPath := a.client.cfg.BasePath + "/user/login"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarQueryParams.Add("username", parameterToString(username, ""))
localVarQueryParams.Add("password", parameterToString(password, ""))
@ -434,7 +434,7 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
return localVarReturnValue, localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarReturnValue, localVarHttpResponse, err
@ -472,11 +472,11 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
/*
UserApiService 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().
*/
func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) {
func (a *UserApiService) LogoutUser(ctx _context.Context) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodGet
localVarHttpMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -487,8 +487,8 @@ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error)
localVarPath := a.client.cfg.BasePath + "/user/logout"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -517,7 +517,7 @@ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error)
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
@ -537,13 +537,13 @@ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error)
/*
UserApiService 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
* @param body Updated user object
*/
func (a *UserApiService) UpdateUser(ctx context.Context, username string, body User) (*http.Response, error) {
func (a *UserApiService) UpdateUser(ctx _context.Context, username string, body User) (*_nethttp.Response, error) {
var (
localVarHttpMethod = http.MethodPut
localVarHttpMethod = _nethttp.MethodPut
localVarPostBody interface{}
localVarFormFileName string
localVarFileName string
@ -552,11 +552,11 @@ func (a *UserApiService) UpdateUser(ctx context.Context, username string, body U
// create path and map variables
localVarPath := a.client.cfg.BasePath + "/user/{username}"
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", fmt.Sprintf("%v", username), -1)
localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.QueryEscape(fmt.Sprintf("%v", username)), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}
@ -587,7 +587,7 @@ func (a *UserApiService) UpdateUser(ctx context.Context, username string, body U
return localVarHttpResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarBody, err := _ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,17 +4,17 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MapString** | Pointer to **map[string]string** | | [optional]
**MapNumber** | Pointer to **map[string]float32** | | [optional]
**MapInteger** | Pointer to **map[string]int32** | | [optional]
**MapBoolean** | Pointer to **map[string]bool** | | [optional]
**MapArrayInteger** | Pointer to [**map[string][]int32**](array.md) | | [optional]
**MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional]
**MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
**MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional]
**Anytype1** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**Anytype2** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**Anytype3** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**MapString** | Pointer to **map[string]string** | | [optional]
**MapNumber** | Pointer to **map[string]float32** | | [optional]
**MapInteger** | Pointer to **map[string]int32** | | [optional]
**MapBoolean** | Pointer to **map[string]bool** | | [optional]
**MapArrayInteger** | Pointer to [**map[string][]int32**](array.md) | | [optional]
**MapArrayAnytype** | Pointer to [**map[string][]map[string]interface{}**](array.md) | | [optional]
**MapMapString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
**MapMapAnytype** | Pointer to [**map[string]map[string]map[string]interface{}**](map.md) | | [optional]
**Anytype1** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**Anytype2** | Pointer to [**map[string]interface{}**](.md) | | [optional]
**Anytype3** | Pointer to [**map[string]interface{}**](.md) | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | Pointer to **int32** | | [optional]
**Type** | Pointer to **string** | | [optional]
**Message** | Pointer to **string** | | [optional]
**Code** | Pointer to **int32** | | [optional]
**Type** | Pointer to **string** | | [optional]
**Message** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayArrayNumber** | Pointer to [**[][]float32**](array.md) | | [optional]
**ArrayArrayNumber** | Pointer to [**[][]float32**](array.md) | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayNumber** | Pointer to **[]float32** | | [optional]
**ArrayNumber** | Pointer to **[]float32** | | [optional]
## Methods

View File

@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ArrayOfString** | Pointer to **[]string** | | [optional]
**ArrayArrayOfInteger** | Pointer to [**[][]int64**](array.md) | | [optional]
**ArrayArrayOfModel** | Pointer to [**[][]ReadOnlyFirst**](array.md) | | [optional]
**ArrayOfString** | Pointer to **[]string** | | [optional]
**ArrayArrayOfInteger** | Pointer to [**[][]int64**](array.md) | | [optional]
**ArrayArrayOfModel** | Pointer to [**[][]ReadOnlyFirst**](array.md) | | [optional]
## Methods

View File

@ -4,12 +4,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SmallCamel** | Pointer to **string** | | [optional]
**CapitalCamel** | Pointer to **string** | | [optional]
**SmallSnake** | Pointer to **string** | | [optional]
**CapitalSnake** | Pointer to **string** | | [optional]
**SCAETHFlowPoints** | Pointer to **string** | | [optional]
**ATT_NAME** | Pointer to **string** | Name of the pet | [optional]
**SmallCamel** | Pointer to **string** | | [optional]
**CapitalCamel** | Pointer to **string** | | [optional]
**SmallSnake** | Pointer to **string** | | [optional]
**CapitalSnake** | Pointer to **string** | | [optional]
**SCAETHFlowPoints** | Pointer to **string** | | [optional]
**ATT_NAME** | Pointer to **string** | Name of the pet | [optional]
## Methods

View File

@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | Pointer to **string** | |
**Color** | Pointer to **string** | | [optional] [default to red]
**Declawed** | Pointer to **bool** | | [optional]
**Declawed** | Pointer to **bool** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Declawed** | Pointer to **bool** | | [optional]
**Declawed** | Pointer to **bool** | | [optional]
## Methods

View File

@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int64** | | [optional]
**Name** | Pointer to **string** | | [default to default-name]
**Id** | Pointer to **int64** | | [optional]
**Name** | Pointer to **string** | | [default to default-name]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Class** | Pointer to **string** | | [optional]
**Class** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Client** | Pointer to **string** | | [optional]
**Client** | Pointer to **string** | | [optional]
## Methods

View File

@ -6,7 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ClassName** | Pointer to **string** | |
**Color** | Pointer to **string** | | [optional] [default to red]
**Breed** | Pointer to **string** | | [optional]
**Breed** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Breed** | Pointer to **string** | | [optional]
**Breed** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**JustSymbol** | Pointer to **string** | | [optional]
**ArrayEnum** | Pointer to **[]string** | | [optional]
**JustSymbol** | Pointer to **string** | | [optional]
**ArrayEnum** | Pointer to **[]string** | | [optional]
## Methods

View File

@ -4,11 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**EnumString** | Pointer to **string** | | [optional]
**EnumString** | Pointer to **string** | | [optional]
**EnumStringRequired** | Pointer to **string** | |
**EnumInteger** | Pointer to **int32** | | [optional]
**EnumNumber** | Pointer to **float64** | | [optional]
**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional]
**EnumInteger** | Pointer to **int32** | | [optional]
**EnumNumber** | Pointer to **float64** | | [optional]
**OuterEnum** | Pointer to [**OuterEnum**](OuterEnum.md) | | [optional]
## Methods

View File

@ -17,6 +17,7 @@ Method | HTTP request | Description
[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
[**TestQueryParameterCollectionFormat**](FakeApi.md#TestQueryParameterCollectionFormat) | **Put** /fake/test-query-paramters |
@ -539,3 +540,40 @@ No authorization required
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## TestQueryParameterCollectionFormat
> TestQueryParameterCollectionFormat(ctx, pipe, ioutil, http, url, context)
To test the collection format in query parameters
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**pipe** | [**[]string**](string.md)| |
**ioutil** | [**[]string**](string.md)| |
**http** | [**[]string**](string.md)| |
**url** | [**[]string**](string.md)| |
**context** | [**[]string**](string.md)| |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SourceURI** | Pointer to **string** | Test capitalization | [optional]
**SourceURI** | Pointer to **string** | Test capitalization | [optional]
## Methods

View File

@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**File** | Pointer to [**File**](File.md) | | [optional]
**Files** | Pointer to [**[]File**](File.md) | | [optional]
**File** | Pointer to [**File**](File.md) | | [optional]
**Files** | Pointer to [**[]File**](File.md) | | [optional]
## Methods

View File

@ -4,18 +4,18 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Integer** | Pointer to **int32** | | [optional]
**Int32** | Pointer to **int32** | | [optional]
**Int64** | Pointer to **int64** | | [optional]
**Integer** | Pointer to **int32** | | [optional]
**Int32** | Pointer to **int32** | | [optional]
**Int64** | Pointer to **int64** | | [optional]
**Number** | Pointer to **float32** | |
**Float** | Pointer to **float32** | | [optional]
**Double** | Pointer to **float64** | | [optional]
**String** | Pointer to **string** | | [optional]
**Float** | Pointer to **float32** | | [optional]
**Double** | Pointer to **float64** | | [optional]
**String** | Pointer to **string** | | [optional]
**Byte** | Pointer to **string** | |
**Binary** | Pointer to [***os.File**](*os.File.md) | | [optional]
**Binary** | Pointer to [***os.File**](*os.File.md) | | [optional]
**Date** | Pointer to **string** | |
**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
**Uuid** | Pointer to **string** | | [optional]
**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
**Uuid** | Pointer to **string** | | [optional]
**Password** | Pointer to **string** | |
## Methods

View File

@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Bar** | Pointer to **string** | | [optional]
**Foo** | Pointer to **string** | | [optional]
**Bar** | Pointer to **string** | | [optional]
**Foo** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Var123List** | Pointer to **string** | | [optional]
**Var123List** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,10 +4,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MapMapOfString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
**MapOfEnumString** | Pointer to **map[string]string** | | [optional]
**DirectMap** | Pointer to **map[string]bool** | | [optional]
**IndirectMap** | Pointer to **map[string]bool** | | [optional]
**MapMapOfString** | Pointer to [**map[string]map[string]string**](map.md) | | [optional]
**MapOfEnumString** | Pointer to **map[string]string** | | [optional]
**DirectMap** | Pointer to **map[string]bool** | | [optional]
**IndirectMap** | Pointer to **map[string]bool** | | [optional]
## Methods

View File

@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Uuid** | Pointer to **string** | | [optional]
**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
**Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional]
**Uuid** | Pointer to **string** | | [optional]
**DateTime** | Pointer to [**time.Time**](time.Time.md) | | [optional]
**Map** | Pointer to [**map[string]Animal**](Animal.md) | | [optional]
## Methods

View File

@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **int32** | | [optional]
**Class** | Pointer to **string** | | [optional]
**Name** | Pointer to **int32** | | [optional]
**Class** | Pointer to **string** | | [optional]
## Methods

View File

@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **int32** | |
**SnakeCase** | Pointer to **int32** | | [optional]
**Property** | Pointer to **string** | | [optional]
**Var123Number** | Pointer to **int32** | | [optional]
**SnakeCase** | Pointer to **int32** | | [optional]
**Property** | Pointer to **string** | | [optional]
**Var123Number** | Pointer to **int32** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**JustNumber** | Pointer to **float32** | | [optional]
**JustNumber** | Pointer to **float32** | | [optional]
## Methods

View File

@ -4,11 +4,11 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int64** | | [optional]
**PetId** | Pointer to **int64** | | [optional]
**Quantity** | Pointer to **int32** | | [optional]
**ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional]
**Status** | Pointer to **string** | Order Status | [optional]
**Id** | Pointer to **int64** | | [optional]
**PetId** | Pointer to **int64** | | [optional]
**Quantity** | Pointer to **int32** | | [optional]
**ShipDate** | Pointer to [**time.Time**](time.Time.md) | | [optional]
**Status** | Pointer to **string** | Order Status | [optional]
**Complete** | Pointer to **bool** | | [optional] [default to false]
## Methods

View File

@ -4,9 +4,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MyNumber** | Pointer to **float32** | | [optional]
**MyString** | Pointer to **string** | | [optional]
**MyBoolean** | Pointer to **bool** | | [optional]
**MyNumber** | Pointer to **float32** | | [optional]
**MyString** | Pointer to **string** | | [optional]
**MyBoolean** | Pointer to **bool** | | [optional]
## Methods

View File

@ -4,12 +4,12 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int64** | | [optional]
**Category** | Pointer to [**Category**](Category.md) | | [optional]
**Id** | Pointer to **int64** | | [optional]
**Category** | Pointer to [**Category**](Category.md) | | [optional]
**Name** | Pointer to **string** | |
**PhotoUrls** | Pointer to **[]string** | |
**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional]
**Status** | Pointer to **string** | pet status in the store | [optional]
**Tags** | Pointer to [**[]Tag**](Tag.md) | | [optional]
**Status** | Pointer to **string** | pet status in the store | [optional]
## Methods

View File

@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Bar** | Pointer to **string** | | [optional]
**Baz** | Pointer to **string** | | [optional]
**Bar** | Pointer to **string** | | [optional]
**Baz** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Return** | Pointer to **int32** | | [optional]
**Return** | Pointer to **int32** | | [optional]
## Methods

View File

@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SpecialPropertyName** | Pointer to **int64** | | [optional]
**SpecialPropertyName** | Pointer to **int64** | | [optional]
## Methods

View File

@ -4,8 +4,8 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int64** | | [optional]
**Name** | Pointer to **string** | | [optional]
**Id** | Pointer to **int64** | | [optional]
**Name** | Pointer to **string** | | [optional]
## Methods

View File

@ -4,10 +4,10 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**StringItem** | Pointer to **string** | | [default to what]
**StringItem** | Pointer to **string** | | [default to what]
**NumberItem** | Pointer to **float32** | |
**IntegerItem** | Pointer to **int32** | |
**BoolItem** | Pointer to **bool** | | [default to true]
**BoolItem** | Pointer to **bool** | | [default to true]
**ArrayItem** | Pointer to **[]int32** | |
## Methods

View File

@ -4,14 +4,14 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | Pointer to **int64** | | [optional]
**Username** | Pointer to **string** | | [optional]
**FirstName** | Pointer to **string** | | [optional]
**LastName** | Pointer to **string** | | [optional]
**Email** | Pointer to **string** | | [optional]
**Password** | Pointer to **string** | | [optional]
**Phone** | Pointer to **string** | | [optional]
**UserStatus** | Pointer to **int32** | User Status | [optional]
**Id** | Pointer to **int64** | | [optional]
**Username** | Pointer to **string** | | [optional]
**FirstName** | Pointer to **string** | | [optional]
**LastName** | Pointer to **string** | | [optional]
**Email** | Pointer to **string** | | [optional]
**Password** | Pointer to **string** | | [optional]
**Phone** | Pointer to **string** | | [optional]
**UserStatus** | Pointer to **int32** | User Status | [optional]
## Methods

View File

@ -4,35 +4,35 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AttributeString** | Pointer to **string** | | [optional]
**AttributeNumber** | Pointer to **float32** | | [optional]
**AttributeInteger** | Pointer to **int32** | | [optional]
**AttributeBoolean** | Pointer to **bool** | | [optional]
**WrappedArray** | Pointer to **[]int32** | | [optional]
**NameString** | Pointer to **string** | | [optional]
**NameNumber** | Pointer to **float32** | | [optional]
**NameInteger** | Pointer to **int32** | | [optional]
**NameBoolean** | Pointer to **bool** | | [optional]
**NameArray** | Pointer to **[]int32** | | [optional]
**NameWrappedArray** | Pointer to **[]int32** | | [optional]
**PrefixString** | Pointer to **string** | | [optional]
**PrefixNumber** | Pointer to **float32** | | [optional]
**PrefixInteger** | Pointer to **int32** | | [optional]
**PrefixBoolean** | Pointer to **bool** | | [optional]
**PrefixArray** | Pointer to **[]int32** | | [optional]
**PrefixWrappedArray** | Pointer to **[]int32** | | [optional]
**NamespaceString** | Pointer to **string** | | [optional]
**NamespaceNumber** | Pointer to **float32** | | [optional]
**NamespaceInteger** | Pointer to **int32** | | [optional]
**NamespaceBoolean** | Pointer to **bool** | | [optional]
**NamespaceArray** | Pointer to **[]int32** | | [optional]
**NamespaceWrappedArray** | Pointer to **[]int32** | | [optional]
**PrefixNsString** | Pointer to **string** | | [optional]
**PrefixNsNumber** | Pointer to **float32** | | [optional]
**PrefixNsInteger** | Pointer to **int32** | | [optional]
**PrefixNsBoolean** | Pointer to **bool** | | [optional]
**PrefixNsArray** | Pointer to **[]int32** | | [optional]
**PrefixNsWrappedArray** | Pointer to **[]int32** | | [optional]
**AttributeString** | Pointer to **string** | | [optional]
**AttributeNumber** | Pointer to **float32** | | [optional]
**AttributeInteger** | Pointer to **int32** | | [optional]
**AttributeBoolean** | Pointer to **bool** | | [optional]
**WrappedArray** | Pointer to **[]int32** | | [optional]
**NameString** | Pointer to **string** | | [optional]
**NameNumber** | Pointer to **float32** | | [optional]
**NameInteger** | Pointer to **int32** | | [optional]
**NameBoolean** | Pointer to **bool** | | [optional]
**NameArray** | Pointer to **[]int32** | | [optional]
**NameWrappedArray** | Pointer to **[]int32** | | [optional]
**PrefixString** | Pointer to **string** | | [optional]
**PrefixNumber** | Pointer to **float32** | | [optional]
**PrefixInteger** | Pointer to **int32** | | [optional]
**PrefixBoolean** | Pointer to **bool** | | [optional]
**PrefixArray** | Pointer to **[]int32** | | [optional]
**PrefixWrappedArray** | Pointer to **[]int32** | | [optional]
**NamespaceString** | Pointer to **string** | | [optional]
**NamespaceNumber** | Pointer to **float32** | | [optional]
**NamespaceInteger** | Pointer to **int32** | | [optional]
**NamespaceBoolean** | Pointer to **bool** | | [optional]
**NamespaceArray** | Pointer to **[]int32** | | [optional]
**NamespaceWrappedArray** | Pointer to **[]int32** | | [optional]
**PrefixNsString** | Pointer to **string** | | [optional]
**PrefixNsNumber** | Pointer to **float32** | | [optional]
**PrefixNsInteger** | Pointer to **int32** | | [optional]
**PrefixNsBoolean** | Pointer to **bool** | | [optional]
**PrefixNsArray** | Pointer to **[]int32** | | [optional]
**PrefixNsWrappedArray** | Pointer to **[]int32** | | [optional]
## Methods