mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
[Golang][client] fix formData
file
parameter name use (#506)
* support form-data file MIME `name` parameter * update test spec and Go client for form-data file name * update samples for ensure-up-to-date * update mustache template * update samples for Go client * improve assignment location * update samples
This commit is contained in:
parent
93832340a5
commit
19fd48e33b
@ -67,9 +67,10 @@ type {{{nickname}}}Opts struct {
|
||||
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) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("{{httpMethod}}")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
{{#returnType}}
|
||||
localVarReturnValue {{{returnType}}}
|
||||
{{/returnType}}
|
||||
@ -177,6 +178,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
|
||||
{{#hasFormParams}}
|
||||
{{#formParams}}
|
||||
{{#isFile}}
|
||||
localVarFormFileName = "{{baseName}}"
|
||||
{{#required}}
|
||||
localVarFile := {{paramName}}
|
||||
{{/required}}
|
||||
@ -254,7 +256,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
|
||||
|
||||
{{/isApiKey}}
|
||||
{{/authMethods}}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return {{#returnType}}localVarReturnValue, {{/returnType}}nil, err
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ func (c *APIClient) prepareRequest(
|
||||
headerParams map[string]string,
|
||||
queryParams url.Values,
|
||||
formParams url.Values,
|
||||
formFileName string,
|
||||
fileName string,
|
||||
fileBytes []byte) (localVarRequest *http.Request, err error) {
|
||||
|
||||
@ -209,7 +210,7 @@ func (c *APIClient) prepareRequest(
|
||||
if len(fileBytes) > 0 && fileName != "" {
|
||||
w.Boundary()
|
||||
//_, fileNm := filepath.Split(fileName)
|
||||
part, err := w.CreateFormFile("file", filepath.Base(fileName))
|
||||
part, err := w.CreateFormFile(formFileName, filepath.Base(fileName))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -987,7 +987,7 @@ paths:
|
||||
description: Additional data to pass to server
|
||||
required: false
|
||||
type: string
|
||||
- name: file
|
||||
- name: requiredFile
|
||||
in: formData
|
||||
description: file to upload
|
||||
required: true
|
||||
@ -1526,7 +1526,7 @@ definitions:
|
||||
$ref: "#/definitions/File"
|
||||
File:
|
||||
type: object
|
||||
desription: 'Must be named `File` for test.'
|
||||
description: 'Must be named `File` for test.'
|
||||
properties:
|
||||
sourceURI:
|
||||
description: 'Test capitalization'
|
||||
|
@ -1,6 +1,4 @@
|
||||
openapi: 3.0.0
|
||||
servers:
|
||||
- url: 'http://petstore.swagger.io:80/v2'
|
||||
info:
|
||||
description: >-
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints,
|
||||
@ -573,7 +571,6 @@ paths:
|
||||
parameters:
|
||||
- name: enum_header_string_array
|
||||
in: header
|
||||
explode: true
|
||||
description: Header parameter enum test (string array)
|
||||
schema:
|
||||
type: array
|
||||
@ -964,12 +961,14 @@ paths:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
requiredFile:
|
||||
description: file to upload
|
||||
type: string
|
||||
format: binary
|
||||
required:
|
||||
- file
|
||||
- requiredFile
|
||||
servers:
|
||||
- url: 'http://petstore.swagger.io:80/v2'
|
||||
components:
|
||||
requestBodies:
|
||||
UserArray:
|
||||
|
@ -1008,12 +1008,12 @@ paths:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
requiredFile:
|
||||
description: file to upload
|
||||
format: binary
|
||||
type: string
|
||||
required:
|
||||
- file
|
||||
- requiredFile
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
@ -1507,6 +1507,7 @@ components:
|
||||
$ref: '#/components/schemas/Animal'
|
||||
type: array
|
||||
File:
|
||||
description: Must be named `File` for test.
|
||||
example:
|
||||
sourceURI: sourceURI
|
||||
properties:
|
||||
|
@ -34,9 +34,10 @@ To test special tags
|
||||
func (a *AnotherFakeApiService) TestSpecialTags(ctx context.Context, client Client) (Client, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Patch")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue Client
|
||||
)
|
||||
|
||||
@ -66,7 +67,7 @@ func (a *AnotherFakeApiService) TestSpecialTags(ctx context.Context, client Clie
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &client
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
@ -42,9 +42,10 @@ type FakeOuterBooleanSerializeOpts struct {
|
||||
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue bool
|
||||
)
|
||||
|
||||
@ -77,7 +78,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
|
||||
localVarPostBody = localVarOptionals.Body.Value()
|
||||
}
|
||||
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -138,9 +139,10 @@ type FakeOuterCompositeSerializeOpts struct {
|
||||
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue OuterComposite
|
||||
)
|
||||
|
||||
@ -177,7 +179,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
|
||||
localVarPostBody = &localVarOptionalOuterComposite
|
||||
}
|
||||
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -238,9 +240,10 @@ type FakeOuterNumberSerializeOpts struct {
|
||||
func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue float32
|
||||
)
|
||||
|
||||
@ -273,7 +276,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
|
||||
localVarPostBody = localVarOptionals.Body.Value()
|
||||
}
|
||||
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -334,9 +337,10 @@ type FakeOuterStringSerializeOpts struct {
|
||||
func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue string
|
||||
)
|
||||
|
||||
@ -369,7 +373,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
|
||||
localVarPostBody = localVarOptionals.Body.Value()
|
||||
}
|
||||
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -423,9 +427,10 @@ For this test, the body for this request much reference a schema named `Fil
|
||||
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaTestClass FileSchemaTestClass) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -454,7 +459,7 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaT
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &fileSchemaTestClass
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -490,9 +495,10 @@ FakeApiService
|
||||
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, user User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -522,7 +528,7 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &user
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -559,9 +565,10 @@ To test \"client\" model
|
||||
func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Client, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Patch")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue Client
|
||||
)
|
||||
|
||||
@ -591,7 +598,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &client
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -673,9 +680,10 @@ type TestEndpointParametersOpts struct {
|
||||
func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -733,6 +741,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
|
||||
}
|
||||
localVarFormParams.Add("pattern_without_delimiter", parameterToString(patternWithoutDelimiter, ""))
|
||||
localVarFormParams.Add("byte", parameterToString(byte_, ""))
|
||||
localVarFormFileName = "binary"
|
||||
var localVarFile *os.File
|
||||
if localVarOptionals != nil && localVarOptionals.Binary.IsSet() {
|
||||
localVarFileOk := false
|
||||
@ -759,7 +768,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
|
||||
if localVarOptionals != nil && localVarOptionals.Callback.IsSet() {
|
||||
localVarFormParams.Add("callback", parameterToString(localVarOptionals.Callback.Value(), ""))
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -815,9 +824,10 @@ type TestEnumParametersOpts struct {
|
||||
func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -868,7 +878,7 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona
|
||||
if localVarOptionals != nil && localVarOptionals.EnumFormString.IsSet() {
|
||||
localVarFormParams.Add("enum_form_string", parameterToString(localVarOptionals.EnumFormString.Value(), ""))
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -903,9 +913,10 @@ FakeApiService test inline additionalProperties
|
||||
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, requestBody map[string]string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -934,7 +945,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, req
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &requestBody
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -970,9 +981,10 @@ FakeApiService test json serialization of form data
|
||||
func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -1001,7 +1013,7 @@ func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, par
|
||||
}
|
||||
localVarFormParams.Add("param", parameterToString(param, ""))
|
||||
localVarFormParams.Add("param2", parameterToString(param2, ""))
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -34,9 +34,10 @@ To test class name in snake case
|
||||
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, client Client) (Client, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Patch")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue Client
|
||||
)
|
||||
|
||||
@ -79,7 +80,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
|
||||
}
|
||||
}
|
||||
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
@ -35,9 +35,10 @@ PetApiService Add a new pet to the store
|
||||
func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -66,7 +67,7 @@ func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, er
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &pet
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -108,9 +109,10 @@ type DeletePetOpts struct {
|
||||
func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Delete")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -141,7 +143,7 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOpti
|
||||
if localVarOptionals != nil && localVarOptionals.ApiKey.IsSet() {
|
||||
localVarHeaderParams["api_key"] = parameterToString(localVarOptionals.ApiKey.Value(), "")
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -178,9 +180,10 @@ Multiple status values can be provided with comma separated strings
|
||||
func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue []Pet
|
||||
)
|
||||
|
||||
@ -209,7 +212,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -264,9 +267,10 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue []Pet
|
||||
)
|
||||
|
||||
@ -295,7 +299,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -350,9 +354,10 @@ Returns a single pet
|
||||
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue Pet
|
||||
)
|
||||
|
||||
@ -394,7 +399,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
|
||||
}
|
||||
}
|
||||
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -447,9 +452,10 @@ PetApiService Update an existing pet
|
||||
func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -478,7 +484,7 @@ func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response,
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &pet
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -522,9 +528,10 @@ type UpdatePetWithFormOpts struct {
|
||||
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -558,7 +565,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, loca
|
||||
if localVarOptionals != nil && localVarOptionals.Status.IsSet() {
|
||||
localVarFormParams.Add("status", parameterToString(localVarOptionals.Status.Value(), ""))
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -603,9 +610,10 @@ type UploadFileOpts struct {
|
||||
func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue ApiResponse
|
||||
)
|
||||
|
||||
@ -637,6 +645,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
|
||||
if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() {
|
||||
localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), ""))
|
||||
}
|
||||
localVarFormFileName = "file"
|
||||
var localVarFile *os.File
|
||||
if localVarOptionals != nil && localVarOptionals.File.IsSet() {
|
||||
localVarFileOk := false
|
||||
@ -651,7 +660,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
|
||||
localVarFileName = localVarFile.Name()
|
||||
localVarFile.Close()
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -700,7 +709,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 petId ID of pet to update
|
||||
* @param file file to upload
|
||||
* @param requiredFile file to upload
|
||||
* @param optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
|
||||
* @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
|
||||
@return ApiResponse
|
||||
@ -710,12 +719,13 @@ type UploadFileWithRequiredFileOpts struct {
|
||||
AdditionalMetadata optional.String
|
||||
}
|
||||
|
||||
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, file *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) {
|
||||
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue ApiResponse
|
||||
)
|
||||
|
||||
@ -747,14 +757,15 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
|
||||
if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() {
|
||||
localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), ""))
|
||||
}
|
||||
localVarFile := file
|
||||
localVarFormFileName = "requiredFile"
|
||||
localVarFile := requiredFile
|
||||
if localVarFile != nil {
|
||||
fbs, _ := ioutil.ReadAll(localVarFile)
|
||||
localVarFileBytes = fbs
|
||||
localVarFileName = localVarFile.Name()
|
||||
localVarFile.Close()
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
@ -34,9 +34,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
|
||||
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Delete")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -64,7 +65,7 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*htt
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -100,9 +101,10 @@ Returns a map of status codes to quantities
|
||||
func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue map[string]int32
|
||||
)
|
||||
|
||||
@ -143,7 +145,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
|
||||
}
|
||||
}
|
||||
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -198,9 +200,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
||||
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue Order
|
||||
)
|
||||
|
||||
@ -235,7 +238,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -289,9 +292,10 @@ StoreApiService Place an order for a pet
|
||||
func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue Order
|
||||
)
|
||||
|
||||
@ -321,7 +325,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &order
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
|
@ -34,9 +34,10 @@ This can only be done by the logged in user.
|
||||
func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -65,7 +66,7 @@ func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Respo
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &user
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -100,9 +101,10 @@ UserApiService Creates list of users with given input array
|
||||
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -131,7 +133,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &user
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -166,9 +168,10 @@ UserApiService Creates list of users with given input array
|
||||
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -197,7 +200,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &user
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -233,9 +236,10 @@ This can only be done by the logged in user.
|
||||
func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Delete")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -263,7 +267,7 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -299,9 +303,10 @@ UserApiService Get user by user name
|
||||
func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue User
|
||||
)
|
||||
|
||||
@ -330,7 +335,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -385,9 +390,10 @@ UserApiService Logs user into the system
|
||||
func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue string
|
||||
)
|
||||
|
||||
@ -417,7 +423,7 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return localVarReturnValue, nil, err
|
||||
}
|
||||
@ -469,9 +475,10 @@ UserApiService Logs out current logged in user session
|
||||
func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -498,7 +505,7 @@ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error)
|
||||
if localVarHttpHeaderAccept != "" {
|
||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||
}
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -535,9 +542,10 @@ This can only be done by the logged in user.
|
||||
func (a *UserApiService) UpdateUser(ctx context.Context, username string, user User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -567,7 +575,7 @@ func (a *UserApiService) UpdateUser(ctx context.Context, username string, user U
|
||||
}
|
||||
// body params
|
||||
localVarPostBody = &user
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -178,6 +178,7 @@ func (c *APIClient) prepareRequest(
|
||||
headerParams map[string]string,
|
||||
queryParams url.Values,
|
||||
formParams url.Values,
|
||||
formFileName string,
|
||||
fileName string,
|
||||
fileBytes []byte) (localVarRequest *http.Request, err error) {
|
||||
|
||||
@ -220,7 +221,7 @@ func (c *APIClient) prepareRequest(
|
||||
if len(fileBytes) > 0 && fileName != "" {
|
||||
w.Boundary()
|
||||
//_, fileNm := filepath.Split(fileName)
|
||||
part, err := w.CreateFormFile("file", filepath.Base(fileName))
|
||||
part, err := w.CreateFormFile(formFileName, filepath.Base(fileName))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ Name | Type | Description | Notes
|
||||
[[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)
|
||||
|
||||
# **UploadFileWithRequiredFile**
|
||||
> ApiResponse UploadFileWithRequiredFile(ctx, petId, file, optional)
|
||||
> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional)
|
||||
uploads an image (required)
|
||||
|
||||
### Required Parameters
|
||||
@ -268,7 +268,7 @@ Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet to update |
|
||||
**file** | ***os.File*****os.File**| file to upload |
|
||||
**requiredFile** | ***os.File*****os.File**| file to upload |
|
||||
**optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
package petstore
|
||||
|
||||
// Must be named `File` for test.
|
||||
type File struct {
|
||||
// Test capitalization
|
||||
SourceURI string `json:"sourceURI,omitempty"`
|
||||
|
@ -187,7 +187,7 @@ public interface PetApi extends ApiClient.Api {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
*/
|
||||
@ -196,5 +196,5 @@ public interface PetApi extends ApiClient.Api {
|
||||
"Content-Type: multipart/form-data",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("file") File file, @Param("additionalMetadata") String additionalMetadata);
|
||||
ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -719,13 +719,13 @@ public class PetApi {
|
||||
* uploads an image (required)
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param petId ID of pet to update
|
||||
* @param file file to upload
|
||||
* @param requiredFile file to upload
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @return ModelApiResponse
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
**/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws IOException {
|
||||
HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, file, additionalMetadata);
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws IOException {
|
||||
HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, requiredFile, additionalMetadata);
|
||||
TypeReference typeRef = new TypeReference<ModelApiResponse>() {};
|
||||
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
|
||||
}
|
||||
@ -734,24 +734,24 @@ public class PetApi {
|
||||
* uploads an image (required)
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param petId ID of pet to update
|
||||
* @param file file to upload
|
||||
* @param requiredFile file to upload
|
||||
* @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param.
|
||||
* @return ModelApiResponse
|
||||
* @throws IOException if an error occurs while attempting to invoke the API
|
||||
**/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, Map<String, Object> params) throws IOException {
|
||||
HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, file, params);
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, Map<String, Object> params) throws IOException {
|
||||
HttpResponse response = uploadFileWithRequiredFileForHttpResponse(petId, requiredFile, params);
|
||||
TypeReference typeRef = new TypeReference<ModelApiResponse>() {};
|
||||
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);
|
||||
}
|
||||
|
||||
public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File file, String additionalMetadata) throws IOException {
|
||||
public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File requiredFile, String additionalMetadata) throws IOException {
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
}// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
// create a map of path variables
|
||||
final Map<String, Object> uriVariables = new HashMap<String, Object>();
|
||||
@ -765,13 +765,13 @@ public class PetApi {
|
||||
return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.POST, genericUrl, content).execute();
|
||||
}
|
||||
|
||||
public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File file, Map<String, Object> params) throws IOException {
|
||||
public HttpResponse uploadFileWithRequiredFileForHttpResponse(Long petId, File requiredFile, Map<String, Object> params) throws IOException {
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
}// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new IllegalArgumentException("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
// create a map of path variables
|
||||
final Map<String, Object> uriVariables = new HashMap<String, Object>();
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -409,12 +409,12 @@ if (file != null)
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -422,9 +422,9 @@ if (file != null)
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -441,8 +441,8 @@ if (file != null)
|
||||
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -483,25 +483,25 @@ if (file != null)
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData();
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -509,9 +509,9 @@ if (file != null)
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -527,8 +527,8 @@ if (file != null)
|
||||
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -483,25 +483,25 @@ if (file != null)
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData();
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -509,9 +509,9 @@ if (file != null)
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -527,8 +527,8 @@ if (file != null)
|
||||
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -483,25 +483,25 @@ if (file != null)
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData();
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -509,9 +509,9 @@ if (file != null)
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -527,8 +527,8 @@ if (file != null)
|
||||
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -1066,14 +1066,14 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for uploadFileWithRequiredFile
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@ -1088,8 +1088,8 @@ public class PetApi {
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
@ -1120,20 +1120,20 @@ public class PetApi {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile(Async)");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, file, additionalMetadata, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
@ -1142,13 +1142,13 @@ public class PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
ApiResponse<ModelApiResponse> resp = uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata);
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
ApiResponse<ModelApiResponse> resp = uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
@ -1156,13 +1156,13 @@ public class PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, null, null);
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
@ -1171,13 +1171,13 @@ public class PetApi {
|
||||
* uploads an image (required) (asynchronously)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File file, String additionalMetadata, final ApiCallback<ModelApiResponse> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback<ModelApiResponse> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
@ -1198,7 +1198,7 @@ public class PetApi {
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -1066,14 +1066,14 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for uploadFileWithRequiredFile
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@ -1088,8 +1088,8 @@ public class PetApi {
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
@ -1120,20 +1120,20 @@ public class PetApi {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File file, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private com.squareup.okhttp.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile(Async)");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException("Missing the required parameter 'file' when calling uploadFileWithRequiredFile(Async)");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, file, additionalMetadata, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
@ -1142,13 +1142,13 @@ public class PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
ApiResponse<ModelApiResponse> resp = uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata);
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
ApiResponse<ModelApiResponse> resp = uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
|
||||
return resp.getData();
|
||||
}
|
||||
|
||||
@ -1156,13 +1156,13 @@ public class PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, null, null);
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
}
|
||||
@ -1171,13 +1171,13 @@ public class PetApi {
|
||||
* uploads an image (required) (asynchronously)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @return The request call
|
||||
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File file, String additionalMetadata, final ApiCallback<ModelApiResponse> callback) throws ApiException {
|
||||
public com.squareup.okhttp.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback<ModelApiResponse> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
@ -1198,7 +1198,7 @@ public class PetApi {
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, file, additionalMetadata, progressListener, progressRequestListener);
|
||||
com.squareup.okhttp.Call call = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, progressListener, progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
|
@ -348,7 +348,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -365,7 +365,7 @@ PetApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSupplier(
|
||||
|
||||
api.uploadFileWithRequiredFile()
|
||||
.petIdPath(petId)
|
||||
.fileMultiPart(file).execute(r -> r.prettyPeek());
|
||||
.requiredFileMultiPart(requiredFile).execute(r -> r.prettyPeek());
|
||||
```
|
||||
|
||||
### Parameters
|
||||
@ -373,7 +373,7 @@ api.uploadFileWithRequiredFile()
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -747,7 +747,7 @@ public class PetApi {
|
||||
*
|
||||
*
|
||||
* @see #petIdPath ID of pet to update (required)
|
||||
* @see #fileMultiPart file to upload (required)
|
||||
* @see #requiredFileMultiPart file to upload (required)
|
||||
* @see #additionalMetadataForm Additional data to pass to server (optional, default to null)
|
||||
* return ModelApiResponse
|
||||
*/
|
||||
@ -818,11 +818,11 @@ public class PetApi {
|
||||
/**
|
||||
* It will assume that the control name is file and the <content-type> is <application/octet-stream>
|
||||
* @see #reqSpec for customise
|
||||
* @param file (File) file to upload (required)
|
||||
* @param requiredFile (File) file to upload (required)
|
||||
* @return operation
|
||||
*/
|
||||
public UploadFileWithRequiredFileOper fileMultiPart(File file) {
|
||||
reqSpec.addMultiPart(file);
|
||||
public UploadFileWithRequiredFileOper requiredFileMultiPart(File requiredFile) {
|
||||
reqSpec.addMultiPart(requiredFile);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -387,12 +387,12 @@ if (file != null)
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return a {@code ModelApiResponse}
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -400,9 +400,9 @@ if (file != null)
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -418,8 +418,8 @@ if (file != null)
|
||||
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -360,12 +360,12 @@ public class PetApi {
|
||||
*
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param petId ID of pet to update
|
||||
* @param file file to upload
|
||||
* @param requiredFile file to upload
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @return ModelApiResponse
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws RestClientException {
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws RestClientException {
|
||||
Object postBody = new Object();
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -373,9 +373,9 @@ public class PetApi {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -389,8 +389,8 @@ public class PetApi {
|
||||
|
||||
if (additionalMetadata != null)
|
||||
formParams.add("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
formParams.add("file", new FileSystemResource(file));
|
||||
if (requiredFile != null)
|
||||
formParams.add("requiredFile", new FileSystemResource(requiredFile));
|
||||
|
||||
final String[] accepts = {
|
||||
"application/json"
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -360,12 +360,12 @@ public class PetApi {
|
||||
*
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param petId ID of pet to update
|
||||
* @param file file to upload
|
||||
* @param requiredFile file to upload
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @return ModelApiResponse
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws RestClientException {
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws RestClientException {
|
||||
Object postBody = new Object();
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -373,9 +373,9 @@ public class PetApi {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -389,8 +389,8 @@ public class PetApi {
|
||||
|
||||
if (additionalMetadata != null)
|
||||
formParams.add("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
formParams.add("file", new FileSystemResource(file));
|
||||
if (requiredFile != null)
|
||||
formParams.add("requiredFile", new FileSystemResource(requiredFile));
|
||||
|
||||
final String[] accepts = {
|
||||
"application/json"
|
||||
|
@ -227,7 +227,7 @@ public interface PetApi {
|
||||
* Sync method
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
*/
|
||||
@ -235,14 +235,14 @@ public interface PetApi {
|
||||
@retrofit.http.Multipart
|
||||
@POST("/fake/{petId}/uploadImageWithRequiredFile")
|
||||
ModelApiResponse uploadFileWithRequiredFile(
|
||||
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata
|
||||
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata
|
||||
);
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* Async method
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @param cb callback method
|
||||
*/
|
||||
@ -250,6 +250,6 @@ public interface PetApi {
|
||||
@retrofit.http.Multipart
|
||||
@POST("/fake/{petId}/uploadImageWithRequiredFile")
|
||||
void uploadFileWithRequiredFile(
|
||||
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback<ModelApiResponse> cb
|
||||
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback<ModelApiResponse> cb
|
||||
);
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -129,14 +129,14 @@ public interface PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return Call<ModelApiResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("fake/{petId}/uploadImageWithRequiredFile")
|
||||
F.Promise<Response<ModelApiResponse>> uploadFileWithRequiredFile(
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("requiredFile") MultipartBody.Part requiredFile, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -129,14 +129,14 @@ public interface PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return Call<ModelApiResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("fake/{petId}/uploadImageWithRequiredFile")
|
||||
CompletionStage<Response<ModelApiResponse>> uploadFileWithRequiredFile(
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("requiredFile") MultipartBody.Part requiredFile, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -126,14 +126,14 @@ public interface PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return Call<ModelApiResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("fake/{petId}/uploadImageWithRequiredFile")
|
||||
Call<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("requiredFile") MultipartBody.Part requiredFile, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -126,14 +126,14 @@ public interface PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return Observable<ModelApiResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("fake/{petId}/uploadImageWithRequiredFile")
|
||||
Observable<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("requiredFile") MultipartBody.Part requiredFile, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -127,14 +127,14 @@ public interface PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return Observable<ModelApiResponse>
|
||||
*/
|
||||
@retrofit2.http.Multipart
|
||||
@POST("fake/{petId}/uploadImageWithRequiredFile")
|
||||
Observable<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("requiredFile") MultipartBody.Part requiredFile, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
|
||||
);
|
||||
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
AsyncFile file = new AsyncFile(); // AsyncFile | file to upload
|
||||
AsyncFile requiredFile = new AsyncFile(); // AsyncFile | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **AsyncFile**| file to upload | [default to null]
|
||||
**requiredFile** | **AsyncFile**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -27,6 +27,6 @@ public interface PetApi {
|
||||
|
||||
void uploadFile(Long petId, String additionalMetadata, AsyncFile file, Handler<AsyncResult<ModelApiResponse>> handler);
|
||||
|
||||
void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> handler);
|
||||
void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> handler);
|
||||
|
||||
}
|
||||
|
@ -328,11 +328,11 @@ if (file != null) localVarFormParams.put("file", file);
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
Object localVarBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -341,9 +341,9 @@ if (file != null) localVarFormParams.put("file", file);
|
||||
return;
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile"));
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile"));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ if (file != null) localVarFormParams.put("file", file);
|
||||
// TODO: sending files within multipart/form-data is not supported yet (because of vertx web-client)
|
||||
Map<String, Object> localVarFormParams = new HashMap<>();
|
||||
if (additionalMetadata != null) localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null) localVarFormParams.put("file", file);
|
||||
if (requiredFile != null) localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
String[] localVarAccepts = { "application/json" };
|
||||
String[] localVarContentTypes = { "multipart/form-data" };
|
||||
|
@ -205,25 +205,25 @@ public class PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @param resultHandler Asynchronous result handler
|
||||
*/
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata, resultHandler);
|
||||
public void uploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata, Handler<AsyncResult<ModelApiResponse>> resultHandler) {
|
||||
delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, resultHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return Asynchronous result handler (RxJava Single)
|
||||
*/
|
||||
public Single<ModelApiResponse> rxUploadFileWithRequiredFile(Long petId, AsyncFile file, String additionalMetadata) {
|
||||
public Single<ModelApiResponse> rxUploadFileWithRequiredFile(Long petId, AsyncFile requiredFile, String additionalMetadata) {
|
||||
return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> {
|
||||
delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata, fut);
|
||||
delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, fut);
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
@ -360,12 +360,12 @@ public class PetApi {
|
||||
*
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param petId ID of pet to update
|
||||
* @param file file to upload
|
||||
* @param requiredFile file to upload
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @return ModelApiResponse
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public Mono<ModelApiResponse> uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws RestClientException {
|
||||
public Mono<ModelApiResponse> uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws RestClientException {
|
||||
Object postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@ -373,9 +373,9 @@ public class PetApi {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@ -389,8 +389,8 @@ public class PetApi {
|
||||
|
||||
if (additionalMetadata != null)
|
||||
formParams.add("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
formParams.add("file", new FileSystemResource(file));
|
||||
if (requiredFile != null)
|
||||
formParams.add("requiredFile", new FileSystemResource(requiredFile));
|
||||
|
||||
final String[] accepts = {
|
||||
"application/json"
|
||||
|
@ -438,7 +438,7 @@ Name | Type | Description | Notes
|
||||
[[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)
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata)
|
||||
> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $required_file, $additional_metadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -457,11 +457,11 @@ $apiInstance = new OpenAPI\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | ID of pet to update
|
||||
$file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
$required_file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server
|
||||
|
||||
try {
|
||||
$result = $apiInstance->uploadFileWithRequiredFile($pet_id, $file, $additional_metadata);
|
||||
$result = $apiInstance->uploadFileWithRequiredFile($pet_id, $required_file, $additional_metadata);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PetApi->uploadFileWithRequiredFile: ', $e->getMessage(), PHP_EOL;
|
||||
@ -474,7 +474,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to update |
|
||||
**file** | **\SplFileObject****\SplFileObject**| file to upload |
|
||||
**required_file** | **\SplFileObject****\SplFileObject**| file to upload |
|
||||
**additional_metadata** | **string**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -2180,16 +2180,16 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \OpenAPI\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \OpenAPI\Client\Model\ApiResponse
|
||||
*/
|
||||
public function uploadFileWithRequiredFile($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFile($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata);
|
||||
list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $required_file, $additional_metadata);
|
||||
return $response;
|
||||
}
|
||||
|
||||
@ -2199,16 +2199,16 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \OpenAPI\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of \OpenAPI\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata);
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata);
|
||||
|
||||
try {
|
||||
$options = $this->createHttpClientOption();
|
||||
@ -2295,15 +2295,15 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function uploadFileWithRequiredFileAsync($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFileAsync($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata)
|
||||
return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $required_file, $additional_metadata)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
@ -2317,16 +2317,16 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
$returnType = '\OpenAPI\Client\Model\ApiResponse';
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata);
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata);
|
||||
|
||||
return $this->client
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
@ -2369,13 +2369,13 @@ class PetApi
|
||||
* Create request for operation 'uploadFileWithRequiredFile'
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata = null)
|
||||
protected function uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
// verify the required parameter 'pet_id' is set
|
||||
if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) {
|
||||
@ -2383,10 +2383,10 @@ class PetApi
|
||||
'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'file' is set
|
||||
if ($file === null || (is_array($file) && count($file) === 0)) {
|
||||
// verify the required parameter 'required_file' is set
|
||||
if ($required_file === null || (is_array($required_file) && count($required_file) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $file when calling uploadFileWithRequiredFile'
|
||||
'Missing the required parameter $required_file when calling uploadFileWithRequiredFile'
|
||||
);
|
||||
}
|
||||
|
||||
@ -2412,9 +2412,9 @@ class PetApi
|
||||
$formParams['additionalMetadata'] = ObjectSerializer::toFormValue($additional_metadata);
|
||||
}
|
||||
// form params
|
||||
if ($file !== null) {
|
||||
if ($required_file !== null) {
|
||||
$multipart = true;
|
||||
$formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb');
|
||||
$formParams['requiredFile'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($required_file), 'rb');
|
||||
}
|
||||
// body params
|
||||
$_tempBody = null;
|
||||
|
@ -36,6 +36,7 @@ use \OpenAPI\Client\ObjectSerializer;
|
||||
* File Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Must be named `File` for test.
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
|
@ -33,7 +33,7 @@ namespace OpenAPI\Client;
|
||||
* FileTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description File
|
||||
* @description Must be named `File` for test.
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
|
@ -420,7 +420,7 @@ Name | Type | Description | Notes
|
||||
|
||||
|
||||
# **upload_file_with_required_file**
|
||||
> ApiResponse upload_file_with_required_file(pet_id, file, opts)
|
||||
> ApiResponse upload_file_with_required_file(pet_id, required_file, opts)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -436,14 +436,14 @@ end
|
||||
|
||||
api_instance = Petstore::PetApi.new
|
||||
pet_id = 56 # Integer | ID of pet to update
|
||||
file = File.new('/path/to/file') # File | file to upload
|
||||
required_file = File.new('/path/to/file') # File | file to upload
|
||||
opts = {
|
||||
additional_metadata: 'additional_metadata_example' # String | Additional data to pass to server
|
||||
}
|
||||
|
||||
begin
|
||||
#uploads an image (required)
|
||||
result = api_instance.upload_file_with_required_file(pet_id, file, opts)
|
||||
result = api_instance.upload_file_with_required_file(pet_id, required_file, opts)
|
||||
p result
|
||||
rescue Petstore::ApiError => e
|
||||
puts "Exception when calling PetApi->upload_file_with_required_file: #{e}"
|
||||
@ -455,7 +455,7 @@ end
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **Integer**| ID of pet to update |
|
||||
**file** | **File**| file to upload |
|
||||
**required_file** | **File**| file to upload |
|
||||
**additional_metadata** | **String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -440,22 +440,22 @@ module Petstore
|
||||
end
|
||||
# uploads an image (required)
|
||||
# @param pet_id ID of pet to update
|
||||
# @param file file to upload
|
||||
# @param required_file file to upload
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [String] :additional_metadata Additional data to pass to server
|
||||
# @return [ApiResponse]
|
||||
def upload_file_with_required_file(pet_id, file, opts = {})
|
||||
data, _status_code, _headers = upload_file_with_required_file_with_http_info(pet_id, file, opts)
|
||||
def upload_file_with_required_file(pet_id, required_file, opts = {})
|
||||
data, _status_code, _headers = upload_file_with_required_file_with_http_info(pet_id, required_file, opts)
|
||||
data
|
||||
end
|
||||
|
||||
# uploads an image (required)
|
||||
# @param pet_id ID of pet to update
|
||||
# @param file file to upload
|
||||
# @param required_file file to upload
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [String] :additional_metadata Additional data to pass to server
|
||||
# @return [Array<(ApiResponse, Fixnum, Hash)>] ApiResponse data, response status code and response headers
|
||||
def upload_file_with_required_file_with_http_info(pet_id, file, opts = {})
|
||||
def upload_file_with_required_file_with_http_info(pet_id, required_file, opts = {})
|
||||
if @api_client.config.debugging
|
||||
@api_client.config.logger.debug 'Calling API: PetApi.upload_file_with_required_file ...'
|
||||
end
|
||||
@ -463,9 +463,9 @@ module Petstore
|
||||
if @api_client.config.client_side_validation && pet_id.nil?
|
||||
fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.upload_file_with_required_file"
|
||||
end
|
||||
# verify the required parameter 'file' is set
|
||||
if @api_client.config.client_side_validation && file.nil?
|
||||
fail ArgumentError, "Missing the required parameter 'file' when calling PetApi.upload_file_with_required_file"
|
||||
# verify the required parameter 'required_file' is set
|
||||
if @api_client.config.client_side_validation && required_file.nil?
|
||||
fail ArgumentError, "Missing the required parameter 'required_file' when calling PetApi.upload_file_with_required_file"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/fake/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', pet_id.to_s)
|
||||
@ -482,7 +482,7 @@ module Petstore
|
||||
|
||||
# form parameters
|
||||
form_params = {}
|
||||
form_params['file'] = file
|
||||
form_params['requiredFile'] = required_file
|
||||
form_params['additionalMetadata'] = opts[:'additional_metadata'] if !opts[:'additional_metadata'].nil?
|
||||
|
||||
# http body (model)
|
||||
|
@ -13,6 +13,7 @@ OpenAPI Generator version: 3.1.1-SNAPSHOT
|
||||
require 'date'
|
||||
|
||||
module Petstore
|
||||
# Must be named `File` for test.
|
||||
class File
|
||||
# Test capitalization
|
||||
attr_accessor :source_uri
|
||||
|
@ -438,7 +438,7 @@ Name | Type | Description | Notes
|
||||
[[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)
|
||||
|
||||
# **uploadFileWithRequiredFile**
|
||||
> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata)
|
||||
> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $required_file, $additional_metadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@ -457,11 +457,11 @@ $apiInstance = new OpenAPI\Client\Api\PetApi(
|
||||
$config
|
||||
);
|
||||
$pet_id = 56; // int | ID of pet to update
|
||||
$file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
$required_file = "/path/to/file.txt"; // \SplFileObject | file to upload
|
||||
$additional_metadata = 'additional_metadata_example'; // string | Additional data to pass to server
|
||||
|
||||
try {
|
||||
$result = $apiInstance->uploadFileWithRequiredFile($pet_id, $file, $additional_metadata);
|
||||
$result = $apiInstance->uploadFileWithRequiredFile($pet_id, $required_file, $additional_metadata);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling PetApi->uploadFileWithRequiredFile: ', $e->getMessage(), PHP_EOL;
|
||||
@ -474,7 +474,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**pet_id** | **int**| ID of pet to update |
|
||||
**file** | **\SplFileObject****\SplFileObject**| file to upload |
|
||||
**required_file** | **\SplFileObject****\SplFileObject**| file to upload |
|
||||
**additional_metadata** | **string**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
@ -2180,16 +2180,16 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \OpenAPI\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \OpenAPI\Client\Model\ApiResponse
|
||||
*/
|
||||
public function uploadFileWithRequiredFile($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFile($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata);
|
||||
list($response) = $this->uploadFileWithRequiredFileWithHttpInfo($pet_id, $required_file, $additional_metadata);
|
||||
return $response;
|
||||
}
|
||||
|
||||
@ -2199,16 +2199,16 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \OpenAPI\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of \OpenAPI\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFileWithHttpInfo($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata);
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata);
|
||||
|
||||
try {
|
||||
$options = $this->createHttpClientOption();
|
||||
@ -2295,15 +2295,15 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function uploadFileWithRequiredFileAsync($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFileAsync($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata)
|
||||
return $this->uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $required_file, $additional_metadata)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
@ -2317,16 +2317,16 @@ class PetApi
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $file, $additional_metadata = null)
|
||||
public function uploadFileWithRequiredFileAsyncWithHttpInfo($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
$returnType = '\OpenAPI\Client\Model\ApiResponse';
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata);
|
||||
$request = $this->uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata);
|
||||
|
||||
return $this->client
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
@ -2369,13 +2369,13 @@ class PetApi
|
||||
* Create request for operation 'uploadFileWithRequiredFile'
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param \SplFileObject $file file to upload (required)
|
||||
* @param \SplFileObject $required_file file to upload (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function uploadFileWithRequiredFileRequest($pet_id, $file, $additional_metadata = null)
|
||||
protected function uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata = null)
|
||||
{
|
||||
// verify the required parameter 'pet_id' is set
|
||||
if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) {
|
||||
@ -2383,10 +2383,10 @@ class PetApi
|
||||
'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile'
|
||||
);
|
||||
}
|
||||
// verify the required parameter 'file' is set
|
||||
if ($file === null || (is_array($file) && count($file) === 0)) {
|
||||
// verify the required parameter 'required_file' is set
|
||||
if ($required_file === null || (is_array($required_file) && count($required_file) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $file when calling uploadFileWithRequiredFile'
|
||||
'Missing the required parameter $required_file when calling uploadFileWithRequiredFile'
|
||||
);
|
||||
}
|
||||
|
||||
@ -2412,9 +2412,9 @@ class PetApi
|
||||
$formParams['additionalMetadata'] = ObjectSerializer::toFormValue($additional_metadata);
|
||||
}
|
||||
// form params
|
||||
if ($file !== null) {
|
||||
if ($required_file !== null) {
|
||||
$multipart = true;
|
||||
$formParams['file'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($file), 'rb');
|
||||
$formParams['requiredFile'] = \GuzzleHttp\Psr7\try_fopen(ObjectSerializer::toFormValue($required_file), 'rb');
|
||||
}
|
||||
// body params
|
||||
$_tempBody = null;
|
||||
|
@ -150,6 +150,6 @@ public interface PetApi {
|
||||
@ApiOperation(value = "uploads an image (required)", tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
public ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "file" ) Attachment fileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata);
|
||||
public ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") Long petId, @Multipart(value = "requiredFile" ) Attachment requiredFileDetail, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class PetApiServiceImpl implements PetApi {
|
||||
* uploads an image (required)
|
||||
*
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, Attachment fileDetail, String additionalMetadata) {
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, Attachment requiredFileDetail, String additionalMetadata) {
|
||||
// TODO: Implement...
|
||||
|
||||
return null;
|
||||
|
@ -221,9 +221,9 @@ public class PetApiTest {
|
||||
@Test
|
||||
public void uploadFileWithRequiredFileTest() {
|
||||
Long petId = null;
|
||||
org.apache.cxf.jaxrs.ext.multipart.Attachment file = null;
|
||||
org.apache.cxf.jaxrs.ext.multipart.Attachment requiredFile = null;
|
||||
String additionalMetadata = null;
|
||||
//ModelApiResponse response = api.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
//ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
//assertNotNull(response);
|
||||
// TODO: test validations
|
||||
|
||||
|
@ -239,11 +239,11 @@ public class FakeApi {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
|
||||
,
|
||||
@FormDataParam("file") InputStream fileInputStream,
|
||||
@FormDataParam("file") FormDataContentDisposition fileDetail
|
||||
@FormDataParam("requiredFile") InputStream requiredFileInputStream,
|
||||
@FormDataParam("requiredFile") FormDataContentDisposition requiredFileDetail
|
||||
,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext);
|
||||
return delegate.uploadFileWithRequiredFile(petId,requiredFileInputStream, requiredFileDetail,additionalMetadata,securityContext);
|
||||
}
|
||||
}
|
||||
|
@ -37,5 +37,5 @@ public abstract class FakeApiService {
|
||||
public abstract Response testEnumParameters(List<String> enumHeaderStringArray,String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List<String> enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response testInlineAdditionalProperties(Map<String, String> requestBody,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class FakeApiServiceImpl extends FakeApiService {
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
@Override
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException {
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
|
@ -128,6 +128,6 @@ public interface FakeApi {
|
||||
}, tags={ "pet" })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream,
|
||||
@FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata);
|
||||
ModelApiResponse uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,
|
||||
@FormParam(value = "requiredFile") Attachment requiredFileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata);
|
||||
}
|
||||
|
@ -1074,12 +1074,12 @@ paths:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
requiredFile:
|
||||
description: file to upload
|
||||
format: binary
|
||||
type: string
|
||||
required:
|
||||
- file
|
||||
- requiredFile
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
@ -1577,6 +1577,7 @@ components:
|
||||
$ref: '#/components/schemas/Animal'
|
||||
type: array
|
||||
File:
|
||||
description: Must be named `File` for test.
|
||||
example:
|
||||
sourceURI: sourceURI
|
||||
properties:
|
||||
|
@ -162,8 +162,8 @@ public class FakeApi {
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class)
|
||||
})
|
||||
public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "file") InputStream fileInputStream,
|
||||
@FormParam(value = "file") Attachment fileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata) {
|
||||
public Response uploadFileWithRequiredFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId, @FormParam(value = "requiredFile") InputStream requiredFileInputStream,
|
||||
@FormParam(value = "requiredFile") Attachment requiredFileDetail,@FormParam(value = "additionalMetadata") String additionalMetadata) {
|
||||
return Response.ok().entity("magic!").build();
|
||||
}
|
||||
}
|
||||
|
@ -1074,12 +1074,12 @@ paths:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
requiredFile:
|
||||
description: file to upload
|
||||
format: binary
|
||||
type: string
|
||||
required:
|
||||
- file
|
||||
- requiredFile
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
@ -1577,6 +1577,7 @@ components:
|
||||
$ref: '#/components/schemas/Animal'
|
||||
type: array
|
||||
File:
|
||||
description: Must be named `File` for test.
|
||||
example:
|
||||
sourceURI: sourceURI
|
||||
properties:
|
||||
|
@ -203,8 +203,8 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
public Response uploadFileWithRequiredFile(
|
||||
@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId,
|
||||
@FormDataParam("file") InputStream inputStream,
|
||||
@FormDataParam("file") FormDataContentDisposition fileDetail,
|
||||
@FormDataParam("requiredFile") InputStream inputStream,
|
||||
@FormDataParam("requiredFile") FormDataContentDisposition fileDetail,
|
||||
@FormDataParam("additionalMetadata") String additionalMetadata,
|
||||
@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
|
@ -38,6 +38,6 @@ public abstract class PetApiService {
|
||||
throws NotFoundException;
|
||||
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext)
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class PetApiServiceImpl extends PetApiService {
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
@Override
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext)
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail, String additionalMetadata, SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
|
@ -226,8 +226,8 @@ public class FakeApi {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
public Response uploadFileWithRequiredFile(
|
||||
@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId,
|
||||
@FormDataParam("file") InputStream inputStream,
|
||||
@FormDataParam("file") FormDataContentDisposition fileDetail,
|
||||
@FormDataParam("requiredFile") InputStream inputStream,
|
||||
@FormDataParam("requiredFile") FormDataContentDisposition fileDetail,
|
||||
@FormDataParam("additionalMetadata") String additionalMetadata,
|
||||
@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
|
@ -50,6 +50,6 @@ public abstract class FakeApiService {
|
||||
throws NotFoundException;
|
||||
public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext)
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext)
|
||||
throws NotFoundException;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ public class FakeApiServiceImpl extends FakeApiService {
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
@Override
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext)
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail, String additionalMetadata, SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
|
@ -222,11 +222,11 @@ public class PetApi {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
|
||||
,
|
||||
@FormDataParam("file") InputStream fileInputStream,
|
||||
@FormDataParam("file") FormDataContentDisposition fileDetail
|
||||
@FormDataParam("requiredFile") InputStream requiredFileInputStream,
|
||||
@FormDataParam("requiredFile") FormDataContentDisposition requiredFileDetail
|
||||
,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext);
|
||||
return delegate.uploadFileWithRequiredFile(petId,requiredFileInputStream, requiredFileDetail,additionalMetadata,securityContext);
|
||||
}
|
||||
}
|
||||
|
@ -27,5 +27,5 @@ public abstract class PetApiService {
|
||||
public abstract Response updatePet(Pet pet,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response updatePetWithForm(Long petId,String name,String status,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response uploadFile(Long petId,String additionalMetadata,InputStream fileInputStream, FormDataContentDisposition fileDetail,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class PetApiServiceImpl extends PetApiService {
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
@Override
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException {
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
|
@ -238,11 +238,11 @@ public class FakeApi {
|
||||
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
public Response uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathParam("petId") Long petId
|
||||
,
|
||||
@FormDataParam("file") InputStream fileInputStream,
|
||||
@FormDataParam("file") FormDataContentDisposition fileDetail
|
||||
@FormDataParam("requiredFile") InputStream requiredFileInputStream,
|
||||
@FormDataParam("requiredFile") FormDataContentDisposition requiredFileDetail
|
||||
,@ApiParam(value = "Additional data to pass to server", defaultValue="null")@FormDataParam("additionalMetadata") String additionalMetadata
|
||||
,@Context SecurityContext securityContext)
|
||||
throws NotFoundException {
|
||||
return delegate.uploadFileWithRequiredFile(petId,fileInputStream, fileDetail,additionalMetadata,securityContext);
|
||||
return delegate.uploadFileWithRequiredFile(petId,requiredFileInputStream, requiredFileDetail,additionalMetadata,securityContext);
|
||||
}
|
||||
}
|
||||
|
@ -36,5 +36,5 @@ public abstract class FakeApiService {
|
||||
public abstract Response testEnumParameters(List<String> enumHeaderStringArray,String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List<String> enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response testInlineAdditionalProperties(Map<String, String> requestBody,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response testJsonFormData(String param,String param2,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream fileInputStream, FormDataContentDisposition fileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException;
|
||||
public abstract Response uploadFileWithRequiredFile(Long petId,InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail,String additionalMetadata,SecurityContext securityContext) throws NotFoundException;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ public class FakeApiServiceImpl extends FakeApiService {
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
@Override
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream fileInputStream, FormDataContentDisposition fileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException {
|
||||
public Response uploadFileWithRequiredFile(Long petId, InputStream requiredFileInputStream, FormDataContentDisposition requiredFileDetail, String additionalMetadata, SecurityContext securityContext) throws NotFoundException {
|
||||
// do some magic!
|
||||
return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
default CompletableFuture<ResponseEntity<ModelApiResponse>> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
default CompletableFuture<ResponseEntity<ModelApiResponse>> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
return CompletableFuture.supplyAsync(()-> {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
@ -233,7 +233,7 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
@ -152,6 +152,6 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata);
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata);
|
||||
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class FakeApiController implements FakeApi {
|
||||
|
||||
}
|
||||
|
||||
public ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
public ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}");
|
||||
|
@ -152,6 +152,6 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata);
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata);
|
||||
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class FakeApiController implements FakeApi {
|
||||
|
||||
}
|
||||
|
||||
public ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
public ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
ApiUtil.setExampleResponse(request, "application/json", "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}");
|
||||
|
@ -178,8 +178,8 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
return getDelegate().uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
return getDelegate().uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ public interface FakeApiDelegate {
|
||||
* @see FakeApi#uploadFileWithRequiredFile
|
||||
*/
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile( Long petId,
|
||||
MultipartFile file,
|
||||
MultipartFile requiredFile,
|
||||
String additionalMetadata) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
@ -152,6 +152,6 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata);
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata);
|
||||
|
||||
}
|
||||
|
@ -82,8 +82,8 @@ public class FakeApiController implements FakeApi {
|
||||
return delegate.testJsonFormData(param, param2);
|
||||
}
|
||||
|
||||
public ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
return delegate.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
public ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
return delegate.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public interface FakeApiDelegate {
|
||||
* @see FakeApi#uploadFileWithRequiredFile
|
||||
*/
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile( Long petId,
|
||||
MultipartFile file,
|
||||
MultipartFile requiredFile,
|
||||
String additionalMetadata);
|
||||
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
@ -237,7 +237,7 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
default ResponseEntity<Mono<ModelApiResponse>> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, ServerWebExchange exchange) {
|
||||
default ResponseEntity<Mono<ModelApiResponse>> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata, ServerWebExchange exchange) {
|
||||
Mono<ModelApiResponse> result = Mono.empty();
|
||||
for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
@ -1129,12 +1129,12 @@ paths:
|
||||
additionalMetadata:
|
||||
description: Additional data to pass to server
|
||||
type: string
|
||||
file:
|
||||
requiredFile:
|
||||
description: file to upload
|
||||
format: binary
|
||||
type: string
|
||||
required:
|
||||
- file
|
||||
- requiredFile
|
||||
required: true
|
||||
responses:
|
||||
200:
|
||||
@ -1634,6 +1634,7 @@ components:
|
||||
$ref: '#/components/schemas/Animal'
|
||||
type: array
|
||||
File:
|
||||
description: Must be named `File` for test.
|
||||
example:
|
||||
sourceURI: sourceURI
|
||||
properties:
|
||||
|
@ -233,7 +233,7 @@ public interface FakeApi {
|
||||
produces = { "application/json" },
|
||||
consumes = { "multipart/form-data" },
|
||||
method = RequestMethod.POST)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile requiredFile,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user