diff --git a/modules/openapi-generator/src/main/resources/go/api.mustache b/modules/openapi-generator/src/main/resources/go/api.mustache
index a8c7da4a34c..f028d8d8b2d 100644
--- a/modules/openapi-generator/src/main/resources/go/api.mustache
+++ b/modules/openapi-generator/src/main/resources/go/api.mustache
@@ -20,15 +20,15 @@ var (
type {{classname}}Service service
{{#operation}}
-/*
-{{{classname}}}Service{{#summary}} {{.}}{{/summary}}
+/*
+{{{classname}}}Service{{#summary}} {{{.}}}{{/summary}}
{{#notes}}
{{notes}}
{{/notes}}
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
{{#allParams}}
{{#required}}
- * @param {{paramName}}{{#description}} {{.}}{{/description}}
+ * @param {{paramName}}{{#description}} {{{.}}}{{/description}}
{{/required}}
{{/allParams}}
{{#hasOptionalParams}}
@@ -243,8 +243,12 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
} else {
key = auth.Key
}
- {{#isKeyInHeader}}localVarHeaderParams["{{keyParamName}}"] = key{{/isKeyInHeader}}
- {{#isKeyInQuery}}localVarQueryParams.Add("{{keyParamName}}", key){{/isKeyInQuery}}
+ {{#isKeyInHeader}}
+ localVarHeaderParams["{{keyParamName}}"] = key
+ {{/isKeyInHeader}}
+ {{#isKeyInQuery}}
+ localVarQueryParams.Add("{{keyParamName}}", key)
+ {{/isKeyInQuery}}
}
}
@@ -270,7 +274,7 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return {{#returnType}}localVarReturnValue, {{/returnType}}localVarHttpResponse, err
}
}
diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
index 53a15cad752..9a665bd7575 100644
--- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
+++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
@@ -272,43 +272,6 @@ paths:
- petstore_auth:
- 'write:pets'
- 'read:pets'
- '/pet/{petId}/uploadImageWithRequiredFile':
- post:
- tags:
- - pet
- summary: uploads an image
- description: ''
- operationId: uploadFileWithRequiredFile
- consumes:
- - multipart/form-data
- produces:
- - application/json
- parameters:
- - name: petId
- in: path
- description: ID of pet to update
- required: true
- type: integer
- format: int64
- - name: additionalMetadata
- in: formData
- description: Additional data to pass to server
- required: false
- type: string
- - name: file
- in: formData
- description: file to upload
- required: true
- type: file
- responses:
- '200':
- description: successful operation
- schema:
- $ref: '#/definitions/ApiResponse'
- security:
- - petstore_auth:
- - 'write:pets'
- - 'read:pets'
/store/inventory:
get:
tags:
@@ -984,6 +947,43 @@ paths:
description: successful operation
schema:
$ref: '#/definitions/Client'
+ '/fake/{petId}/uploadImageWithRequiredFile':
+ post:
+ tags:
+ - pet
+ summary: uploads an image (required)
+ description: ''
+ operationId: uploadFileWithRequiredFile
+ consumes:
+ - multipart/form-data
+ produces:
+ - application/json
+ parameters:
+ - name: petId
+ in: path
+ description: ID of pet to update
+ required: true
+ type: integer
+ format: int64
+ - name: additionalMetadata
+ in: formData
+ description: Additional data to pass to server
+ required: false
+ type: string
+ - name: file
+ in: formData
+ description: file to upload
+ required: true
+ type: file
+ responses:
+ '200':
+ description: successful operation
+ schema:
+ $ref: '#/definitions/ApiResponse'
+ security:
+ - petstore_auth:
+ - 'write:pets'
+ - 'read:pets'
securityDefinitions:
petstore_auth:
type: oauth2
diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
index 3989ad4f0b9..ff9172b3122 100644
--- a/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
@@ -67,6 +67,7 @@ paths:
description: Status values that need to be considered for filter
required: true
style: form
+ explode: false
schema:
type: array
items:
@@ -111,6 +112,7 @@ paths:
description: Tags to filter by
required: true
style: form
+ explode: false
schema:
type: array
items:
@@ -265,47 +267,6 @@ paths:
description: file to upload
type: string
format: binary
- '/pet/{petId}/uploadImageWithRequiredFile':
- post:
- tags:
- - pet
- summary: uploads an image
- description: ''
- operationId: uploadFileWithRequiredFile
- parameters:
- - name: petId
- in: path
- description: ID of pet to update
- required: true
- schema:
- type: integer
- format: int64
- responses:
- '200':
- description: successful operation
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- security:
- - petstore_auth:
- - 'write:pets'
- - 'read:pets'
- requestBody:
- content:
- multipart/form-data:
- schema:
- type: object
- properties:
- additionalMetadata:
- description: Additional data to pass to server
- type: string
- file:
- description: file to upload
- type: string
- format: binary
- required:
- - file
/store/inventory:
get:
tags:
@@ -612,6 +573,7 @@ paths:
parameters:
- name: enum_header_string_array
in: header
+ explode: true
description: Header parameter enum test (string array)
schema:
type: array
@@ -950,6 +912,47 @@ paths:
$ref: '#/components/schemas/Client'
requestBody:
$ref: '#/components/requestBodies/Client'
+ '/fake/{petId}/uploadImageWithRequiredFile':
+ post:
+ tags:
+ - pet
+ summary: uploads an image (required)
+ description: ''
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - name: petId
+ in: path
+ description: ID of pet to update
+ required: true
+ schema:
+ type: integer
+ format: int64
+ responses:
+ '200':
+ description: successful operation
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ security:
+ - petstore_auth:
+ - 'write:pets'
+ - 'read:pets'
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ type: object
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ type: string
+ format: binary
+ required:
+ - file
components:
requestBodies:
UserArray:
diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION
index 82602aa4190..0628777500b 100644
--- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION
+++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.3-SNAPSHOT
\ No newline at end of file
+3.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/go/go-petstore-withXml/README.md b/samples/client/petstore/go/go-petstore-withXml/README.md
index dfb07bd7fdf..55cb462ef06 100644
--- a/samples/client/petstore/go/go-petstore-withXml/README.md
+++ b/samples/client/petstore/go/go-petstore-withXml/README.md
@@ -50,6 +50,7 @@ Class | Method | HTTP request | Description
*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet
*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status
*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID
@@ -97,6 +98,7 @@ Class | Method | HTTP request | Description
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Return](docs/Return.md)
- [SpecialModelName](docs/SpecialModelName.md)
+ - [StringBooleanMap](docs/StringBooleanMap.md)
- [Tag](docs/Tag.md)
- [User](docs/User.md)
diff --git a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml
index c5c2dfaffa7..1ac89ea205d 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml
+++ b/samples/client/petstore/go/go-petstore-withXml/api/openapi.yaml
@@ -973,6 +973,46 @@ paths:
summary: To test special tags
tags:
- $another-fake?
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - file
+ required: true
+ responses:
+ 200:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
components:
schemas:
Category:
@@ -1276,14 +1316,18 @@ components:
type: array
type: object
OuterComposite:
- example: {}
+ example:
+ my_string: my_string
+ my_number: 0.80082819046101150206595775671303272247314453125
+ my_boolean: true
properties:
my_number:
- $ref: '#/components/schemas/OuterNumber'
+ type: number
my_string:
- $ref: '#/components/schemas/OuterString'
+ type: string
my_boolean:
- $ref: '#/components/schemas/OuterBoolean'
+ type: boolean
+ x-codegen-body-parameter-name: boolean_post_body
type: object
format_test:
properties:
@@ -1381,6 +1425,10 @@ components:
required:
- className
type: object
+ StringBooleanMap:
+ additionalProperties:
+ type: boolean
+ type: object
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
@@ -1403,6 +1451,12 @@ components:
- lower
type: string
type: object
+ direct_map:
+ additionalProperties:
+ type: boolean
+ type: object
+ indirect_map:
+ $ref: '#/components/schemas/StringBooleanMap'
type: object
Tag:
example:
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
index 12c169016a2..b9676e5e8bc 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_another_fake.go
@@ -24,7 +24,7 @@ var (
type AnotherFakeApiService service
-/*
+/*
AnotherFakeApiService To test special tags
To test special tags
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -85,7 +85,7 @@ func (a *AnotherFakeApiService) TestSpecialTags(ctx context.Context, client Clie
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake.go b/samples/client/petstore/go/go-petstore-withXml/api_fake.go
index 271a39f3613..4fdbe1693e4 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_fake.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_fake.go
@@ -26,7 +26,7 @@ var (
type FakeApiService service
-/*
+/*
FakeApiService
Test serialization of outer boolean types
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -96,7 +96,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -122,7 +122,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
Test serialization of object with outer number type
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -196,7 +196,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -222,7 +222,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
Test serialization of outer number types
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -292,7 +292,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -318,7 +318,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
Test serialization of outer string types
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -388,7 +388,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -414,7 +414,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param query
@@ -482,8 +482,8 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
return localVarHttpResponse, nil
}
-/*
-FakeApiService To test \"client\" model
+/*
+FakeApiService To test \"client\" model
To test \"client\" model
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param client client model
@@ -543,7 +543,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -569,7 +569,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -719,7 +719,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
return localVarHttpResponse, nil
}
-/*
+/*
FakeApiService To test enum parameters
To test enum parameters
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -828,7 +828,7 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona
return localVarHttpResponse, nil
}
-/*
+/*
FakeApiService test inline additionalProperties
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param requestBody request body
@@ -894,7 +894,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, req
return localVarHttpResponse, nil
}
-/*
+/*
FakeApiService test json serialization of form data
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param param field1
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
index 13bc70f0625..78a0effb2b0 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_fake_classname_tags123.go
@@ -24,7 +24,7 @@ var (
type FakeClassnameTags123ApiService service
-/*
+/*
FakeClassnameTags123ApiService To test class name in snake case
To test class name in snake case
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -75,7 +75,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
} else {
key = auth.Key
}
-
localVarQueryParams.Add("api_key_query", key)
}
}
@@ -99,7 +98,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_pet.go b/samples/client/petstore/go/go-petstore-withXml/api_pet.go
index 37db3a5b353..9c933feeb54 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_pet.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_pet.go
@@ -27,7 +27,7 @@ var (
type PetApiService service
-/*
+/*
PetApiService Add a new pet to the store
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param pet Pet object that needs to be added to the store
@@ -93,7 +93,7 @@ func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, er
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService Deletes a pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId Pet id to delete
@@ -168,7 +168,7 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOpti
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService Finds Pets by status
Multiple status values can be provided with comma separated strings
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -228,7 +228,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -254,7 +254,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
PetApiService Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -314,7 +314,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -340,7 +340,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
PetApiService Find pet by ID
Returns a single pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -391,7 +391,6 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
key = auth.Key
}
localVarHeaderParams["api_key"] = key
-
}
}
@@ -414,7 +413,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -440,7 +439,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
PetApiService Update an existing pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param pet Pet object that needs to be added to the store
@@ -506,7 +505,7 @@ func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response,
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService Updates a pet in the store with form data
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet that needs to be updated
@@ -586,7 +585,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, loca
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService uploads an image
* @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
@@ -671,7 +670,110 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+ }
+
+ if localVarHttpResponse.StatusCode >= 300 {
+ newErr := GenericOpenAPIError{
+ body: localVarBody,
+ error: localVarHttpResponse.Status,
+ }
+ if localVarHttpResponse.StatusCode == 200 {
+ var v ApiResponse
+ err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err != nil {
+ newErr.error = err.Error()
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ newErr.model = v
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+ return localVarReturnValue, localVarHttpResponse, newErr
+ }
+
+ return localVarReturnValue, localVarHttpResponse, nil
+}
+
+/*
+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 optional nil or *UploadFileWithRequiredFileOpts - Optional Parameters:
+ * @param "AdditionalMetadata" (optional.String) - Additional data to pass to server
+@return ApiResponse
+*/
+
+type UploadFileWithRequiredFileOpts struct {
+ AdditionalMetadata optional.String
+}
+
+func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, file *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) {
+ var (
+ localVarHttpMethod = strings.ToUpper("Post")
+ localVarPostBody interface{}
+ localVarFileName string
+ localVarFileBytes []byte
+ localVarReturnValue ApiResponse
+ )
+
+ // create path and map variables
+ localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile"
+ localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1)
+
+ localVarHeaderParams := make(map[string]string)
+ localVarQueryParams := url.Values{}
+ localVarFormParams := url.Values{}
+
+ // to determine the Content-Type header
+ localVarHttpContentTypes := []string{"multipart/form-data"}
+
+ // set Content-Type header
+ localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
+ if localVarHttpContentType != "" {
+ localVarHeaderParams["Content-Type"] = localVarHttpContentType
+ }
+
+ // to determine the Accept header
+ localVarHttpHeaderAccepts := []string{"application/json"}
+
+ // set Accept header
+ localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
+ if localVarHttpHeaderAccept != "" {
+ localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
+ }
+ if localVarOptionals != nil && localVarOptionals.AdditionalMetadata.IsSet() {
+ localVarFormParams.Add("additionalMetadata", parameterToString(localVarOptionals.AdditionalMetadata.Value(), ""))
+ }
+ localVarFile := file
+ 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)
+ if err != nil {
+ return localVarReturnValue, nil, err
+ }
+
+ localVarHttpResponse, err := a.client.callAPI(r)
+ if err != nil || localVarHttpResponse == nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
+ localVarHttpResponse.Body.Close()
+ if err != nil {
+ return localVarReturnValue, localVarHttpResponse, err
+ }
+
+ if localVarHttpResponse.StatusCode < 300 {
+ // If we succeed, return the data, otherwise pass on to decode error.
+ err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_store.go b/samples/client/petstore/go/go-petstore-withXml/api_store.go
index fd25fa94803..e628e134281 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_store.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_store.go
@@ -25,7 +25,7 @@ var (
type StoreApiService service
-/*
+/*
StoreApiService Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -91,7 +91,7 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*htt
return localVarHttpResponse, nil
}
-/*
+/*
StoreApiService Returns pet inventories by status
Returns a map of status codes to quantities
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -140,7 +140,6 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
key = auth.Key
}
localVarHeaderParams["api_key"] = key
-
}
}
@@ -163,7 +162,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -189,7 +188,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
StoreApiService Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -255,7 +254,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -281,7 +280,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
StoreApiService Place an order for a pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param order order placed for purchasing the pet
@@ -341,7 +340,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore-withXml/api_user.go b/samples/client/petstore/go/go-petstore-withXml/api_user.go
index 95350c677b1..c24eeacc702 100644
--- a/samples/client/petstore/go/go-petstore-withXml/api_user.go
+++ b/samples/client/petstore/go/go-petstore-withXml/api_user.go
@@ -25,7 +25,7 @@ var (
type UserApiService service
-/*
+/*
UserApiService Create user
This can only be done by the logged in user.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -92,7 +92,7 @@ func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Respo
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Creates list of users with given input array
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param user List of user object
@@ -158,7 +158,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Creates list of users with given input array
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param user List of user object
@@ -224,7 +224,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Delete user
This can only be done by the logged in user.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -290,7 +290,7 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Get user by user name
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The name that needs to be fetched. Use user1 for testing.
@@ -349,7 +349,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -375,7 +375,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Logs user into the system
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The user name for login
@@ -436,7 +436,7 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -462,7 +462,7 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Logs out current logged in user session
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
*/
@@ -525,7 +525,7 @@ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error)
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Updated user
This can only be done by the logged in user.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md
index 3f546994fd4..fc266d17df9 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/MapTest.md
@@ -5,6 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
**MapOfEnumString** | **map[string]string** | | [optional]
+**DirectMap** | **map[string]bool** | | [optional]
+**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md
index 9a78c747da0..327cc1739cd 100644
--- a/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/PetApi.md
@@ -12,6 +12,7 @@ Method | HTTP request | Description
[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data
[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image
+[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
# **AddPet**
@@ -257,3 +258,40 @@ 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)
+uploads an image (required)
+
+### Required Parameters
+
+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 |
+ **optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters
+
+### Optional Parameters
+Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+
+
+ **additionalMetadata** | **optional.String**| Additional data to pass to server |
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+[[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)
+
diff --git a/samples/client/petstore/go/go-petstore-withXml/docs/StringBooleanMap.md b/samples/client/petstore/go/go-petstore-withXml/docs/StringBooleanMap.md
new file mode 100644
index 00000000000..7abf11ec68b
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/docs/StringBooleanMap.md
@@ -0,0 +1,9 @@
+# StringBooleanMap
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_map_test.go b/samples/client/petstore/go/go-petstore-withXml/model_map_test.go
index 8e7db987209..d8b5f96c423 100644
--- a/samples/client/petstore/go/go-petstore-withXml/model_map_test.go
+++ b/samples/client/petstore/go/go-petstore-withXml/model_map_test.go
@@ -12,4 +12,6 @@ package petstore
type MapTest struct {
MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty" xml:"map_map_of_string"`
MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty" xml:"map_of_enum_string"`
+ DirectMap map[string]bool `json:"direct_map,omitempty" xml:"direct_map"`
+ IndirectMap StringBooleanMap `json:"indirect_map,omitempty" xml:"indirect_map"`
}
diff --git a/samples/client/petstore/go/go-petstore-withXml/model_string_boolean_map.go b/samples/client/petstore/go/go-petstore-withXml/model_string_boolean_map.go
new file mode 100644
index 00000000000..7cc08c7e895
--- /dev/null
+++ b/samples/client/petstore/go/go-petstore-withXml/model_string_boolean_map.go
@@ -0,0 +1,13 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * API version: 1.0.0
+ * Generated by: OpenAPI Generator (https://openapi-generator.tech)
+ */
+
+package petstore
+
+type StringBooleanMap struct {
+}
diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
index 282895a8f8f..0628777500b 100644
--- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-3.0.3
\ No newline at end of file
+3.1.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/go/go-petstore/README.md b/samples/client/petstore/go/go-petstore/README.md
index 2f44cf6ab74..55cb462ef06 100644
--- a/samples/client/petstore/go/go-petstore/README.md
+++ b/samples/client/petstore/go/go-petstore/README.md
@@ -50,7 +50,7 @@ Class | Method | HTTP request | Description
*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **Put** /pet | Update an existing pet
*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **Post** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **Post** /pet/{petId}/uploadImage | uploads an image
-*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **Delete** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **Get** /store/inventory | Returns pet inventories by status
*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **Get** /store/order/{order_id} | Find purchase order by ID
diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml
index 2e5dbfa3f31..1ac89ea205d 100644
--- a/samples/client/petstore/go/go-petstore/api/openapi.yaml
+++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml
@@ -282,46 +282,6 @@ paths:
summary: uploads an image
tags:
- pet
- /pet/{petId}/uploadImageWithRequiredFile:
- post:
- operationId: uploadFileWithRequiredFile
- parameters:
- - description: ID of pet to update
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- requestBody:
- content:
- multipart/form-data:
- schema:
- properties:
- additionalMetadata:
- description: Additional data to pass to server
- type: string
- file:
- description: file to upload
- format: binary
- type: string
- required:
- - file
- required: true
- responses:
- 200:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- description: successful operation
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: uploads an image
- tags:
- - pet
/store/inventory:
get:
description: Returns a map of status codes to quantities
@@ -1013,6 +973,46 @@ paths:
summary: To test special tags
tags:
- $another-fake?
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - file
+ required: true
+ responses:
+ 200:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
components:
schemas:
Category:
diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go
index 12c169016a2..b9676e5e8bc 100644
--- a/samples/client/petstore/go/go-petstore/api_another_fake.go
+++ b/samples/client/petstore/go/go-petstore/api_another_fake.go
@@ -24,7 +24,7 @@ var (
type AnotherFakeApiService service
-/*
+/*
AnotherFakeApiService To test special tags
To test special tags
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -85,7 +85,7 @@ func (a *AnotherFakeApiService) TestSpecialTags(ctx context.Context, client Clie
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore/api_fake.go b/samples/client/petstore/go/go-petstore/api_fake.go
index 271a39f3613..4fdbe1693e4 100644
--- a/samples/client/petstore/go/go-petstore/api_fake.go
+++ b/samples/client/petstore/go/go-petstore/api_fake.go
@@ -26,7 +26,7 @@ var (
type FakeApiService service
-/*
+/*
FakeApiService
Test serialization of outer boolean types
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -96,7 +96,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -122,7 +122,7 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
Test serialization of object with outer number type
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -196,7 +196,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -222,7 +222,7 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
Test serialization of outer number types
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -292,7 +292,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -318,7 +318,7 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
Test serialization of outer string types
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -388,7 +388,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -414,7 +414,7 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param query
@@ -482,8 +482,8 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
return localVarHttpResponse, nil
}
-/*
-FakeApiService To test \"client\" model
+/*
+FakeApiService To test \"client\" model
To test \"client\" model
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param client client model
@@ -543,7 +543,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -569,7 +569,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
FakeApiService Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -719,7 +719,7 @@ func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number floa
return localVarHttpResponse, nil
}
-/*
+/*
FakeApiService To test enum parameters
To test enum parameters
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -828,7 +828,7 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona
return localVarHttpResponse, nil
}
-/*
+/*
FakeApiService test inline additionalProperties
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param requestBody request body
@@ -894,7 +894,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, req
return localVarHttpResponse, nil
}
-/*
+/*
FakeApiService test json serialization of form data
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param param field1
diff --git a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
index 13bc70f0625..78a0effb2b0 100644
--- a/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
+++ b/samples/client/petstore/go/go-petstore/api_fake_classname_tags123.go
@@ -24,7 +24,7 @@ var (
type FakeClassnameTags123ApiService service
-/*
+/*
FakeClassnameTags123ApiService To test class name in snake case
To test class name in snake case
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -75,7 +75,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
} else {
key = auth.Key
}
-
localVarQueryParams.Add("api_key_query", key)
}
}
@@ -99,7 +98,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore/api_pet.go b/samples/client/petstore/go/go-petstore/api_pet.go
index f44bbc804da..9c933feeb54 100644
--- a/samples/client/petstore/go/go-petstore/api_pet.go
+++ b/samples/client/petstore/go/go-petstore/api_pet.go
@@ -27,7 +27,7 @@ var (
type PetApiService service
-/*
+/*
PetApiService Add a new pet to the store
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param pet Pet object that needs to be added to the store
@@ -93,7 +93,7 @@ func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, er
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService Deletes a pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId Pet id to delete
@@ -168,7 +168,7 @@ func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOpti
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService Finds Pets by status
Multiple status values can be provided with comma separated strings
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -228,7 +228,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -254,7 +254,7 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
PetApiService Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -314,7 +314,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -340,7 +340,7 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
PetApiService Find pet by ID
Returns a single pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -391,7 +391,6 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
key = auth.Key
}
localVarHeaderParams["api_key"] = key
-
}
}
@@ -414,7 +413,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -440,7 +439,7 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
PetApiService Update an existing pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param pet Pet object that needs to be added to the store
@@ -506,7 +505,7 @@ func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response,
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService Updates a pet in the store with form data
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param petId ID of pet that needs to be updated
@@ -586,7 +585,7 @@ func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, loca
return localVarHttpResponse, nil
}
-/*
+/*
PetApiService uploads an image
* @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
@@ -671,7 +670,7 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -697,8 +696,8 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
-PetApiService uploads an image
+/*
+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
@@ -721,7 +720,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
)
// create path and map variables
- localVarPath := a.client.cfg.BasePath + "/pet/{petId}/uploadImageWithRequiredFile"
+ localVarPath := a.client.cfg.BasePath + "/fake/{petId}/uploadImageWithRequiredFile"
localVarPath = strings.Replace(localVarPath, "{"+"petId"+"}", fmt.Sprintf("%v", petId), -1)
localVarHeaderParams := make(map[string]string)
@@ -774,7 +773,7 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore/api_store.go b/samples/client/petstore/go/go-petstore/api_store.go
index fd25fa94803..e628e134281 100644
--- a/samples/client/petstore/go/go-petstore/api_store.go
+++ b/samples/client/petstore/go/go-petstore/api_store.go
@@ -25,7 +25,7 @@ var (
type StoreApiService service
-/*
+/*
StoreApiService Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -91,7 +91,7 @@ func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*htt
return localVarHttpResponse, nil
}
-/*
+/*
StoreApiService Returns pet inventories by status
Returns a map of status codes to quantities
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -140,7 +140,6 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
key = auth.Key
}
localVarHeaderParams["api_key"] = key
-
}
}
@@ -163,7 +162,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -189,7 +188,7 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
StoreApiService Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -255,7 +254,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -281,7 +280,7 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
StoreApiService Place an order for a pet
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param order order placed for purchasing the pet
@@ -341,7 +340,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
diff --git a/samples/client/petstore/go/go-petstore/api_user.go b/samples/client/petstore/go/go-petstore/api_user.go
index 95350c677b1..c24eeacc702 100644
--- a/samples/client/petstore/go/go-petstore/api_user.go
+++ b/samples/client/petstore/go/go-petstore/api_user.go
@@ -25,7 +25,7 @@ var (
type UserApiService service
-/*
+/*
UserApiService Create user
This can only be done by the logged in user.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -92,7 +92,7 @@ func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Respo
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Creates list of users with given input array
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param user List of user object
@@ -158,7 +158,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Creates list of users with given input array
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param user List of user object
@@ -224,7 +224,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Delete user
This can only be done by the logged in user.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@@ -290,7 +290,7 @@ func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Get user by user name
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The name that needs to be fetched. Use user1 for testing.
@@ -349,7 +349,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -375,7 +375,7 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Logs user into the system
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param username The user name for login
@@ -436,7 +436,7 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
- if err == nil {
+ if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}
@@ -462,7 +462,7 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
return localVarReturnValue, localVarHttpResponse, nil
}
-/*
+/*
UserApiService Logs out current logged in user session
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
*/
@@ -525,7 +525,7 @@ func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error)
return localVarHttpResponse, nil
}
-/*
+/*
UserApiService Updated user
This can only be done by the logged in user.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
diff --git a/samples/client/petstore/go/go-petstore/docs/MapTest.md b/samples/client/petstore/go/go-petstore/docs/MapTest.md
index 4f2b9a39b09..fc266d17df9 100644
--- a/samples/client/petstore/go/go-petstore/docs/MapTest.md
+++ b/samples/client/petstore/go/go-petstore/docs/MapTest.md
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
**MapOfEnumString** | **map[string]string** | | [optional]
**DirectMap** | **map[string]bool** | | [optional]
-**IndirectMap** | [***StringBooleanMap**](StringBooleanMap.md) | | [optional]
+**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/go/go-petstore/docs/PetApi.md b/samples/client/petstore/go/go-petstore/docs/PetApi.md
index 402f31e7291..327cc1739cd 100644
--- a/samples/client/petstore/go/go-petstore/docs/PetApi.md
+++ b/samples/client/petstore/go/go-petstore/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**UpdatePet**](PetApi.md#UpdatePet) | **Put** /pet | Update an existing pet
[**UpdatePetWithForm**](PetApi.md#UpdatePetWithForm) | **Post** /pet/{petId} | Updates a pet in the store with form data
[**UploadFile**](PetApi.md#UploadFile) | **Post** /pet/{petId}/uploadImage | uploads an image
-[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
# **AddPet**
@@ -260,7 +260,7 @@ Name | Type | Description | Notes
# **UploadFileWithRequiredFile**
> ApiResponse UploadFileWithRequiredFile(ctx, petId, file, optional)
-uploads an image
+uploads an image (required)
### Required Parameters
diff --git a/samples/client/petstore/go/go-petstore/model_map_test.go b/samples/client/petstore/go/go-petstore/model_map_test.go
index c5cd01d5a1d..d0c3a6a19ff 100644
--- a/samples/client/petstore/go/go-petstore/model_map_test.go
+++ b/samples/client/petstore/go/go-petstore/model_map_test.go
@@ -13,5 +13,5 @@ type MapTest struct {
MapMapOfString map[string]map[string]string `json:"map_map_of_string,omitempty"`
MapOfEnumString map[string]string `json:"map_of_enum_string,omitempty"`
DirectMap map[string]bool `json:"direct_map,omitempty"`
- IndirectMap *StringBooleanMap `json:"indirect_map,omitempty"`
+ IndirectMap StringBooleanMap `json:"indirect_map,omitempty"`
}
diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java
index da3cb0cd4ae..c96556b8bd8 100644
--- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/api/PetApi.java
@@ -184,14 +184,14 @@ public interface PetApi extends ApiClient.Api {
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
* @param additionalMetadata Additional data to pass to server (optional, default to null)
* @return ModelApiResponse
*/
- @RequestLine("POST /pet/{petId}/uploadImageWithRequiredFile")
+ @RequestLine("POST /fake/{petId}/uploadImageWithRequiredFile")
@Headers({
"Content-Type: multipart/form-data",
"Accept: application/json",
diff --git a/samples/client/petstore/java/google-api-client/docs/PetApi.md b/samples/client/petstore/java/google-api-client/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/google-api-client/docs/PetApi.md
+++ b/samples/client/petstore/java/google-api-client/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java
index 7ee23a1e3fe..4050796041b 100644
--- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/PetApi.java
@@ -716,7 +716,7 @@ public class PetApi {
/**
- * uploads an image
+ * uploads an image (required)
*
200 - successful operation
* @param petId ID of pet to update
* @param file file to upload
@@ -731,7 +731,7 @@ public class PetApi {
}
/**
- * uploads an image
+ * uploads an image (required)
*
200 - successful operation
* @param petId ID of pet to update
* @param file file to upload
@@ -756,7 +756,7 @@ public class PetApi {
// create a map of path variables
final Map uriVariables = new HashMap();
uriVariables.put("petId", petId);
- UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}/uploadImageWithRequiredFile");
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/{petId}/uploadImageWithRequiredFile");
String url = uriBuilder.buildFromMap(uriVariables).toString();
GenericUrl genericUrl = new GenericUrl(url);
@@ -776,7 +776,7 @@ public class PetApi {
// create a map of path variables
final Map uriVariables = new HashMap();
uriVariables.put("petId", petId);
- UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/pet/{petId}/uploadImageWithRequiredFile");
+ UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + "/fake/{petId}/uploadImageWithRequiredFile");
// Copy the params argument if present, to allow passing in immutable maps
Map allParams = params == null ? new HashMap() : new HashMap(params);
diff --git a/samples/client/petstore/java/jersey1/docs/PetApi.md b/samples/client/petstore/java/jersey1/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/jersey1/docs/PetApi.md
+++ b/samples/client/petstore/java/jersey1/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java
index 7c9534e9337..520f7a98430 100644
--- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/PetApi.java
@@ -406,7 +406,7 @@ if (file != null)
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -428,7 +428,7 @@ if (file != null)
}
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
diff --git a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/jersey2-java6/docs/PetApi.md
+++ b/samples/client/petstore/java/jersey2-java6/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java
index fa6ff5792ed..7b381aa6005 100644
--- a/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey2-java6/src/main/java/org/openapitools/client/api/PetApi.java
@@ -480,7 +480,7 @@ if (file != null)
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -493,7 +493,7 @@ if (file != null)
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -515,7 +515,7 @@ if (file != null)
}
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
diff --git a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/jersey2-java8/docs/PetApi.md
+++ b/samples/client/petstore/java/jersey2-java8/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java
index fa6ff5792ed..7b381aa6005 100644
--- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/PetApi.java
@@ -480,7 +480,7 @@ if (file != null)
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -493,7 +493,7 @@ if (file != null)
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -515,7 +515,7 @@ if (file != null)
}
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
diff --git a/samples/client/petstore/java/jersey2/docs/PetApi.md b/samples/client/petstore/java/jersey2/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/jersey2/docs/PetApi.md
+++ b/samples/client/petstore/java/jersey2/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java
index fa6ff5792ed..7b381aa6005 100644
--- a/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/jersey2/src/main/java/org/openapitools/client/api/PetApi.java
@@ -480,7 +480,7 @@ if (file != null)
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -493,7 +493,7 @@ if (file != null)
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -515,7 +515,7 @@ if (file != null)
}
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java
index b0ab91c18ef..76831933748 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/PetApi.java
@@ -1077,7 +1077,7 @@ public class PetApi {
Object localVarPostBody = new Object();
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List localVarQueryParams = new ArrayList();
@@ -1139,7 +1139,7 @@ public class PetApi {
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -1153,7 +1153,7 @@ public class PetApi {
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -1168,7 +1168,7 @@ public class PetApi {
}
/**
- * uploads an image (asynchronously)
+ * uploads an image (required) (asynchronously)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
diff --git a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/okhttp-gson/docs/PetApi.md
+++ b/samples/client/petstore/java/okhttp-gson/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java
index b0ab91c18ef..76831933748 100644
--- a/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/api/PetApi.java
@@ -1077,7 +1077,7 @@ public class PetApi {
Object localVarPostBody = new Object();
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile"
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List localVarQueryParams = new ArrayList();
@@ -1139,7 +1139,7 @@ public class PetApi {
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -1153,7 +1153,7 @@ public class PetApi {
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -1168,7 +1168,7 @@ public class PetApi {
}
/**
- * uploads an image (asynchronously)
+ * uploads an image (required) (asynchronously)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
diff --git a/samples/client/petstore/java/rest-assured/docs/PetApi.md b/samples/client/petstore/java/rest-assured/docs/PetApi.md
index fb3a0d8e1ee..c61ebe262ef 100644
--- a/samples/client/petstore/java/rest-assured/docs/PetApi.md
+++ b/samples/client/petstore/java/rest-assured/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -350,7 +350,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java
index bfc21ac2dc1..f8c8533b380 100644
--- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/PetApi.java
@@ -743,7 +743,7 @@ public class PetApi {
}
}
/**
- * uploads an image
+ * uploads an image (required)
*
*
* @see #petIdPath ID of pet to update (required)
@@ -753,7 +753,7 @@ public class PetApi {
*/
public class UploadFileWithRequiredFileOper {
- public static final String REQ_URI = "/pet/{petId}/uploadImageWithRequiredFile";
+ public static final String REQ_URI = "/fake/{petId}/uploadImageWithRequiredFile";
private RequestSpecBuilder reqSpec;
@@ -774,7 +774,7 @@ public class PetApi {
}
/**
- * POST /pet/{petId}/uploadImageWithRequiredFile
+ * POST /fake/{petId}/uploadImageWithRequiredFile
* @param handler handler
* @param type
* @return type
@@ -784,7 +784,7 @@ public class PetApi {
}
/**
- * POST /pet/{petId}/uploadImageWithRequiredFile
+ * POST /fake/{petId}/uploadImageWithRequiredFile
* @param handler handler
* @return ModelApiResponse
*/
diff --git a/samples/client/petstore/java/resteasy/docs/PetApi.md b/samples/client/petstore/java/resteasy/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/resteasy/docs/PetApi.md
+++ b/samples/client/petstore/java/resteasy/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java
index c186143a979..2cffbb8a9ba 100644
--- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/PetApi.java
@@ -384,7 +384,7 @@ if (file != null)
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -406,7 +406,7 @@ if (file != null)
}
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile".replaceAll("\\{format\\}","json")
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md
+++ b/samples/client/petstore/java/resttemplate-withXml/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java
index 4e07b0c0c43..3161a9ee5e5 100644
--- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/PetApi.java
@@ -356,7 +356,7 @@ public class PetApi {
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* 200 - successful operation
* @param petId ID of pet to update
@@ -381,7 +381,7 @@ public class PetApi {
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("petId", petId);
- String path = UriComponentsBuilder.fromPath("/pet/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString();
+ String path = UriComponentsBuilder.fromPath("/fake/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
diff --git a/samples/client/petstore/java/resttemplate/docs/PetApi.md b/samples/client/petstore/java/resttemplate/docs/PetApi.md
index eb47b476a1a..dd4224a9020 100644
--- a/samples/client/petstore/java/resttemplate/docs/PetApi.md
+++ b/samples/client/petstore/java/resttemplate/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java
index 4e07b0c0c43..3161a9ee5e5 100644
--- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/PetApi.java
@@ -356,7 +356,7 @@ public class PetApi {
return apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* 200 - successful operation
* @param petId ID of pet to update
@@ -381,7 +381,7 @@ public class PetApi {
// create path and map variables
final Map uriVariables = new HashMap();
uriVariables.put("petId", petId);
- String path = UriComponentsBuilder.fromPath("/pet/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString();
+ String path = UriComponentsBuilder.fromPath("/fake/{petId}/uploadImageWithRequiredFile").buildAndExpand(uriVariables).toUriString();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
diff --git a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java
index e20531160bb..e7ccda2dc65 100644
--- a/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit/src/main/java/org/openapitools/client/api/PetApi.java
@@ -223,7 +223,7 @@ public interface PetApi {
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file, Callback cb
);
/**
- * uploads an image
+ * uploads an image (required)
* Sync method
*
* @param petId ID of pet to update (required)
@@ -233,13 +233,13 @@ public interface PetApi {
*/
@retrofit.http.Multipart
- @POST("/pet/{petId}/uploadImageWithRequiredFile")
+ @POST("/fake/{petId}/uploadImageWithRequiredFile")
ModelApiResponse uploadFileWithRequiredFile(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata
);
/**
- * uploads an image
+ * uploads an image (required)
* Async method
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -248,7 +248,7 @@ public interface PetApi {
*/
@retrofit.http.Multipart
- @POST("/pet/{petId}/uploadImageWithRequiredFile")
+ @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 cb
);
diff --git a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md
index cde9eda467e..88e229bd8ee 100644
--- a/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md
+++ b/samples/client/petstore/java/retrofit2-play24/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java
index adb8fce7d5d..dc1c0df8ce1 100644
--- a/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2-play24/src/main/java/org/openapitools/client/api/PetApi.java
@@ -126,7 +126,7 @@ public interface PetApi {
);
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -134,7 +134,7 @@ public interface PetApi {
* @return Call<ModelApiResponse>
*/
@retrofit2.http.Multipart
- @POST("pet/{petId}/uploadImageWithRequiredFile")
+ @POST("fake/{petId}/uploadImageWithRequiredFile")
F.Promise> uploadFileWithRequiredFile(
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
);
diff --git a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md
index cde9eda467e..88e229bd8ee 100644
--- a/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md
+++ b/samples/client/petstore/java/retrofit2-play25/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java
index bb09b995d1d..d3e7d96bfba 100644
--- a/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2-play25/src/main/java/org/openapitools/client/api/PetApi.java
@@ -126,7 +126,7 @@ public interface PetApi {
);
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -134,7 +134,7 @@ public interface PetApi {
* @return Call<ModelApiResponse>
*/
@retrofit2.http.Multipart
- @POST("pet/{petId}/uploadImageWithRequiredFile")
+ @POST("fake/{petId}/uploadImageWithRequiredFile")
CompletionStage> uploadFileWithRequiredFile(
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
);
diff --git a/samples/client/petstore/java/retrofit2/docs/PetApi.md b/samples/client/petstore/java/retrofit2/docs/PetApi.md
index cde9eda467e..88e229bd8ee 100644
--- a/samples/client/petstore/java/retrofit2/docs/PetApi.md
+++ b/samples/client/petstore/java/retrofit2/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java
index 0261620786e..bd41997b4e0 100644
--- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/PetApi.java
@@ -123,7 +123,7 @@ public interface PetApi {
);
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -131,7 +131,7 @@ public interface PetApi {
* @return Call<ModelApiResponse>
*/
@retrofit2.http.Multipart
- @POST("pet/{petId}/uploadImageWithRequiredFile")
+ @POST("fake/{petId}/uploadImageWithRequiredFile")
Call uploadFileWithRequiredFile(
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
);
diff --git a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md
index cde9eda467e..88e229bd8ee 100644
--- a/samples/client/petstore/java/retrofit2rx/docs/PetApi.md
+++ b/samples/client/petstore/java/retrofit2rx/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java
index 7929df96d2a..e60b78d8aed 100644
--- a/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2rx/src/main/java/org/openapitools/client/api/PetApi.java
@@ -123,7 +123,7 @@ public interface PetApi {
);
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -131,7 +131,7 @@ public interface PetApi {
* @return Observable<ModelApiResponse>
*/
@retrofit2.http.Multipart
- @POST("pet/{petId}/uploadImageWithRequiredFile")
+ @POST("fake/{petId}/uploadImageWithRequiredFile")
Observable uploadFileWithRequiredFile(
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
);
diff --git a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md
index cde9eda467e..88e229bd8ee 100644
--- a/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md
+++ b/samples/client/petstore/java/retrofit2rx2/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java
index a08da60b41a..cc94ec83589 100644
--- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java
+++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/PetApi.java
@@ -124,7 +124,7 @@ public interface PetApi {
);
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -132,7 +132,7 @@ public interface PetApi {
* @return Observable<ModelApiResponse>
*/
@retrofit2.http.Multipart
- @POST("pet/{petId}/uploadImageWithRequiredFile")
+ @POST("fake/{petId}/uploadImageWithRequiredFile")
Observable uploadFileWithRequiredFile(
@retrofit2.http.Path("petId") Long petId, @retrofit2.http.Part("file") MultipartBody.Part file, @retrofit2.http.Part("additionalMetadata") String additionalMetadata
);
diff --git a/samples/client/petstore/java/vertx/docs/PetApi.md b/samples/client/petstore/java/vertx/docs/PetApi.md
index c22e8f2438b..0cd9ccd8338 100644
--- a/samples/client/petstore/java/vertx/docs/PetApi.md
+++ b/samples/client/petstore/java/vertx/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
@@ -441,7 +441,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
-uploads an image
+uploads an image (required)
### Example
```java
diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java
index a33fcb54af6..58ba182d7d9 100644
--- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java
+++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/PetApiImpl.java
@@ -325,7 +325,7 @@ if (file != null) localVarFormParams.put("file", file);
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarBody, localVarHeaderParams, localVarFormParams, localVarAccepts, localVarContentTypes, localVarAuthNames, localVarReturnType, resultHandler);
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -348,7 +348,7 @@ if (file != null) localVarFormParams.put("file", file);
}
// create path and map variables
- String localVarPath = "/pet/{petId}/uploadImageWithRequiredFile".replaceAll("\\{" + "petId" + "\\}", petId.toString());
+ String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile".replaceAll("\\{" + "petId" + "\\}", petId.toString());
// query params
List localVarQueryParams = new ArrayList<>();
diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java
index ee1053e2794..7edbd19f503 100644
--- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java
+++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/PetApi.java
@@ -202,7 +202,7 @@ public class PetApi {
}));
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
@@ -214,7 +214,7 @@ public class PetApi {
}
/**
- * uploads an image
+ * uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param file file to upload (required)
diff --git a/samples/client/petstore/php/OpenAPIClient-php/README.md b/samples/client/petstore/php/OpenAPIClient-php/README.md
index 41d7335deb1..615b5cc3fc7 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/README.md
+++ b/samples/client/petstore/php/OpenAPIClient-php/README.md
@@ -99,7 +99,7 @@ Class | Method | HTTP request | Description
*PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
-*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
*StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
diff --git a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md
index 48a397fd626..647d70aae92 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md
+++ b/samples/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
# **addPet**
@@ -440,7 +440,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata)
-uploads an image
+uploads an image (required)
### Example
```php
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
index a2b2b7aed02..7a020d03881 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
@@ -2177,7 +2177,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFile
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2196,7 +2196,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFileWithHttpInfo
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2292,7 +2292,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFileAsync
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2314,7 +2314,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFileAsyncWithHttpInfo
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2390,7 +2390,7 @@ class PetApi
);
}
- $resourcePath = '/pet/{petId}/uploadImageWithRequiredFile';
+ $resourcePath = '/fake/{petId}/uploadImageWithRequiredFile';
$formParams = [];
$queryParams = [];
$headerParams = [];
diff --git a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php
index c24b9f47f57..5f1306b5e54 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php
@@ -154,7 +154,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
/**
* Test case for uploadFileWithRequiredFile
*
- * uploads an image.
+ * uploads an image (required).
*
*/
public function testUploadFileWithRequiredFile()
diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md
index 98f08b8e342..f999a2744cb 100644
--- a/samples/client/petstore/ruby/README.md
+++ b/samples/client/petstore/ruby/README.md
@@ -93,7 +93,7 @@ Class | Method | HTTP request | Description
*Petstore::PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
*Petstore::PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
*Petstore::PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
-*Petstore::PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+*Petstore::PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
*Petstore::StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
*Petstore::StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
*Petstore::StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
diff --git a/samples/client/petstore/ruby/docs/PetApi.md b/samples/client/petstore/ruby/docs/PetApi.md
index aecfde29f2c..60a4bc68d10 100644
--- a/samples/client/petstore/ruby/docs/PetApi.md
+++ b/samples/client/petstore/ruby/docs/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
# **add_pet**
@@ -422,7 +422,7 @@ Name | Type | Description | Notes
# **upload_file_with_required_file**
> ApiResponse upload_file_with_required_file(pet_id, file, opts)
-uploads an image
+uploads an image (required)
### Example
```ruby
@@ -442,7 +442,7 @@ opts = {
}
begin
- #uploads an image
+ #uploads an image (required)
result = api_instance.upload_file_with_required_file(pet_id, file, opts)
p result
rescue Petstore::ApiError => e
diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
index 21d536302d1..2554cbe6952 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
@@ -438,7 +438,7 @@ module Petstore
end
return data, status_code, headers
end
- # uploads an image
+ # uploads an image (required)
# @param pet_id ID of pet to update
# @param file file to upload
# @param [Hash] opts the optional parameters
@@ -449,7 +449,7 @@ module Petstore
data
end
- # uploads an image
+ # uploads an image (required)
# @param pet_id ID of pet to update
# @param file file to upload
# @param [Hash] opts the optional parameters
@@ -468,7 +468,7 @@ module Petstore
fail ArgumentError, "Missing the required parameter 'file' when calling PetApi.upload_file_with_required_file"
end
# resource path
- local_var_path = '/pet/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', pet_id.to_s)
+ local_var_path = '/fake/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', pet_id.to_s)
# query parameters
query_params = {}
diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md
index e4d699fe972..5c1b9df2886 100644
--- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md
+++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/README.md
@@ -99,7 +99,7 @@ Class | Method | HTTP request | Description
*PetApi* | [**updatePet**](docs/Api/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/Api/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/Api/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
-*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+*PetApi* | [**uploadFileWithRequiredFile**](docs/Api/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
*StoreApi* | [**deleteOrder**](docs/Api/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
*StoreApi* | [**getInventory**](docs/Api/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getOrderById**](docs/Api/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md
index 48a397fd626..647d70aae92 100644
--- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md
+++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/docs/Api/PetApi.md
@@ -12,7 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
-[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
+[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
# **addPet**
@@ -440,7 +440,7 @@ Name | Type | Description | Notes
# **uploadFileWithRequiredFile**
> \OpenAPI\Client\Model\ApiResponse uploadFileWithRequiredFile($pet_id, $file, $additional_metadata)
-uploads an image
+uploads an image (required)
### Example
```php
diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
index 07652826b2f..7a020d03881 100644
--- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
+++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
@@ -756,7 +756,7 @@ class PetApi
// query params
if (is_array($status)) {
- $status = ObjectSerializer::serializeCollection($status, 'multi', true);
+ $status = ObjectSerializer::serializeCollection($status, 'csv', true);
}
if ($status !== null) {
$queryParams['status'] = ObjectSerializer::toQueryValue($status);
@@ -1040,7 +1040,7 @@ class PetApi
// query params
if (is_array($tags)) {
- $tags = ObjectSerializer::serializeCollection($tags, 'multi', true);
+ $tags = ObjectSerializer::serializeCollection($tags, 'csv', true);
}
if ($tags !== null) {
$queryParams['tags'] = ObjectSerializer::toQueryValue($tags);
@@ -2177,7 +2177,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFile
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2196,7 +2196,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFileWithHttpInfo
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2292,7 +2292,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFileAsync
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2314,7 +2314,7 @@ class PetApi
/**
* Operation uploadFileWithRequiredFileAsyncWithHttpInfo
*
- * uploads an image
+ * uploads an image (required)
*
* @param int $pet_id ID of pet to update (required)
* @param \SplFileObject $file file to upload (required)
@@ -2390,7 +2390,7 @@ class PetApi
);
}
- $resourcePath = '/pet/{petId}/uploadImageWithRequiredFile';
+ $resourcePath = '/fake/{petId}/uploadImageWithRequiredFile';
$formParams = [];
$queryParams = [];
$headerParams = [];
diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php
index c24b9f47f57..5f1306b5e54 100644
--- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php
+++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/test/Api/PetApiTest.php
@@ -154,7 +154,7 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
/**
* Test case for uploadFileWithRequiredFile
*
- * uploads an image.
+ * uploads an image (required).
*
*/
public function testUploadFileWithRequiredFile()
diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java
index f134cb8ce5e..7010ca7717e 100644
--- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/PetApi.java
@@ -140,14 +140,14 @@ public interface PetApi {
public ModelApiResponse uploadFile(@PathParam("petId") Long petId, @Multipart(value = "additionalMetadata", required = false) String additionalMetadata, @Multipart(value = "file" , required = false) Attachment fileDetail);
/**
- * uploads an image
+ * uploads an image (required)
*
*/
@POST
- @Path("/pet/{petId}/uploadImageWithRequiredFile")
+ @Path("/fake/{petId}/uploadImageWithRequiredFile")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- @ApiOperation(value = "uploads an image", tags={ "pet" })
+ @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);
diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java
index be862bb6fe4..5f4d2222877 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApi.java
@@ -12,6 +12,7 @@ import org.openapitools.model.Client;
import java.io.File;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -211,4 +212,25 @@ public class FakeApi {
throws NotFoundException {
return delegate.testJsonFormData(param,param2,securityContext);
}
+ @POST
+ @Path("/{petId}/uploadImageWithRequiredFile")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "uploads an image (required)", notes = "", response = ModelApiResponse.class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @io.swagger.annotations.ApiResponses(value = {
+ @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
+,@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);
+ }
}
diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java
index 239e14f2a2d..b60fe75874f 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java
+++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/FakeApiService.java
@@ -10,6 +10,7 @@ import org.openapitools.model.Client;
import java.io.File;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -34,4 +35,5 @@ public abstract class FakeApiService {
public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException;
public abstract Response testInlineAdditionalProperties(Map 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;
}
diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java
index fd404b7bb7a..c915d919bab 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApi.java
@@ -208,25 +208,4 @@ public class PetApi {
throws NotFoundException {
return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext);
}
- @POST
- @Path("/{petId}/uploadImageWithRequiredFile")
- @Consumes({ "multipart/form-data" })
- @Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @io.swagger.annotations.ApiResponses(value = {
- @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
-,@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);
- }
}
diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java
index 47299bb5daf..ebd89ee5c3a 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java
+++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/PetApiService.java
@@ -27,5 +27,4 @@ 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;
}
diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
index 898f2b44fa7..3447b13b394 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
@@ -8,6 +8,7 @@ import org.openapitools.model.Client;
import java.io.File;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -74,4 +75,9 @@ public class FakeApiServiceImpl extends FakeApiService {
// do some magic!
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 {
+ // do some magic!
+ return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
+ }
}
diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
index b282f8833f9..366b2e4e133 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
@@ -59,9 +59,4 @@ public class PetApiServiceImpl extends PetApiService {
// do some magic!
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 {
- // do some magic!
- return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
- }
}
diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java
index 0b4e2ee73a2..1b358b2c1af 100644
--- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/FakeApi.java
@@ -6,6 +6,7 @@ import java.util.Date;
import java.io.File;
import org.joda.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -101,8 +102,23 @@ public interface FakeApi {
@GET
@Path("/jsonFormData")
@Consumes({ "application/x-www-form-urlencoded" })
- @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake" })
+ @ApiOperation(value = "test json serialization of form data", notes = "", tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
void testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2);
+
+ @POST
+ @Path("/{petId}/uploadImageWithRequiredFile")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "uploads an image (required)", notes = "", authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, 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);
}
diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java
index 1507e6e229b..ea35664ca3c 100644
--- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/PetApi.java
@@ -118,24 +118,9 @@ public interface PetApi {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
- }, tags={ "pet", })
+ }, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
ModelApiResponse uploadFile(@PathParam("petId") @ApiParam("ID of pet to update") Long petId,@FormParam(value = "additionalMetadata") String additionalMetadata, @FormParam(value = "file") InputStream fileInputStream,
@FormParam(value = "file") Attachment fileDetail);
-
- @POST
- @Path("/{petId}/uploadImageWithRequiredFile")
- @Consumes({ "multipart/form-data" })
- @Produces({ "application/json" })
- @ApiOperation(value = "uploads an image", notes = "", authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, 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);
}
diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml
index fa165f2bff1..26e70a7de9b 100644
--- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml
+++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml
@@ -298,48 +298,6 @@ paths:
- pet
x-tags:
- tag: pet
- /pet/{petId}/uploadImageWithRequiredFile:
- post:
- operationId: uploadFileWithRequiredFile
- parameters:
- - description: ID of pet to update
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- requestBody:
- content:
- multipart/form-data:
- schema:
- properties:
- additionalMetadata:
- description: Additional data to pass to server
- type: string
- file:
- description: file to upload
- format: binary
- type: string
- required:
- - file
- required: true
- responses:
- 200:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- description: successful operation
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: uploads an image
- tags:
- - pet
- x-tags:
- - tag: pet
/store/inventory:
get:
description: Returns a map of status codes to quantities
@@ -1079,6 +1037,48 @@ paths:
- $another-fake?
x-tags:
- tag: $another-fake?
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - file
+ required: true
+ responses:
+ 200:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
+ x-tags:
+ - tag: pet
components:
schemas:
Category:
diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java
index 06fa48bc4e1..7e604381114 100644
--- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/FakeApi.java
@@ -6,6 +6,7 @@ import java.util.Date;
import java.io.File;
import org.joda.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -128,11 +129,29 @@ public class FakeApi {
@GET
@Path("/jsonFormData")
@Consumes({ "application/x-www-form-urlencoded" })
- @ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake" })
+ @ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = Void.class)
})
public Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2) {
return Response.ok().entity("magic!").build();
}
+
+ @POST
+ @Path("/{petId}/uploadImageWithRequiredFile")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @ApiOperation(value = "uploads an image (required)", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet" })
+ @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) {
+ return Response.ok().entity("magic!").build();
+ }
}
diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java
index 7f06dbe8d0c..ec2658d28ce 100644
--- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/PetApi.java
@@ -139,7 +139,7 @@ public class PetApi {
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@AuthorizationScope(scope = "read:pets", description = "read your pets")
})
- }, tags={ "pet", })
+ }, tags={ "pet" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class)
})
@@ -147,22 +147,4 @@ public class PetApi {
@FormParam(value = "file") Attachment fileDetail) {
return Response.ok().entity("magic!").build();
}
-
- @POST
- @Path("/{petId}/uploadImageWithRequiredFile")
- @Consumes({ "multipart/form-data" })
- @Produces({ "application/json" })
- @ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet" })
- @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) {
- return Response.ok().entity("magic!").build();
- }
}
diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml
index fa165f2bff1..26e70a7de9b 100644
--- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml
+++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml
@@ -298,48 +298,6 @@ paths:
- pet
x-tags:
- tag: pet
- /pet/{petId}/uploadImageWithRequiredFile:
- post:
- operationId: uploadFileWithRequiredFile
- parameters:
- - description: ID of pet to update
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- requestBody:
- content:
- multipart/form-data:
- schema:
- properties:
- additionalMetadata:
- description: Additional data to pass to server
- type: string
- file:
- description: file to upload
- format: binary
- type: string
- required:
- - file
- required: true
- responses:
- 200:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- description: successful operation
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: uploads an image
- tags:
- - pet
- x-tags:
- - tag: pet
/store/inventory:
get:
description: Returns a map of status codes to quantities
@@ -1079,6 +1037,48 @@ paths:
- $another-fake?
x-tags:
- tag: $another-fake?
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - file
+ required: true
+ responses:
+ 200:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
+ x-tags:
+ - tag: pet
components:
schemas:
Category:
diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java
index c538b127fc4..9251d6cb63d 100644
--- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/PetApi.java
@@ -193,7 +193,7 @@ public class PetApi {
@Path("/{petId}/uploadImageWithRequiredFile")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
+ @io.swagger.annotations.ApiOperation(value = "uploads an image (required)", notes = "", response = ModelApiResponse.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java
index 484cbe44254..f74064e0f50 100644
--- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApi.java
@@ -15,6 +15,7 @@ import org.openapitools.model.Client;
import java.util.Date;
import java.io.File;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -187,7 +188,7 @@ public class FakeApi {
@Path("/jsonFormData")
@Consumes({ "application/x-www-form-urlencoded" })
- @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake" })
+ @io.swagger.annotations.ApiOperation(value = "test json serialization of form data", notes = "", response = Void.class, tags={ "fake", })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Void.class) })
public Response testJsonFormData(
@@ -197,4 +198,25 @@ public class FakeApi {
throws NotFoundException {
return delegate.testJsonFormData(param,param2,securityContext);
}
+ @POST
+ @Path("/{petId}/uploadImageWithRequiredFile")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "uploads an image (required)", notes = "", response = ModelApiResponse.class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet" })
+ @io.swagger.annotations.ApiResponses(value = {
+ @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("additionalMetadata") String additionalMetadata,
+ @Context SecurityContext securityContext)
+ throws NotFoundException {
+ return delegate.uploadFileWithRequiredFile(petId,inputStream, fileDetail,additionalMetadata,securityContext);
+ }
}
diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java
index e105762e300..eca1ec19b4f 100644
--- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java
+++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/FakeApiService.java
@@ -10,6 +10,7 @@ import org.openapitools.model.Client;
import java.util.Date;
import java.io.File;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -46,4 +47,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)
+ throws NotFoundException;
}
diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java
index 8b130f30f0e..4d6288f5ef5 100644
--- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApi.java
@@ -177,7 +177,7 @@ public class PetApi {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
})
- }, tags={ "pet", })
+ }, tags={ "pet" })
@io.swagger.annotations.ApiResponses(value = {
@io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
public Response uploadFile(
@@ -189,25 +189,4 @@ public class PetApi {
throws NotFoundException {
return delegate.uploadFile(petId,additionalMetadata,inputStream, fileDetail,securityContext);
}
- @POST
- @Path("/{petId}/uploadImageWithRequiredFile")
- @Consumes({ "multipart/form-data" })
- @Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet" })
- @io.swagger.annotations.ApiResponses(value = {
- @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("additionalMetadata") String additionalMetadata,
- @Context SecurityContext securityContext)
- throws NotFoundException {
- return delegate.uploadFileWithRequiredFile(petId,inputStream, fileDetail,additionalMetadata,securityContext);
- }
}
diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java
index ce8c271d31a..9af313fd74a 100644
--- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java
+++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/PetApiService.java
@@ -38,6 +38,4 @@ 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)
- throws NotFoundException;
}
diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
index a775f2311c8..8af485de98a 100644
--- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
@@ -10,6 +10,7 @@ import org.openapitools.model.Client;
import java.util.Date;
import java.io.File;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -86,4 +87,10 @@ public class FakeApiServiceImpl extends FakeApiService {
// do some magic!
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 {
+ // do some magic!
+ return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
+ }
}
diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
index ade99c7c99a..4531f4b4b69 100644
--- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
@@ -70,10 +70,4 @@ public class PetApiServiceImpl extends PetApiService {
// do some magic!
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 {
- // do some magic!
- return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
- }
}
diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java
index 8172cd1ea2f..810cd35f38f 100644
--- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/PetApi.java
@@ -212,7 +212,7 @@ public class PetApi {
@Path("/{petId}/uploadImageWithRequiredFile")
@Consumes({ "multipart/form-data" })
@Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
+ @io.swagger.annotations.ApiOperation(value = "uploads an image (required)", notes = "", response = ModelApiResponse.class, authorizations = {
@io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
@io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
@io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java
index 6819d8cf46f..8748224956c 100644
--- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApi.java
@@ -12,6 +12,7 @@ import org.openapitools.model.Client;
import java.util.Date;
import java.io.File;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -210,4 +211,25 @@ public class FakeApi {
throws NotFoundException {
return delegate.testJsonFormData(param,param2,securityContext);
}
+ @POST
+ @Path("/{petId}/uploadImageWithRequiredFile")
+ @Consumes({ "multipart/form-data" })
+ @Produces({ "application/json" })
+ @io.swagger.annotations.ApiOperation(value = "uploads an image (required)", notes = "", response = ModelApiResponse.class, authorizations = {
+ @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
+ @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @io.swagger.annotations.ApiResponses(value = {
+ @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
+,@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);
+ }
}
diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java
index 76704bdef05..04037355ed6 100644
--- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java
+++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/FakeApiService.java
@@ -10,6 +10,7 @@ import org.openapitools.model.Client;
import java.util.Date;
import java.io.File;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -33,4 +34,5 @@ public abstract class FakeApiService {
public abstract Response testEnumParameters(List enumHeaderStringArray,String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble,List enumFormStringArray,String enumFormString,SecurityContext securityContext) throws NotFoundException;
public abstract Response testInlineAdditionalProperties(Map 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;
}
diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java
index fd404b7bb7a..c915d919bab 100644
--- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApi.java
@@ -208,25 +208,4 @@ public class PetApi {
throws NotFoundException {
return delegate.uploadFile(petId,additionalMetadata,fileInputStream, fileDetail,securityContext);
}
- @POST
- @Path("/{petId}/uploadImageWithRequiredFile")
- @Consumes({ "multipart/form-data" })
- @Produces({ "application/json" })
- @io.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
- @io.swagger.annotations.Authorization(value = "petstore_auth", scopes = {
- @io.swagger.annotations.AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @io.swagger.annotations.AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @io.swagger.annotations.ApiResponses(value = {
- @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
-,@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);
- }
}
diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java
index 47299bb5daf..ebd89ee5c3a 100644
--- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java
+++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/PetApiService.java
@@ -27,5 +27,4 @@ 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;
}
diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
index b68bbb70b1b..e48ca70b5c8 100644
--- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java
@@ -8,6 +8,7 @@ import org.openapitools.model.Client;
import java.util.Date;
import java.io.File;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.openapitools.model.User;
@@ -73,4 +74,9 @@ public class FakeApiServiceImpl extends FakeApiService {
// do some magic!
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 {
+ // do some magic!
+ return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
+ }
}
diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
index b282f8833f9..366b2e4e133 100644
--- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
+++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java
@@ -59,9 +59,4 @@ public class PetApiServiceImpl extends PetApiService {
// do some magic!
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 {
- // do some magic!
- return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build();
- }
}
diff --git a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php
index ad7097f7db4..1c519f4ea21 100644
--- a/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php
+++ b/samples/server/petstore/php-lumen/lib/app/Http/Controllers/PetApi.php
@@ -26,6 +26,26 @@ class PetApi extends Controller
{
}
+ /**
+ * Operation uploadFileWithRequiredFile
+ *
+ * uploads an image (required).
+ *
+ * @param int $pet_id ID of pet to update (required)
+ *
+ * @return Http response
+ */
+ public function uploadFileWithRequiredFile($pet_id)
+ {
+ $input = Request::all();
+
+ //path params validation
+
+
+ //not path params validation
+
+ return response('How about implementing uploadFileWithRequiredFile as a post method ?');
+ }
/**
* Operation addPet
*
@@ -202,24 +222,4 @@ class PetApi extends Controller
return response('How about implementing uploadFile as a post method ?');
}
- /**
- * Operation uploadFileWithRequiredFile
- *
- * uploads an image.
- *
- * @param int $pet_id ID of pet to update (required)
- *
- * @return Http response
- */
- public function uploadFileWithRequiredFile($pet_id)
- {
- $input = Request::all();
-
- //path params validation
-
-
- //not path params validation
-
- return response('How about implementing uploadFileWithRequiredFile as a post method ?');
- }
}
diff --git a/samples/server/petstore/php-lumen/lib/app/Http/routes.php b/samples/server/petstore/php-lumen/lib/app/Http/routes.php
index e2dfa91a7e3..99202ede02e 100644
--- a/samples/server/petstore/php-lumen/lib/app/Http/routes.php
+++ b/samples/server/petstore/php-lumen/lib/app/Http/routes.php
@@ -105,6 +105,13 @@ $app->post('/v2/fake/outer/string', 'FakeApi@fakeOuterStringSerialize');
* Output-Formats: [application/json]
*/
$app->patch('/v2/fake_classname_test', 'FakeClassnameTags123Api@testClassname');
+/**
+ * post uploadFileWithRequiredFile
+ * Summary: uploads an image (required)
+ * Notes:
+ * Output-Formats: [application/json]
+ */
+$app->post('/v2/fake/{petId}/uploadImageWithRequiredFile', 'PetApi@uploadFileWithRequiredFile');
/**
* post addPet
* Summary: Add a new pet to the store
@@ -161,13 +168,6 @@ $app->post('/v2/pet/{petId}', 'PetApi@updatePetWithForm');
* Output-Formats: [application/json]
*/
$app->post('/v2/pet/{petId}/uploadImage', 'PetApi@uploadFile');
-/**
- * post uploadFileWithRequiredFile
- * Summary: uploads an image
- * Notes:
- * Output-Formats: [application/json]
- */
-$app->post('/v2/pet/{petId}/uploadImageWithRequiredFile', 'PetApi@uploadFileWithRequiredFile');
/**
* get getInventory
* Summary: Returns pet inventories by status
diff --git a/samples/server/petstore/php-slim/index.php b/samples/server/petstore/php-slim/index.php
index 60eebdf1958..dc0849ad795 100644
--- a/samples/server/petstore/php-slim/index.php
+++ b/samples/server/petstore/php-slim/index.php
@@ -295,11 +295,11 @@ $app->POST('/v2/pet/{petId}/uploadImage', function($request, $response, $args) {
/**
* POST uploadFileWithRequiredFile
- * Summary: uploads an image
+ * Summary: uploads an image (required)
* Notes:
* Output-Formats: [application/json]
*/
-$app->POST('/v2/pet/{petId}/uploadImageWithRequiredFile', function($request, $response, $args) {
+$app->POST('/v2/fake/{petId}/uploadImageWithRequiredFile', function($request, $response, $args) {
$petId = $args['petId'];
$additionalMetadata = $request->getParsedBodyParam('additionalMetadata');
$file = (key_exists('file', $request->getUploadedFiles())) ? $request->getUploadedFiles()['file'] : null;
diff --git a/samples/server/petstore/php-ze-ph/application/config/path_handler.yml b/samples/server/petstore/php-ze-ph/application/config/path_handler.yml
index fc5c123eff1..2173e7fc29b 100644
--- a/samples/server/petstore/php-ze-ph/application/config/path_handler.yml
+++ b/samples/server/petstore/php-ze-ph/application/config/path_handler.yml
@@ -33,13 +33,13 @@ Articus\PathHandler\Router\FastRouteAnnotation:
- App\Handler\FakeOuterComposite
- App\Handler\FakeOuterNumber
- App\Handler\FakeOuterString
+ - App\Handler\FakePetIdUploadImageWithRequiredFile
- App\Handler\FakeClassnameTest
- App\Handler\Pet
- App\Handler\PetFindByStatus
- App\Handler\PetFindByTags
- App\Handler\PetPetId
- App\Handler\PetPetIdUploadImage
- - App\Handler\PetPetIdUploadImageWithRequiredFile
- App\Handler\StoreInventory
- App\Handler\StoreOrder
- App\Handler\StoreOrderOrderId
@@ -60,13 +60,13 @@ Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory:
App\Handler\FakeOuterComposite: []
App\Handler\FakeOuterNumber: []
App\Handler\FakeOuterString: []
+ App\Handler\FakePetIdUploadImageWithRequiredFile: []
App\Handler\FakeClassnameTest: []
App\Handler\Pet: []
App\Handler\PetFindByStatus: []
App\Handler\PetFindByTags: []
App\Handler\PetPetId: []
App\Handler\PetPetIdUploadImage: []
- App\Handler\PetPetIdUploadImageWithRequiredFile: []
App\Handler\StoreInventory: []
App\Handler\StoreOrder: []
App\Handler\StoreOrderOrderId: []
diff --git a/samples/server/petstore/php-ze-ph/src/App/Handler/FakePetIdUploadImageWithRequiredFile.php b/samples/server/petstore/php-ze-ph/src/App/Handler/FakePetIdUploadImageWithRequiredFile.php
new file mode 100644
index 00000000000..228936e146c
--- /dev/null
+++ b/samples/server/petstore/php-ze-ph/src/App/Handler/FakePetIdUploadImageWithRequiredFile.php
@@ -0,0 +1,33 @@
+> 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 CompletableFuture.supplyAsync(()-> {
+ getRequest().ifPresent(request -> {
+ 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\"}");
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+ }, Runnable::run);
+
+ }
+
}
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
index f818bfaecfb..55fba76aca4 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
@@ -228,32 +228,4 @@ public interface PetApi {
}
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- default CompletableFuture> 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 CompletableFuture.supplyAsync(()-> {
- getRequest().ifPresent(request -> {
- 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\"}");
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
- }, Runnable::run);
-
- }
-
}
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
index 78c6d7f3e72..1b8fd08fed1 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
@@ -10,6 +10,7 @@ import org.openapitools.model.Client;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
import org.openapitools.model.User;
@@ -206,4 +207,30 @@ public interface FakeApi {
}
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ default ResponseEntity 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) {
+ getRequest().ifPresent(request -> {
+ 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\"}");
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
}
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
index 155da0b9f17..9559bbf098d 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
@@ -219,30 +219,4 @@ public interface PetApi {
}
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- default ResponseEntity 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) {
- getRequest().ifPresent(request -> {
- 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\"}");
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
}
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
index 21ba95b5edd..41d13e06f64 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import org.threeten.bp.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -128,4 +129,19 @@ public interface FakeApi {
method = RequestMethod.GET)
ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true, defaultValue="null") @RequestParam(value="param2", required=true) String param2);
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ ResponseEntity 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);
+
}
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java
index fef8e057699..1853d9cda98 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApiController.java
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import org.threeten.bp.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -118,4 +119,15 @@ public class FakeApiController implements FakeApi {
}
+ public ResponseEntity 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) {
+ 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\"}");
+ break;
+ }
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
}
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
index b207d39f84c..e9dc9c37cce 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
@@ -143,19 +143,4 @@ public interface PetApi {
method = RequestMethod.POST)
ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file);
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- ResponseEntity 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);
-
}
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java
index 722ed3221e8..20ea8d651a4 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApiController.java
@@ -109,15 +109,4 @@ public class PetApiController implements PetApi {
}
- public ResponseEntity 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) {
- 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\"}");
- break;
- }
- }
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
}
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
index 21ba95b5edd..41d13e06f64 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import org.threeten.bp.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -128,4 +129,19 @@ public interface FakeApi {
method = RequestMethod.GET)
ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true, defaultValue="null") @RequestParam(value="param2", required=true) String param2);
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ ResponseEntity 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);
+
}
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java
index 000b811e058..aa8f2eaf296 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApiController.java
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import org.threeten.bp.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -118,4 +119,15 @@ public class FakeApiController implements FakeApi {
}
+ public ResponseEntity 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) {
+ 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\"}");
+ break;
+ }
+ }
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
}
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
index b207d39f84c..e9dc9c37cce 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
@@ -143,19 +143,4 @@ public interface PetApi {
method = RequestMethod.POST)
ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file);
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- ResponseEntity 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);
-
}
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java
index 80fb91e825e..b01cdf874b3 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApiController.java
@@ -109,15 +109,4 @@ public class PetApiController implements PetApi {
}
- public ResponseEntity 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) {
- 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\"}");
- break;
- }
- }
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
}
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
index c2eed78d6a2..3f13386bbee 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -152,4 +153,21 @@ public interface FakeApi {
return getDelegate().testJsonFormData(param, param2);
}
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ default ResponseEntity 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);
+ }
+
}
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java
index aea629f7eda..d3a53a337e7 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApiDelegate.java
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -172,4 +173,22 @@ public interface FakeApiDelegate {
}
+ /**
+ * @see FakeApi#uploadFileWithRequiredFile
+ */
+ default ResponseEntity uploadFileWithRequiredFile( Long petId,
+ MultipartFile file,
+ String additionalMetadata) {
+ getRequest().ifPresent(request -> {
+ 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\"}");
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
}
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
index a9cd158432a..8cab0b706a9 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
@@ -163,21 +163,4 @@ public interface PetApi {
return getDelegate().uploadFile(petId, additionalMetadata, file);
}
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- default ResponseEntity 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);
- }
-
}
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java
index a5b1f721cd1..88a778effd8 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApiDelegate.java
@@ -138,22 +138,4 @@ public interface PetApiDelegate {
}
- /**
- * @see PetApi#uploadFileWithRequiredFile
- */
- default ResponseEntity uploadFileWithRequiredFile( Long petId,
- MultipartFile file,
- String additionalMetadata) {
- getRequest().ifPresent(request -> {
- 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\"}");
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
}
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
index 21ba95b5edd..41d13e06f64 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import org.threeten.bp.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -128,4 +129,19 @@ public interface FakeApi {
method = RequestMethod.GET)
ResponseEntity testJsonFormData(@ApiParam(value = "field1", required=true, defaultValue="null") @RequestParam(value="param", required=true) String param,@ApiParam(value = "field2", required=true, defaultValue="null") @RequestParam(value="param2", required=true) String param2);
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ ResponseEntity 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);
+
}
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java
index d18e35cff3e..28d0411df16 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiController.java
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import org.threeten.bp.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -76,4 +77,8 @@ public class FakeApiController implements FakeApi {
return delegate.testJsonFormData(param, param2);
}
+ public ResponseEntity 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);
+ }
+
}
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java
index 0d8e15b5a5a..1ac97735aa1 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApiDelegate.java
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import org.threeten.bp.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import org.threeten.bp.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -94,4 +95,11 @@ public interface FakeApiDelegate {
ResponseEntity testJsonFormData( String param,
String param2);
+ /**
+ * @see FakeApi#uploadFileWithRequiredFile
+ */
+ ResponseEntity uploadFileWithRequiredFile( Long petId,
+ MultipartFile file,
+ String additionalMetadata);
+
}
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
index b207d39f84c..e9dc9c37cce 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
@@ -143,19 +143,4 @@ public interface PetApi {
method = RequestMethod.POST)
ResponseEntity uploadFile(@ApiParam(value = "ID of pet to update",required=true) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server", defaultValue="null") @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @Valid @RequestPart("file") MultipartFile file);
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- ResponseEntity 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);
-
}
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java
index b39c37857f0..4e56a593144 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiController.java
@@ -63,8 +63,4 @@ public class PetApiController implements PetApi {
return delegate.uploadFile(petId, additionalMetadata, file);
}
- public ResponseEntity 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);
- }
-
}
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java
index 0251e06b3c3..13f6acf44c7 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApiDelegate.java
@@ -62,11 +62,4 @@ public interface PetApiDelegate {
String additionalMetadata,
MultipartFile file);
- /**
- * @see PetApi#uploadFileWithRequiredFile
- */
- ResponseEntity uploadFileWithRequiredFile( Long petId,
- MultipartFile file,
- String additionalMetadata);
-
}
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
index 555ae7e22b1..2217b0cf81e 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -228,4 +229,32 @@ public interface FakeApi {
}
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @ApiImplicitParams({
+ })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ default ResponseEntity 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) {
+ getRequest().ifPresent(request -> {
+ 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\"}");
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
}
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
index 11e98f37aea..e15f482431f 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
@@ -236,32 +236,4 @@ public interface PetApi {
}
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @ApiImplicitParams({
- })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- default ResponseEntity 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) {
- getRequest().ifPresent(request -> {
- 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\"}");
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
}
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
index 65eeb503d6f..f825e1b2caa 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -209,4 +210,30 @@ public interface FakeApi {
}
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ default ResponseEntity> 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) {
+ Mono result = Mono.empty();
+ for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ result = ApiUtil.getExampleResponse(exchange, "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}")
+ .then(Mono.empty());
+ break;
+ }
+ }
+ return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).body(result);
+
+ }
+
}
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
index a483be41ccd..e747a234faa 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
@@ -224,30 +224,4 @@ public interface PetApi {
}
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- default ResponseEntity> 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) {
- Mono result = Mono.empty();
- for (MediaType mediaType : exchange.getRequest().getHeaders().getAccept()) {
- if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
- result = ApiUtil.getExampleResponse(exchange, "{ \"code\" : 0, \"type\" : \"type\", \"message\" : \"message\"}")
- .then(Mono.empty());
- break;
- }
- }
- return ResponseEntity.status(HttpStatus.NOT_IMPLEMENTED).body(result);
-
- }
-
}
diff --git a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml
index b09398ca5e1..072978c8fa8 100644
--- a/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml
+++ b/samples/server/petstore/springboot-reactive/src/main/resources/openapi.yaml
@@ -310,50 +310,6 @@ paths:
x-accepts: application/json
x-tags:
- tag: pet
- /pet/{petId}/uploadImageWithRequiredFile:
- post:
- operationId: uploadFileWithRequiredFile
- parameters:
- - description: ID of pet to update
- in: path
- name: petId
- required: true
- schema:
- format: int64
- type: integer
- requestBody:
- content:
- multipart/form-data:
- schema:
- properties:
- additionalMetadata:
- description: Additional data to pass to server
- type: string
- file:
- description: file to upload
- format: binary
- type: string
- required:
- - file
- required: true
- responses:
- 200:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/ApiResponse'
- description: successful operation
- security:
- - petstore_auth:
- - write:pets
- - read:pets
- summary: uploads an image
- tags:
- - pet
- x-contentType: multipart/form-data
- x-accepts: application/json
- x-tags:
- - tag: pet
/store/inventory:
get:
description: Returns a map of status codes to quantities
@@ -1134,6 +1090,50 @@ paths:
x-accepts: application/json
x-tags:
- tag: $another-fake?
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - file
+ required: true
+ responses:
+ 200:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
+ x-contentType: multipart/form-data
+ x-accepts: application/json
+ x-tags:
+ - tag: pet
components:
schemas:
Category:
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
index 9c3a58b5fc6..a9b2a1cc895 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -206,4 +207,30 @@ public interface FakeApi {
}
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ default ResponseEntity 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) {
+ getRequest().ifPresent(request -> {
+ 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\"}");
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
}
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
index 65ffc288c47..aeea6e160aa 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
@@ -219,30 +219,4 @@ public interface PetApi {
}
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- default ResponseEntity 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) {
- getRequest().ifPresent(request -> {
- 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\"}");
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
}
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
index bf690fc6dc6..92917838edd 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
@@ -9,6 +9,7 @@ import java.math.BigDecimal;
import org.openapitools.model.Client;
import java.time.LocalDate;
import java.util.Map;
+import org.openapitools.model.ModelApiResponse;
import java.time.OffsetDateTime;
import org.openapitools.model.OuterComposite;
import org.springframework.core.io.Resource;
@@ -206,4 +207,30 @@ public interface FakeApi {
}
+
+ @ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
+ @Authorization(value = "petstore_auth", scopes = {
+ @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
+ @AuthorizationScope(scope = "read:pets", description = "read your pets")
+ })
+ }, tags={ "pet", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
+ @RequestMapping(value = "/fake/{petId}/uploadImageWithRequiredFile",
+ produces = { "application/json" },
+ consumes = { "multipart/form-data" },
+ method = RequestMethod.POST)
+ default ResponseEntity 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) {
+ getRequest().ifPresent(request -> {
+ 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\"}");
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
}
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
index 155da0b9f17..9559bbf098d 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
@@ -219,30 +219,4 @@ public interface PetApi {
}
-
- @ApiOperation(value = "uploads an image", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
- @Authorization(value = "petstore_auth", scopes = {
- @AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
- @AuthorizationScope(scope = "read:pets", description = "read your pets")
- })
- }, tags={ "pet", })
- @ApiResponses(value = {
- @ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
- @RequestMapping(value = "/pet/{petId}/uploadImageWithRequiredFile",
- produces = { "application/json" },
- consumes = { "multipart/form-data" },
- method = RequestMethod.POST)
- default ResponseEntity 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) {
- getRequest().ifPresent(request -> {
- 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\"}");
- break;
- }
- }
- });
- return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
-
- }
-
}