forked from loafle/openapi-generator-original
Issue 1766 Modified mustache files for Go to support nullable in the spec v3.0+; Updated model files running .sh scripts for Go.
This commit is contained in:
parent
faf1f5d81d
commit
b63242219c
@ -19,6 +19,6 @@ const (
|
|||||||
type {{classname}} struct {
|
type {{classname}} struct {
|
||||||
{{#vars}}{{#description}}
|
{{#vars}}{{#description}}
|
||||||
// {{{description}}}{{/description}}
|
// {{{description}}}{{/description}}
|
||||||
{{name}} {{^isEnum}}{{^isPrimitiveType}}{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{/isPrimitiveType}}{{/isEnum}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
|
{{name}} {{#isNullable}}*{{/isNullable}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}{{/isEnum}}{{/model}}{{/models}}
|
}{{/isEnum}}{{/model}}{{/models}}
|
||||||
|
@ -19,6 +19,6 @@ const (
|
|||||||
type {{classname}} struct {
|
type {{classname}} struct {
|
||||||
{{#vars}}{{#description}}
|
{{#vars}}{{#description}}
|
||||||
// {{{description}}}{{/description}}
|
// {{{description}}}{{/description}}
|
||||||
{{name}} {{^isEnum}}{{^isPrimitiveType}}{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{/isPrimitiveType}}{{/isEnum}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
|
{{name}} {{#isNullable}}*{{/isNullable}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}{{/isEnum}}{{/model}}{{/models}}
|
}{{/isEnum}}{{/model}}{{/models}}
|
||||||
|
@ -35,7 +35,7 @@ type {{classname}} struct {
|
|||||||
{{#description}}
|
{{#description}}
|
||||||
// {{{description}}}
|
// {{{description}}}
|
||||||
{{/description}}
|
{{/description}}
|
||||||
{{name}} {{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
|
{{name}} {{#isNullable}}*{{/isNullable}}{{{dataType}}} `json:"{{baseName}}{{^required}},omitempty{{/required}}"{{#withXml}} xml:"{{baseName}}{{#isXmlAttribute}},attr{{/isXmlAttribute}}"{{/withXml}}{{#vendorExtensions.x-go-custom-tag}} {{{.}}}{{/vendorExtensions.x-go-custom-tag}}`
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
}
|
}
|
||||||
{{/isEnum}}
|
{{/isEnum}}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
{{#vars}}**{{name}}** | {{#isNullable}}Pointer to {{/isNullable}}{{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
@ -1 +1 @@
|
|||||||
3.3.1-SNAPSHOT
|
4.0.0-SNAPSHOT
|
@ -40,6 +40,7 @@ Class | Method | HTTP request | Description
|
|||||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model
|
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **Patch** /fake | To test \"client\" model
|
||||||
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters
|
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **Get** /fake | To test enum parameters
|
||||||
|
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
|
||||||
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
|
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data
|
*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **Get** /fake/jsonFormData | test json serialization of form data
|
||||||
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case
|
*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **Patch** /fake_classname_test | To test class name in snake case
|
||||||
@ -70,7 +71,6 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
- [Animal](docs/Animal.md)
|
- [Animal](docs/Animal.md)
|
||||||
- [AnimalFarm](docs/AnimalFarm.md)
|
|
||||||
- [ApiResponse](docs/ApiResponse.md)
|
- [ApiResponse](docs/ApiResponse.md)
|
||||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
@ -101,8 +101,9 @@ Class | Method | HTTP request | Description
|
|||||||
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [SpecialModelName](docs/SpecialModelName.md)
|
- [SpecialModelName](docs/SpecialModelName.md)
|
||||||
- [StringBooleanMap](docs/StringBooleanMap.md)
|
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TypeHolderDefault](docs/TypeHolderDefault.md)
|
||||||
|
- [TypeHolderExample](docs/TypeHolderExample.md)
|
||||||
- [User](docs/User.md)
|
- [User](docs/User.md)
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ paths:
|
|||||||
summary: Add a new pet to the store
|
summary: Add a new pet to the store
|
||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
|
x-codegen-request-body-name: body
|
||||||
put:
|
put:
|
||||||
operationId: updatePet
|
operationId: updatePet
|
||||||
requestBody:
|
requestBody:
|
||||||
@ -71,6 +72,7 @@ paths:
|
|||||||
summary: Update an existing pet
|
summary: Update an existing pet
|
||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/pet/findByStatus:
|
/pet/findByStatus:
|
||||||
get:
|
get:
|
||||||
description: Multiple status values can be provided with comma separated strings
|
description: Multiple status values can be provided with comma separated strings
|
||||||
@ -327,6 +329,7 @@ paths:
|
|||||||
summary: Place an order for a pet
|
summary: Place an order for a pet
|
||||||
tags:
|
tags:
|
||||||
- store
|
- store
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/store/order/{order_id}:
|
/store/order/{order_id}:
|
||||||
delete:
|
delete:
|
||||||
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@ -398,6 +401,7 @@ paths:
|
|||||||
summary: Create user
|
summary: Create user
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/user/createWithArray:
|
/user/createWithArray:
|
||||||
post:
|
post:
|
||||||
operationId: createUsersWithArrayInput
|
operationId: createUsersWithArrayInput
|
||||||
@ -417,6 +421,7 @@ paths:
|
|||||||
summary: Creates list of users with given input array
|
summary: Creates list of users with given input array
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/user/createWithList:
|
/user/createWithList:
|
||||||
post:
|
post:
|
||||||
operationId: createUsersWithListInput
|
operationId: createUsersWithListInput
|
||||||
@ -436,6 +441,7 @@ paths:
|
|||||||
summary: Creates list of users with given input array
|
summary: Creates list of users with given input array
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/user/login:
|
/user/login:
|
||||||
get:
|
get:
|
||||||
operationId: loginUser
|
operationId: loginUser
|
||||||
@ -565,6 +571,7 @@ paths:
|
|||||||
summary: Updated user
|
summary: Updated user
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake_classname_test:
|
/fake_classname_test:
|
||||||
patch:
|
patch:
|
||||||
description: To test class name in snake case
|
description: To test class name in snake case
|
||||||
@ -588,7 +595,55 @@ paths:
|
|||||||
summary: To test class name in snake case
|
summary: To test class name in snake case
|
||||||
tags:
|
tags:
|
||||||
- fake_classname_tags 123#$%^
|
- fake_classname_tags 123#$%^
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake:
|
/fake:
|
||||||
|
delete:
|
||||||
|
description: Fake endpoint to test group parameters (optional)
|
||||||
|
operationId: testGroupParameters
|
||||||
|
parameters:
|
||||||
|
- description: Required String in group parameters
|
||||||
|
in: query
|
||||||
|
name: required_string_group
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- description: Required Boolean in group parameters
|
||||||
|
in: header
|
||||||
|
name: required_boolean_group
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
- description: Required Integer in group parameters
|
||||||
|
in: query
|
||||||
|
name: required_int64_group
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
- description: String in group parameters
|
||||||
|
in: query
|
||||||
|
name: string_group
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- description: Boolean in group parameters
|
||||||
|
in: header
|
||||||
|
name: boolean_group
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
- description: Integer in group parameters
|
||||||
|
in: query
|
||||||
|
name: int64_group
|
||||||
|
schema:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
responses:
|
||||||
|
400:
|
||||||
|
content: {}
|
||||||
|
description: Someting wrong
|
||||||
|
summary: Fake endpoint to test group parameters (optional)
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
x-group-parameters: true
|
||||||
get:
|
get:
|
||||||
description: To test enum parameters
|
description: To test enum parameters
|
||||||
operationId: testEnumParameters
|
operationId: testEnumParameters
|
||||||
@ -709,6 +764,7 @@ paths:
|
|||||||
summary: To test "client" model
|
summary: To test "client" model
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: body
|
||||||
post:
|
post:
|
||||||
description: |
|
description: |
|
||||||
Fake endpoint for testing various parameters
|
Fake endpoint for testing various parameters
|
||||||
@ -827,6 +883,7 @@ paths:
|
|||||||
description: Output number
|
description: Output number
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake/outer/string:
|
/fake/outer/string:
|
||||||
post:
|
post:
|
||||||
description: Test serialization of outer string types
|
description: Test serialization of outer string types
|
||||||
@ -847,6 +904,7 @@ paths:
|
|||||||
description: Output string
|
description: Output string
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake/outer/boolean:
|
/fake/outer/boolean:
|
||||||
post:
|
post:
|
||||||
description: Test serialization of outer boolean types
|
description: Test serialization of outer boolean types
|
||||||
@ -867,6 +925,7 @@ paths:
|
|||||||
description: Output boolean
|
description: Output boolean
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake/outer/composite:
|
/fake/outer/composite:
|
||||||
post:
|
post:
|
||||||
description: Test serialization of object with outer number type
|
description: Test serialization of object with outer number type
|
||||||
@ -887,6 +946,7 @@ paths:
|
|||||||
description: Output composite
|
description: Output composite
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake/jsonFormData:
|
/fake/jsonFormData:
|
||||||
get:
|
get:
|
||||||
operationId: testJsonFormData
|
operationId: testJsonFormData
|
||||||
@ -931,6 +991,7 @@ paths:
|
|||||||
summary: test inline additionalProperties
|
summary: test inline additionalProperties
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: param
|
||||||
/fake/body-with-query-params:
|
/fake/body-with-query-params:
|
||||||
put:
|
put:
|
||||||
operationId: testBodyWithQueryParams
|
operationId: testBodyWithQueryParams
|
||||||
@ -952,6 +1013,7 @@ paths:
|
|||||||
description: Success
|
description: Success
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/another-fake/dummy:
|
/another-fake/dummy:
|
||||||
patch:
|
patch:
|
||||||
description: To test special tags and operation ID starting with number
|
description: To test special tags and operation ID starting with number
|
||||||
@ -973,6 +1035,7 @@ paths:
|
|||||||
summary: To test special tags
|
summary: To test special tags
|
||||||
tags:
|
tags:
|
||||||
- $another-fake?
|
- $another-fake?
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake/body-with-file-schema:
|
/fake/body-with-file-schema:
|
||||||
put:
|
put:
|
||||||
description: For this test, the body for this request much reference a schema named `File`.
|
description: For this test, the body for this request much reference a schema named `File`.
|
||||||
@ -989,6 +1052,7 @@ paths:
|
|||||||
description: Success
|
description: Success
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/fake/{petId}/uploadImageWithRequiredFile:
|
/fake/{petId}/uploadImageWithRequiredFile:
|
||||||
post:
|
post:
|
||||||
operationId: uploadFileWithRequiredFile
|
operationId: uploadFileWithRequiredFile
|
||||||
@ -1031,16 +1095,53 @@ paths:
|
|||||||
- pet
|
- pet
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
|
Order:
|
||||||
|
example:
|
||||||
|
petId: 6
|
||||||
|
quantity: 1
|
||||||
|
id: 0
|
||||||
|
shipDate: 2000-01-23T04:56:07.000+00:00
|
||||||
|
complete: false
|
||||||
|
status: placed
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
petId:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
quantity:
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
shipDate:
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
description: Order Status
|
||||||
|
enum:
|
||||||
|
- placed
|
||||||
|
- approved
|
||||||
|
- delivered
|
||||||
|
type: string
|
||||||
|
complete:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
xml:
|
||||||
|
name: Order
|
||||||
Category:
|
Category:
|
||||||
example:
|
example:
|
||||||
name: name
|
name: default-name
|
||||||
id: 6
|
id: 6
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
name:
|
name:
|
||||||
|
default: default-name
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
type: object
|
type: object
|
||||||
xml:
|
xml:
|
||||||
name: Category
|
name: Category
|
||||||
@ -1078,45 +1179,72 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
xml:
|
xml:
|
||||||
name: User
|
name: User
|
||||||
OuterNumber:
|
Tag:
|
||||||
type: number
|
example:
|
||||||
ArrayOfNumberOnly:
|
name: name
|
||||||
|
id: 1
|
||||||
properties:
|
properties:
|
||||||
ArrayNumber:
|
id:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
xml:
|
||||||
|
name: Tag
|
||||||
|
Pet:
|
||||||
|
example:
|
||||||
|
photoUrls:
|
||||||
|
- photoUrls
|
||||||
|
- photoUrls
|
||||||
|
name: doggie
|
||||||
|
id: 0
|
||||||
|
category:
|
||||||
|
name: default-name
|
||||||
|
id: 6
|
||||||
|
tags:
|
||||||
|
- name: name
|
||||||
|
id: 1
|
||||||
|
- name: name
|
||||||
|
id: 1
|
||||||
|
status: available
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
x-is-unique: true
|
||||||
|
category:
|
||||||
|
$ref: '#/components/schemas/Category'
|
||||||
|
name:
|
||||||
|
example: doggie
|
||||||
|
type: string
|
||||||
|
photoUrls:
|
||||||
items:
|
items:
|
||||||
type: number
|
type: string
|
||||||
type: array
|
type: array
|
||||||
|
xml:
|
||||||
|
name: photoUrl
|
||||||
|
wrapped: true
|
||||||
|
tags:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Tag'
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
name: tag
|
||||||
|
wrapped: true
|
||||||
|
status:
|
||||||
|
description: pet status in the store
|
||||||
|
enum:
|
||||||
|
- available
|
||||||
|
- pending
|
||||||
|
- sold
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- photoUrls
|
||||||
type: object
|
type: object
|
||||||
Capitalization:
|
xml:
|
||||||
properties:
|
name: Pet
|
||||||
smallCamel:
|
|
||||||
type: string
|
|
||||||
CapitalCamel:
|
|
||||||
type: string
|
|
||||||
small_Snake:
|
|
||||||
type: string
|
|
||||||
Capital_Snake:
|
|
||||||
type: string
|
|
||||||
SCA_ETH_Flow_Points:
|
|
||||||
type: string
|
|
||||||
ATT_NAME:
|
|
||||||
description: |
|
|
||||||
Name of the pet
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
MixedPropertiesAndAdditionalPropertiesClass:
|
|
||||||
properties:
|
|
||||||
uuid:
|
|
||||||
format: uuid
|
|
||||||
type: string
|
|
||||||
dateTime:
|
|
||||||
format: date-time
|
|
||||||
type: string
|
|
||||||
map:
|
|
||||||
additionalProperties:
|
|
||||||
$ref: '#/components/schemas/Animal'
|
|
||||||
type: object
|
|
||||||
type: object
|
|
||||||
ApiResponse:
|
ApiResponse:
|
||||||
example:
|
example:
|
||||||
code: 0
|
code: 0
|
||||||
@ -1131,6 +1259,23 @@ components:
|
|||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
$special[model.name]:
|
||||||
|
properties:
|
||||||
|
$special[property.name]:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
xml:
|
||||||
|
name: $special[model.name]
|
||||||
|
Return:
|
||||||
|
description: Model for testing reserved words
|
||||||
|
properties:
|
||||||
|
return:
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
xml:
|
||||||
|
name: Return
|
||||||
Name:
|
Name:
|
||||||
description: Model for testing model name same as property name
|
description: Model for testing model name same as property name
|
||||||
properties:
|
properties:
|
||||||
@ -1151,23 +1296,6 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
xml:
|
xml:
|
||||||
name: Name
|
name: Name
|
||||||
EnumClass:
|
|
||||||
default: -efg
|
|
||||||
enum:
|
|
||||||
- _abc
|
|
||||||
- -efg
|
|
||||||
- (xyz)
|
|
||||||
type: string
|
|
||||||
List:
|
|
||||||
properties:
|
|
||||||
123-list:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
NumberOnly:
|
|
||||||
properties:
|
|
||||||
JustNumber:
|
|
||||||
type: number
|
|
||||||
type: object
|
|
||||||
200_response:
|
200_response:
|
||||||
description: Model for testing model name starting with number
|
description: Model for testing model name starting with number
|
||||||
properties:
|
properties:
|
||||||
@ -1179,11 +1307,10 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
xml:
|
xml:
|
||||||
name: Name
|
name: Name
|
||||||
Client:
|
ClassModel:
|
||||||
example:
|
description: Model for testing model with "_class" property
|
||||||
client: client
|
|
||||||
properties:
|
properties:
|
||||||
client:
|
_class:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
Dog:
|
Dog:
|
||||||
@ -1193,158 +1320,29 @@ components:
|
|||||||
breed:
|
breed:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
Enum_Test:
|
Cat:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/Animal'
|
||||||
|
- properties:
|
||||||
|
declawed:
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
Animal:
|
||||||
|
discriminator:
|
||||||
|
propertyName: className
|
||||||
properties:
|
properties:
|
||||||
enum_string:
|
className:
|
||||||
enum:
|
|
||||||
- UPPER
|
|
||||||
- lower
|
|
||||||
- ""
|
|
||||||
type: string
|
type: string
|
||||||
enum_string_required:
|
color:
|
||||||
enum:
|
default: red
|
||||||
- UPPER
|
|
||||||
- lower
|
|
||||||
- ""
|
|
||||||
type: string
|
type: string
|
||||||
enum_integer:
|
|
||||||
enum:
|
|
||||||
- 1
|
|
||||||
- -1
|
|
||||||
format: int32
|
|
||||||
type: integer
|
|
||||||
enum_number:
|
|
||||||
enum:
|
|
||||||
- 1.1
|
|
||||||
- -1.2
|
|
||||||
format: double
|
|
||||||
type: number
|
|
||||||
outerEnum:
|
|
||||||
$ref: '#/components/schemas/OuterEnum'
|
|
||||||
required:
|
required:
|
||||||
- enum_string_required
|
- className
|
||||||
type: object
|
|
||||||
Order:
|
|
||||||
example:
|
|
||||||
petId: 6
|
|
||||||
quantity: 1
|
|
||||||
id: 0
|
|
||||||
shipDate: 2000-01-23T04:56:07.000+00:00
|
|
||||||
complete: false
|
|
||||||
status: placed
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
format: int64
|
|
||||||
type: integer
|
|
||||||
petId:
|
|
||||||
format: int64
|
|
||||||
type: integer
|
|
||||||
quantity:
|
|
||||||
format: int32
|
|
||||||
type: integer
|
|
||||||
shipDate:
|
|
||||||
format: date-time
|
|
||||||
type: string
|
|
||||||
status:
|
|
||||||
description: Order Status
|
|
||||||
enum:
|
|
||||||
- placed
|
|
||||||
- approved
|
|
||||||
- delivered
|
|
||||||
type: string
|
|
||||||
complete:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
type: object
|
|
||||||
xml:
|
|
||||||
name: Order
|
|
||||||
AdditionalPropertiesClass:
|
|
||||||
properties:
|
|
||||||
map_property:
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
map_of_map_property:
|
|
||||||
additionalProperties:
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
type: object
|
|
||||||
type: object
|
|
||||||
$special[model.name]:
|
|
||||||
properties:
|
|
||||||
$special[property.name]:
|
|
||||||
format: int64
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
xml:
|
|
||||||
name: $special[model.name]
|
|
||||||
Return:
|
|
||||||
description: Model for testing reserved words
|
|
||||||
properties:
|
|
||||||
return:
|
|
||||||
format: int32
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
xml:
|
|
||||||
name: Return
|
|
||||||
ReadOnlyFirst:
|
|
||||||
properties:
|
|
||||||
bar:
|
|
||||||
readOnly: true
|
|
||||||
type: string
|
|
||||||
baz:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
ArrayOfArrayOfNumberOnly:
|
|
||||||
properties:
|
|
||||||
ArrayArrayNumber:
|
|
||||||
items:
|
|
||||||
items:
|
|
||||||
type: number
|
|
||||||
type: array
|
|
||||||
type: array
|
|
||||||
type: object
|
|
||||||
OuterEnum:
|
|
||||||
enum:
|
|
||||||
- placed
|
|
||||||
- approved
|
|
||||||
- delivered
|
|
||||||
type: string
|
|
||||||
ArrayTest:
|
|
||||||
properties:
|
|
||||||
array_of_string:
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
array_array_of_integer:
|
|
||||||
items:
|
|
||||||
items:
|
|
||||||
format: int64
|
|
||||||
type: integer
|
|
||||||
type: array
|
|
||||||
type: array
|
|
||||||
array_array_of_model:
|
|
||||||
items:
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/ReadOnlyFirst'
|
|
||||||
type: array
|
|
||||||
type: array
|
|
||||||
type: object
|
|
||||||
OuterComposite:
|
|
||||||
example:
|
|
||||||
my_string: my_string
|
|
||||||
my_number: 0.80082819046101150206595775671303272247314453125
|
|
||||||
my_boolean: true
|
|
||||||
properties:
|
|
||||||
my_number:
|
|
||||||
type: number
|
|
||||||
my_string:
|
|
||||||
type: string
|
|
||||||
my_boolean:
|
|
||||||
type: boolean
|
|
||||||
x-codegen-body-parameter-name: boolean_post_body
|
|
||||||
type: object
|
type: object
|
||||||
|
AnimalFarm:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Animal'
|
||||||
|
type: array
|
||||||
format_test:
|
format_test:
|
||||||
properties:
|
properties:
|
||||||
integer:
|
integer:
|
||||||
@ -1403,70 +1401,116 @@ components:
|
|||||||
- number
|
- number
|
||||||
- password
|
- password
|
||||||
type: object
|
type: object
|
||||||
EnumArrays:
|
EnumClass:
|
||||||
properties:
|
default: -efg
|
||||||
just_symbol:
|
enum:
|
||||||
enum:
|
- _abc
|
||||||
- '>='
|
- -efg
|
||||||
- $
|
- (xyz)
|
||||||
type: string
|
|
||||||
array_enum:
|
|
||||||
items:
|
|
||||||
enum:
|
|
||||||
- fish
|
|
||||||
- crab
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
type: object
|
|
||||||
OuterString:
|
|
||||||
type: string
|
type: string
|
||||||
ClassModel:
|
Enum_Test:
|
||||||
description: Model for testing model with "_class" property
|
|
||||||
properties:
|
properties:
|
||||||
_class:
|
enum_string:
|
||||||
|
enum:
|
||||||
|
- UPPER
|
||||||
|
- lower
|
||||||
|
- ""
|
||||||
type: string
|
type: string
|
||||||
type: object
|
enum_string_required:
|
||||||
OuterBoolean:
|
enum:
|
||||||
type: boolean
|
- UPPER
|
||||||
x-codegen-body-parameter-name: boolean_post_body
|
- lower
|
||||||
FileSchemaTestClass:
|
- ""
|
||||||
example:
|
|
||||||
file:
|
|
||||||
sourceURI: sourceURI
|
|
||||||
files:
|
|
||||||
- sourceURI: sourceURI
|
|
||||||
- sourceURI: sourceURI
|
|
||||||
properties:
|
|
||||||
file:
|
|
||||||
$ref: '#/components/schemas/File'
|
|
||||||
files:
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/File'
|
|
||||||
type: array
|
|
||||||
type: object
|
|
||||||
Animal:
|
|
||||||
discriminator:
|
|
||||||
propertyName: className
|
|
||||||
properties:
|
|
||||||
className:
|
|
||||||
type: string
|
|
||||||
color:
|
|
||||||
default: red
|
|
||||||
type: string
|
type: string
|
||||||
|
enum_integer:
|
||||||
|
enum:
|
||||||
|
- 1
|
||||||
|
- -1
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
enum_number:
|
||||||
|
enum:
|
||||||
|
- 1.1
|
||||||
|
- -1.2
|
||||||
|
format: double
|
||||||
|
type: number
|
||||||
|
outerEnum:
|
||||||
|
$ref: '#/components/schemas/OuterEnum'
|
||||||
required:
|
required:
|
||||||
- className
|
- enum_string_required
|
||||||
type: object
|
type: object
|
||||||
StringBooleanMap:
|
AdditionalPropertiesClass:
|
||||||
additionalProperties:
|
properties:
|
||||||
type: boolean
|
map_property:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
map_of_map_property:
|
||||||
|
additionalProperties:
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
MixedPropertiesAndAdditionalPropertiesClass:
|
||||||
|
properties:
|
||||||
|
uuid:
|
||||||
|
format: uuid
|
||||||
|
type: string
|
||||||
|
dateTime:
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
map:
|
||||||
|
additionalProperties:
|
||||||
|
$ref: '#/components/schemas/Animal'
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
List:
|
||||||
|
properties:
|
||||||
|
123-list:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Client:
|
||||||
|
example:
|
||||||
|
client: client
|
||||||
|
properties:
|
||||||
|
client:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
ReadOnlyFirst:
|
||||||
|
properties:
|
||||||
|
bar:
|
||||||
|
readOnly: true
|
||||||
|
type: string
|
||||||
|
baz:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
hasOnlyReadOnly:
|
||||||
|
properties:
|
||||||
|
bar:
|
||||||
|
readOnly: true
|
||||||
|
type: string
|
||||||
|
foo:
|
||||||
|
readOnly: true
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
Capitalization:
|
||||||
|
properties:
|
||||||
|
smallCamel:
|
||||||
|
type: string
|
||||||
|
CapitalCamel:
|
||||||
|
type: string
|
||||||
|
small_Snake:
|
||||||
|
type: string
|
||||||
|
Capital_Snake:
|
||||||
|
type: string
|
||||||
|
SCA_ETH_Flow_Points:
|
||||||
|
type: string
|
||||||
|
ATT_NAME:
|
||||||
|
description: |
|
||||||
|
Name of the pet
|
||||||
|
type: string
|
||||||
type: object
|
type: object
|
||||||
Cat:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/components/schemas/Animal'
|
|
||||||
- properties:
|
|
||||||
declawed:
|
|
||||||
type: boolean
|
|
||||||
type: object
|
|
||||||
MapTest:
|
MapTest:
|
||||||
properties:
|
properties:
|
||||||
map_map_of_string:
|
map_map_of_string:
|
||||||
@ -1491,23 +1535,108 @@ components:
|
|||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
Tag:
|
ArrayTest:
|
||||||
example:
|
|
||||||
name: name
|
|
||||||
id: 1
|
|
||||||
properties:
|
properties:
|
||||||
id:
|
array_of_string:
|
||||||
format: int64
|
items:
|
||||||
type: integer
|
type: string
|
||||||
name:
|
type: array
|
||||||
type: string
|
array_array_of_integer:
|
||||||
|
items:
|
||||||
|
items:
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
type: array
|
||||||
|
type: array
|
||||||
|
array_array_of_model:
|
||||||
|
items:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/ReadOnlyFirst'
|
||||||
|
type: array
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
NumberOnly:
|
||||||
|
properties:
|
||||||
|
JustNumber:
|
||||||
|
type: number
|
||||||
|
type: object
|
||||||
|
ArrayOfNumberOnly:
|
||||||
|
properties:
|
||||||
|
ArrayNumber:
|
||||||
|
items:
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
ArrayOfArrayOfNumberOnly:
|
||||||
|
properties:
|
||||||
|
ArrayArrayNumber:
|
||||||
|
items:
|
||||||
|
items:
|
||||||
|
type: number
|
||||||
|
type: array
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
EnumArrays:
|
||||||
|
properties:
|
||||||
|
just_symbol:
|
||||||
|
enum:
|
||||||
|
- '>='
|
||||||
|
- $
|
||||||
|
type: string
|
||||||
|
array_enum:
|
||||||
|
items:
|
||||||
|
enum:
|
||||||
|
- fish
|
||||||
|
- crab
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
OuterEnum:
|
||||||
|
enum:
|
||||||
|
- placed
|
||||||
|
- approved
|
||||||
|
- delivered
|
||||||
|
type: string
|
||||||
|
OuterComposite:
|
||||||
|
example:
|
||||||
|
my_string: my_string
|
||||||
|
my_number: 0.80082819046101150206595775671303272247314453125
|
||||||
|
my_boolean: true
|
||||||
|
properties:
|
||||||
|
my_number:
|
||||||
|
type: number
|
||||||
|
my_string:
|
||||||
|
type: string
|
||||||
|
my_boolean:
|
||||||
|
type: boolean
|
||||||
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
|
type: object
|
||||||
|
OuterNumber:
|
||||||
|
type: number
|
||||||
|
OuterString:
|
||||||
|
type: string
|
||||||
|
OuterBoolean:
|
||||||
|
type: boolean
|
||||||
|
x-codegen-body-parameter-name: boolean_post_body
|
||||||
|
StringBooleanMap:
|
||||||
|
additionalProperties:
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
FileSchemaTestClass:
|
||||||
|
example:
|
||||||
|
file:
|
||||||
|
sourceURI: sourceURI
|
||||||
|
files:
|
||||||
|
- sourceURI: sourceURI
|
||||||
|
- sourceURI: sourceURI
|
||||||
|
properties:
|
||||||
|
file:
|
||||||
|
$ref: '#/components/schemas/File'
|
||||||
|
files:
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/File'
|
||||||
|
type: array
|
||||||
type: object
|
type: object
|
||||||
xml:
|
|
||||||
name: Tag
|
|
||||||
AnimalFarm:
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/Animal'
|
|
||||||
type: array
|
|
||||||
File:
|
File:
|
||||||
description: Must be named `File` for test.
|
description: Must be named `File` for test.
|
||||||
example:
|
example:
|
||||||
@ -1517,67 +1646,58 @@ components:
|
|||||||
description: Test capitalization
|
description: Test capitalization
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
Pet:
|
TypeHolderDefault:
|
||||||
example:
|
|
||||||
photoUrls:
|
|
||||||
- photoUrls
|
|
||||||
- photoUrls
|
|
||||||
name: doggie
|
|
||||||
id: 0
|
|
||||||
category:
|
|
||||||
name: name
|
|
||||||
id: 6
|
|
||||||
tags:
|
|
||||||
- name: name
|
|
||||||
id: 1
|
|
||||||
- name: name
|
|
||||||
id: 1
|
|
||||||
status: available
|
|
||||||
properties:
|
properties:
|
||||||
id:
|
string_item:
|
||||||
format: int64
|
default: what
|
||||||
|
type: string
|
||||||
|
number_item:
|
||||||
|
type: number
|
||||||
|
integer_item:
|
||||||
type: integer
|
type: integer
|
||||||
x-is-unique: true
|
bool_item:
|
||||||
category:
|
default: true
|
||||||
$ref: '#/components/schemas/Category'
|
type: boolean
|
||||||
name:
|
array_item:
|
||||||
example: doggie
|
|
||||||
type: string
|
|
||||||
photoUrls:
|
|
||||||
items:
|
items:
|
||||||
type: string
|
type: integer
|
||||||
type: array
|
type: array
|
||||||
xml:
|
|
||||||
name: photoUrl
|
|
||||||
wrapped: true
|
|
||||||
tags:
|
|
||||||
items:
|
|
||||||
$ref: '#/components/schemas/Tag'
|
|
||||||
type: array
|
|
||||||
xml:
|
|
||||||
name: tag
|
|
||||||
wrapped: true
|
|
||||||
status:
|
|
||||||
description: pet status in the store
|
|
||||||
enum:
|
|
||||||
- available
|
|
||||||
- pending
|
|
||||||
- sold
|
|
||||||
type: string
|
|
||||||
required:
|
required:
|
||||||
- name
|
- array_item
|
||||||
- photoUrls
|
- bool_item
|
||||||
|
- integer_item
|
||||||
|
- number_item
|
||||||
|
- string_item
|
||||||
type: object
|
type: object
|
||||||
xml:
|
TypeHolderExample:
|
||||||
name: Pet
|
|
||||||
hasOnlyReadOnly:
|
|
||||||
properties:
|
properties:
|
||||||
bar:
|
string_item:
|
||||||
readOnly: true
|
example: what
|
||||||
type: string
|
|
||||||
foo:
|
|
||||||
readOnly: true
|
|
||||||
type: string
|
type: string
|
||||||
|
number_item:
|
||||||
|
example: 1.234
|
||||||
|
type: number
|
||||||
|
integer_item:
|
||||||
|
example: -2
|
||||||
|
type: integer
|
||||||
|
bool_item:
|
||||||
|
example: true
|
||||||
|
type: boolean
|
||||||
|
array_item:
|
||||||
|
example:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- array_item
|
||||||
|
- bool_item
|
||||||
|
- integer_item
|
||||||
|
- number_item
|
||||||
|
- string_item
|
||||||
type: object
|
type: object
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
petstore_auth:
|
petstore_auth:
|
||||||
@ -1588,9 +1708,6 @@ components:
|
|||||||
write:pets: modify pets in your account
|
write:pets: modify pets in your account
|
||||||
read:pets: read your pets
|
read:pets: read your pets
|
||||||
type: oauth2
|
type: oauth2
|
||||||
http_basic_test:
|
|
||||||
scheme: basic
|
|
||||||
type: http
|
|
||||||
api_key:
|
api_key:
|
||||||
in: header
|
in: header
|
||||||
name: api_key
|
name: api_key
|
||||||
@ -1599,3 +1716,6 @@ components:
|
|||||||
in: query
|
in: query
|
||||||
name: api_key_query
|
name: api_key_query
|
||||||
type: apiKey
|
type: apiKey
|
||||||
|
http_basic_test:
|
||||||
|
scheme: basic
|
||||||
|
type: http
|
||||||
|
@ -29,10 +29,10 @@ type AnotherFakeApiService service
|
|||||||
AnotherFakeApiService To test special tags
|
AnotherFakeApiService To test special tags
|
||||||
To test special tags and operation ID starting with number
|
To test special tags and operation ID starting with number
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param client client model
|
* @param body client model
|
||||||
@return Client
|
@return Client
|
||||||
*/
|
*/
|
||||||
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, client Client) (Client, *http.Response, error) {
|
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, body Client) (Client, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Patch")
|
localVarHttpMethod = strings.ToUpper("Patch")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -67,7 +67,7 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, clie
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &client
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return localVarReturnValue, nil, err
|
return localVarReturnValue, nil, err
|
||||||
@ -84,14 +84,6 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, clie
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -110,5 +102,14 @@ func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, clie
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
@ -95,14 +95,6 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -121,6 +113,15 @@ func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVar
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,12 +130,12 @@ FakeApiService
|
|||||||
Test serialization of object with outer number type
|
Test serialization of object with outer number type
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters:
|
* @param optional nil or *FakeOuterCompositeSerializeOpts - Optional Parameters:
|
||||||
* @param "OuterComposite" (optional.Interface of OuterComposite) - Input composite as post body
|
* @param "Body" (optional.Interface of OuterComposite) - Input composite as post body
|
||||||
@return OuterComposite
|
@return OuterComposite
|
||||||
*/
|
*/
|
||||||
|
|
||||||
type FakeOuterCompositeSerializeOpts struct {
|
type FakeOuterCompositeSerializeOpts struct {
|
||||||
OuterComposite optional.Interface
|
Body optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) {
|
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) {
|
||||||
@ -172,12 +173,12 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
if localVarOptionals != nil && localVarOptionals.OuterComposite.IsSet() {
|
if localVarOptionals != nil && localVarOptionals.Body.IsSet() {
|
||||||
localVarOptionalOuterComposite, localVarOptionalOuterCompositeok := localVarOptionals.OuterComposite.Value().(OuterComposite)
|
localVarOptionalBody, localVarOptionalBodyok := localVarOptionals.Body.Value().(OuterComposite)
|
||||||
if !localVarOptionalOuterCompositeok {
|
if !localVarOptionalBodyok {
|
||||||
return localVarReturnValue, nil, reportError("outerComposite should be OuterComposite")
|
return localVarReturnValue, nil, reportError("body should be OuterComposite")
|
||||||
}
|
}
|
||||||
localVarPostBody = &localVarOptionalOuterComposite
|
localVarPostBody = &localVarOptionalBody
|
||||||
}
|
}
|
||||||
|
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
@ -196,14 +197,6 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -222,6 +215,15 @@ func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localV
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,14 +295,6 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -319,6 +313,15 @@ func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarO
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -390,14 +393,6 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -416,6 +411,15 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,9 +427,9 @@ func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarO
|
|||||||
FakeApiService
|
FakeApiService
|
||||||
For this test, the body for this request much reference a schema named `File`.
|
For this test, the body for this request much reference a schema named `File`.
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param fileSchemaTestClass
|
* @param body
|
||||||
*/
|
*/
|
||||||
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaTestClass FileSchemaTestClass) (*http.Response, error) {
|
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, body FileSchemaTestClass) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -459,7 +463,7 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaT
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &fileSchemaTestClass
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -491,9 +495,9 @@ func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaT
|
|||||||
FakeApiService
|
FakeApiService
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param query
|
* @param query
|
||||||
* @param user
|
* @param body
|
||||||
*/
|
*/
|
||||||
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, user User) (*http.Response, error) {
|
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, body User) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -528,7 +532,7 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &user
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -560,10 +564,10 @@ func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query stri
|
|||||||
FakeApiService To test \"client\" model
|
FakeApiService To test \"client\" model
|
||||||
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 ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param client client model
|
* @param body client model
|
||||||
@return Client
|
@return Client
|
||||||
*/
|
*/
|
||||||
func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Client, *http.Response, error) {
|
func (a *FakeApiService) TestClientModel(ctx context.Context, body Client) (Client, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Patch")
|
localVarHttpMethod = strings.ToUpper("Patch")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -598,7 +602,7 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &client
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return localVarReturnValue, nil, err
|
return localVarReturnValue, nil, err
|
||||||
@ -615,14 +619,6 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -641,6 +637,15 @@ func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Cl
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -906,12 +911,103 @@ func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptiona
|
|||||||
return localVarHttpResponse, nil
|
return localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
FakeApiService Fake endpoint to test group parameters (optional)
|
||||||
|
Fake endpoint to test group parameters (optional)
|
||||||
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
|
* @param requiredStringGroup Required String in group parameters
|
||||||
|
* @param requiredBooleanGroup Required Boolean in group parameters
|
||||||
|
* @param requiredInt64Group Required Integer in group parameters
|
||||||
|
* @param optional nil or *TestGroupParametersOpts - Optional Parameters:
|
||||||
|
* @param "StringGroup" (optional.Int32) - String in group parameters
|
||||||
|
* @param "BooleanGroup" (optional.Bool) - Boolean in group parameters
|
||||||
|
* @param "Int64Group" (optional.Int64) - Integer in group parameters
|
||||||
|
*/
|
||||||
|
|
||||||
|
type TestGroupParametersOpts struct {
|
||||||
|
StringGroup optional.Int32
|
||||||
|
BooleanGroup optional.Bool
|
||||||
|
Int64Group optional.Int64
|
||||||
|
}
|
||||||
|
|
||||||
|
func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) {
|
||||||
|
var (
|
||||||
|
localVarHttpMethod = strings.ToUpper("Delete")
|
||||||
|
localVarPostBody interface{}
|
||||||
|
localVarFormFileName string
|
||||||
|
localVarFileName string
|
||||||
|
localVarFileBytes []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
localVarPath := a.client.cfg.BasePath + "/fake"
|
||||||
|
|
||||||
|
localVarHeaderParams := make(map[string]string)
|
||||||
|
localVarQueryParams := url.Values{}
|
||||||
|
localVarFormParams := url.Values{}
|
||||||
|
|
||||||
|
localVarQueryParams.Add("required_string_group", parameterToString(requiredStringGroup, ""))
|
||||||
|
localVarQueryParams.Add("required_int64_group", parameterToString(requiredInt64Group, ""))
|
||||||
|
if localVarOptionals != nil && localVarOptionals.StringGroup.IsSet() {
|
||||||
|
localVarQueryParams.Add("string_group", parameterToString(localVarOptionals.StringGroup.Value(), ""))
|
||||||
|
}
|
||||||
|
if localVarOptionals != nil && localVarOptionals.Int64Group.IsSet() {
|
||||||
|
localVarQueryParams.Add("int64_group", parameterToString(localVarOptionals.Int64Group.Value(), ""))
|
||||||
|
}
|
||||||
|
// to determine the Content-Type header
|
||||||
|
localVarHttpContentTypes := []string{}
|
||||||
|
|
||||||
|
// set Content-Type header
|
||||||
|
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes)
|
||||||
|
if localVarHttpContentType != "" {
|
||||||
|
localVarHeaderParams["Content-Type"] = localVarHttpContentType
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
localVarHttpHeaderAccepts := []string{}
|
||||||
|
|
||||||
|
// set Accept header
|
||||||
|
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
|
||||||
|
if localVarHttpHeaderAccept != "" {
|
||||||
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
|
}
|
||||||
|
localVarHeaderParams["required_boolean_group"] = parameterToString(requiredBooleanGroup, "")
|
||||||
|
if localVarOptionals != nil && localVarOptionals.BooleanGroup.IsSet() {
|
||||||
|
localVarHeaderParams["boolean_group"] = parameterToString(localVarOptionals.BooleanGroup.Value(), "")
|
||||||
|
}
|
||||||
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHttpResponse, err := a.client.callAPI(r)
|
||||||
|
if err != nil || localVarHttpResponse == nil {
|
||||||
|
return localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
|
||||||
|
localVarHttpResponse.Body.Close()
|
||||||
|
if err != nil {
|
||||||
|
return localVarHttpResponse, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: localVarHttpResponse.Status,
|
||||||
|
}
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
|
return localVarHttpResponse, nil
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FakeApiService test inline additionalProperties
|
FakeApiService test inline additionalProperties
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param requestBody request body
|
* @param param request body
|
||||||
*/
|
*/
|
||||||
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, requestBody map[string]string) (*http.Response, error) {
|
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, param map[string]string) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -945,7 +1041,7 @@ func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, req
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &requestBody
|
localVarPostBody = ¶m
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -29,10 +29,10 @@ type FakeClassnameTags123ApiService service
|
|||||||
FakeClassnameTags123ApiService To test class name in snake case
|
FakeClassnameTags123ApiService To test class name in snake case
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param client client model
|
* @param body client model
|
||||||
@return Client
|
@return Client
|
||||||
*/
|
*/
|
||||||
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, client Client) (Client, *http.Response, error) {
|
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, body Client) (Client, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Patch")
|
localVarHttpMethod = strings.ToUpper("Patch")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -67,7 +67,7 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &client
|
localVarPostBody = &body
|
||||||
if ctx != nil {
|
if ctx != nil {
|
||||||
// API Key Authentication
|
// API Key Authentication
|
||||||
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
|
if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok {
|
||||||
@ -97,14 +97,6 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -123,5 +115,14 @@ func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, clie
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
@ -31,9 +31,9 @@ type PetApiService service
|
|||||||
/*
|
/*
|
||||||
PetApiService Add a new pet to the store
|
PetApiService Add a new pet to the store
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param pet Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store
|
||||||
*/
|
*/
|
||||||
func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, error) {
|
func (a *PetApiService) AddPet(ctx context.Context, body Pet) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -67,7 +67,7 @@ func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, er
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &pet
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -229,14 +229,6 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -255,6 +247,15 @@ func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) (
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,14 +317,6 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -342,6 +335,15 @@ func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pe
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -416,14 +418,6 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -442,15 +436,24 @@ func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PetApiService Update an existing pet
|
PetApiService Update an existing pet
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param pet Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store
|
||||||
*/
|
*/
|
||||||
func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response, error) {
|
func (a *PetApiService) UpdatePet(ctx context.Context, body Pet) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -484,7 +487,7 @@ func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response,
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &pet
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -677,14 +680,6 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -703,6 +698,15 @@ func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOpt
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -782,14 +786,6 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -808,5 +804,14 @@ func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId in
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
@ -162,14 +162,6 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -188,6 +180,15 @@ func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -255,14 +256,6 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -281,16 +274,25 @@ func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Orde
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
StoreApiService Place an order for a pet
|
StoreApiService Place an order for a pet
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param order order placed for purchasing the pet
|
* @param body order placed for purchasing the pet
|
||||||
@return Order
|
@return Order
|
||||||
*/
|
*/
|
||||||
func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *http.Response, error) {
|
func (a *StoreApiService) PlaceOrder(ctx context.Context, body Order) (Order, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -325,7 +327,7 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &order
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return localVarReturnValue, nil, err
|
return localVarReturnValue, nil, err
|
||||||
@ -342,14 +344,6 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -368,5 +362,14 @@ func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
@ -30,9 +30,9 @@ type UserApiService service
|
|||||||
UserApiService Create user
|
UserApiService Create user
|
||||||
This can only be done by the logged in user.
|
This can only be done by the logged in user.
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param user Created user object
|
* @param body Created user object
|
||||||
*/
|
*/
|
||||||
func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Response, error) {
|
func (a *UserApiService) CreateUser(ctx context.Context, body User) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -66,7 +66,7 @@ func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Respo
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &user
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -97,9 +97,9 @@ func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Respo
|
|||||||
/*
|
/*
|
||||||
UserApiService Creates list of users with given input array
|
UserApiService Creates list of users with given input array
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param user List of user object
|
* @param body List of user object
|
||||||
*/
|
*/
|
||||||
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (*http.Response, error) {
|
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, body []User) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -133,7 +133,7 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &user
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -164,9 +164,9 @@ func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []U
|
|||||||
/*
|
/*
|
||||||
UserApiService Creates list of users with given input array
|
UserApiService Creates list of users with given input array
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param user List of user object
|
* @param body List of user object
|
||||||
*/
|
*/
|
||||||
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (*http.Response, error) {
|
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, body []User) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -200,7 +200,7 @@ func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []Us
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &user
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -352,14 +352,6 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -378,6 +370,15 @@ func (a *UserApiService) GetUserByName(ctx context.Context, username string) (Us
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -440,14 +441,6 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
|
|||||||
return localVarReturnValue, localVarHttpResponse, err
|
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericOpenAPIError{
|
newErr := GenericOpenAPIError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
@ -466,6 +459,15 @@ func (a *UserApiService) LoginUser(ctx context.Context, username string, passwor
|
|||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
|
if err != nil {
|
||||||
|
newErr := GenericOpenAPIError{
|
||||||
|
body: localVarBody,
|
||||||
|
error: err.Error(),
|
||||||
|
}
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -538,9 +540,9 @@ UserApiService Updated user
|
|||||||
This can only be done by the logged in user.
|
This can only be done by the logged in user.
|
||||||
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted
|
||||||
* @param user Updated user object
|
* @param body Updated user object
|
||||||
*/
|
*/
|
||||||
func (a *UserApiService) UpdateUser(ctx context.Context, username string, user User) (*http.Response, error) {
|
func (a *UserApiService) UpdateUser(ctx context.Context, username string, body User) (*http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
@ -575,7 +577,7 @@ func (a *UserApiService) UpdateUser(ctx context.Context, username string, user U
|
|||||||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &user
|
localVarPostBody = &body
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# AnimalFarm
|
|
||||||
|
|
||||||
## 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)
|
|
||||||
|
|
||||||
|
|
@ -8,7 +8,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
|
|
||||||
# **Call123TestSpecialTags**
|
# **Call123TestSpecialTags**
|
||||||
> Client Call123TestSpecialTags(ctx, client)
|
> Client Call123TestSpecialTags(ctx, body)
|
||||||
To test special tags
|
To test special tags
|
||||||
|
|
||||||
To test special tags and operation ID starting with number
|
To test special tags and operation ID starting with number
|
||||||
@ -18,7 +18,7 @@ To test special tags and operation ID starting with number
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**client** | [**Client**](Client.md)| client model |
|
**body** | [**Client**](Client.md)| client model |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**Id** | **int64** | | [optional]
|
**Id** | **int64** | | [optional]
|
||||||
**Name** | **string** | | [optional]
|
**Name** | **string** | | [default to default-name]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ Method | HTTP request | Description
|
|||||||
[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model
|
[**TestClientModel**](FakeApi.md#TestClientModel) | **Patch** /fake | To test \"client\" model
|
||||||
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**TestEndpointParameters**](FakeApi.md#TestEndpointParameters) | **Post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters
|
[**TestEnumParameters**](FakeApi.md#TestEnumParameters) | **Get** /fake | To test enum parameters
|
||||||
|
[**TestGroupParameters**](FakeApi.md#TestGroupParameters) | **Delete** /fake | Fake endpoint to test group parameters (optional)
|
||||||
[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
|
[**TestInlineAdditionalProperties**](FakeApi.md#TestInlineAdditionalProperties) | **Post** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
|
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
@ -70,7 +71,7 @@ Optional parameters are passed through a pointer to a FakeOuterCompositeSerializ
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**outerComposite** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body |
|
**body** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -158,7 +159,7 @@ No authorization required
|
|||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **TestBodyWithFileSchema**
|
# **TestBodyWithFileSchema**
|
||||||
> TestBodyWithFileSchema(ctx, fileSchemaTestClass)
|
> TestBodyWithFileSchema(ctx, body)
|
||||||
|
|
||||||
|
|
||||||
For this test, the body for this request much reference a schema named `File`.
|
For this test, the body for this request much reference a schema named `File`.
|
||||||
@ -168,7 +169,7 @@ For this test, the body for this request much reference a schema named `File`.
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -186,7 +187,7 @@ No authorization required
|
|||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **TestBodyWithQueryParams**
|
# **TestBodyWithQueryParams**
|
||||||
> TestBodyWithQueryParams(ctx, query, user)
|
> TestBodyWithQueryParams(ctx, query, body)
|
||||||
|
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
@ -195,7 +196,7 @@ Name | Type | Description | Notes
|
|||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**query** | **string**| |
|
**query** | **string**| |
|
||||||
**user** | [**User**](User.md)| |
|
**body** | [**User**](User.md)| |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -213,7 +214,7 @@ No authorization required
|
|||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **TestClientModel**
|
# **TestClientModel**
|
||||||
> Client TestClientModel(ctx, client)
|
> Client TestClientModel(ctx, body)
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
@ -223,7 +224,7 @@ To test \"client\" model
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**client** | [**Client**](Client.md)| client model |
|
**body** | [**Client**](Client.md)| client model |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -334,8 +335,51 @@ No authorization required
|
|||||||
|
|
||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
|
# **TestGroupParameters**
|
||||||
|
> TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional)
|
||||||
|
Fake endpoint to test group parameters (optional)
|
||||||
|
|
||||||
|
Fake endpoint to test group parameters (optional)
|
||||||
|
|
||||||
|
### Required Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
|
**requiredStringGroup** | **int32**| Required String in group parameters |
|
||||||
|
**requiredBooleanGroup** | **bool**| Required Boolean in group parameters |
|
||||||
|
**requiredInt64Group** | **int64**| Required Integer in group parameters |
|
||||||
|
**optional** | ***TestGroupParametersOpts** | optional parameters | nil if no parameters
|
||||||
|
|
||||||
|
### Optional Parameters
|
||||||
|
Optional parameters are passed through a pointer to a TestGroupParametersOpts struct
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**stringGroup** | **optional.Int32**| String in group parameters |
|
||||||
|
**booleanGroup** | **optional.Bool**| Boolean in group parameters |
|
||||||
|
**int64Group** | **optional.Int64**| Integer in group parameters |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **TestInlineAdditionalProperties**
|
# **TestInlineAdditionalProperties**
|
||||||
> TestInlineAdditionalProperties(ctx, requestBody)
|
> TestInlineAdditionalProperties(ctx, param)
|
||||||
test inline additionalProperties
|
test inline additionalProperties
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
@ -343,7 +387,7 @@ test inline additionalProperties
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**requestBody** | [**map[string]string**](string.md)| request body |
|
**param** | [**map[string]string**](string.md)| request body |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
|
|
||||||
# **TestClassname**
|
# **TestClassname**
|
||||||
> Client TestClassname(ctx, client)
|
> Client TestClassname(ctx, body)
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
@ -18,7 +18,7 @@ To test class name in snake case
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**client** | [**Client**](Client.md)| client model |
|
**body** | [**Client**](Client.md)| client model |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
|
|
||||||
# **AddPet**
|
# **AddPet**
|
||||||
> AddPet(ctx, pet)
|
> AddPet(ctx, body)
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
@ -24,7 +24,7 @@ Add a new pet to the store
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ Name | Type | Description | Notes
|
|||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[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)
|
||||||
|
|
||||||
# **UpdatePet**
|
# **UpdatePet**
|
||||||
> UpdatePet(ctx, pet)
|
> UpdatePet(ctx, body)
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
@ -169,7 +169,7 @@ Update an existing pet
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ No authorization required
|
|||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **PlaceOrder**
|
# **PlaceOrder**
|
||||||
> Order PlaceOrder(ctx, order)
|
> Order PlaceOrder(ctx, body)
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
@ -99,7 +99,7 @@ Place an order for a pet
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
# 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)
|
|
||||||
|
|
||||||
|
|
@ -15,7 +15,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
|
|
||||||
# **CreateUser**
|
# **CreateUser**
|
||||||
> CreateUser(ctx, user)
|
> CreateUser(ctx, body)
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
This can only be done by the logged in user.
|
||||||
@ -25,7 +25,7 @@ This can only be done by the logged in user.
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**user** | [**User**](User.md)| Created user object |
|
**body** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ No authorization required
|
|||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **CreateUsersWithArrayInput**
|
# **CreateUsersWithArrayInput**
|
||||||
> CreateUsersWithArrayInput(ctx, user)
|
> CreateUsersWithArrayInput(ctx, body)
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
@ -51,7 +51,7 @@ Creates list of users with given input array
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**user** | [**[]User**](array.md)| List of user object |
|
**body** | [**[]User**](array.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ No authorization required
|
|||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **CreateUsersWithListInput**
|
# **CreateUsersWithListInput**
|
||||||
> CreateUsersWithListInput(ctx, user)
|
> CreateUsersWithListInput(ctx, body)
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
### Required Parameters
|
### Required Parameters
|
||||||
@ -77,7 +77,7 @@ Creates list of users with given input array
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**user** | [**[]User**](array.md)| List of user object |
|
**body** | [**[]User**](array.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ No authorization required
|
|||||||
[[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)
|
[[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)
|
||||||
|
|
||||||
# **UpdateUser**
|
# **UpdateUser**
|
||||||
> UpdateUser(ctx, username, user)
|
> UpdateUser(ctx, username, body)
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
This can only be done by the logged in user.
|
||||||
@ -209,7 +209,7 @@ Name | Type | Description | Notes
|
|||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||||
**username** | **string**| name that need to be deleted |
|
**username** | **string**| name that need to be deleted |
|
||||||
**user** | [**User**](User.md)| Updated user object |
|
**body** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
type AnimalFarm struct {
|
|
||||||
}
|
|
@ -12,5 +12,5 @@ package petstore
|
|||||||
|
|
||||||
type Category struct {
|
type Category struct {
|
||||||
Id int64 `json:"id,omitempty" xml:"id"`
|
Id int64 `json:"id,omitempty" xml:"id"`
|
||||||
Name string `json:"name,omitempty" xml:"name"`
|
Name string `json:"name" xml:"name"`
|
||||||
}
|
}
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
||||||
|
|
||||||
package petstore
|
|
||||||
|
|
||||||
type StringBooleanMap struct {
|
|
||||||
}
|
|
@ -1 +1 @@
|
|||||||
3.3.0-SNAPSHOT
|
4.0.0-SNAPSHOT
|
@ -40,6 +40,7 @@ paths:
|
|||||||
summary: Add a new pet to the store
|
summary: Add a new pet to the store
|
||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
|
x-codegen-request-body-name: body
|
||||||
put:
|
put:
|
||||||
operationId: updatePet
|
operationId: updatePet
|
||||||
requestBody:
|
requestBody:
|
||||||
@ -69,6 +70,7 @@ paths:
|
|||||||
summary: Update an existing pet
|
summary: Update an existing pet
|
||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/pet/findByStatus:
|
/pet/findByStatus:
|
||||||
get:
|
get:
|
||||||
description: Multiple status values can be provided with comma separated strings
|
description: Multiple status values can be provided with comma separated strings
|
||||||
@ -325,6 +327,7 @@ paths:
|
|||||||
summary: Place an order for a pet
|
summary: Place an order for a pet
|
||||||
tags:
|
tags:
|
||||||
- store
|
- store
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/store/order/{orderId}:
|
/store/order/{orderId}:
|
||||||
delete:
|
delete:
|
||||||
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
@ -396,6 +399,7 @@ paths:
|
|||||||
summary: Create user
|
summary: Create user
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/user/createWithArray:
|
/user/createWithArray:
|
||||||
post:
|
post:
|
||||||
operationId: createUsersWithArrayInput
|
operationId: createUsersWithArrayInput
|
||||||
@ -415,6 +419,7 @@ paths:
|
|||||||
summary: Creates list of users with given input array
|
summary: Creates list of users with given input array
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/user/createWithList:
|
/user/createWithList:
|
||||||
post:
|
post:
|
||||||
operationId: createUsersWithListInput
|
operationId: createUsersWithListInput
|
||||||
@ -434,6 +439,7 @@ paths:
|
|||||||
summary: Creates list of users with given input array
|
summary: Creates list of users with given input array
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
/user/login:
|
/user/login:
|
||||||
get:
|
get:
|
||||||
operationId: loginUser
|
operationId: loginUser
|
||||||
@ -563,6 +569,7 @@ paths:
|
|||||||
summary: Updated user
|
summary: Updated user
|
||||||
tags:
|
tags:
|
||||||
- user
|
- user
|
||||||
|
x-codegen-request-body-name: body
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Order:
|
Order:
|
||||||
|
@ -11,6 +11,7 @@ package petstoreserver
|
|||||||
|
|
||||||
// ApiResponse - Describes the result of uploading an image resource
|
// ApiResponse - Describes the result of uploading an image resource
|
||||||
type ApiResponse struct {
|
type ApiResponse struct {
|
||||||
|
|
||||||
Code int32 `json:"code,omitempty"`
|
Code int32 `json:"code,omitempty"`
|
||||||
|
|
||||||
Type string `json:"type,omitempty"`
|
Type string `json:"type,omitempty"`
|
||||||
|
@ -11,6 +11,7 @@ package petstoreserver
|
|||||||
|
|
||||||
// Category - A category for a pet
|
// Category - A category for a pet
|
||||||
type Category struct {
|
type Category struct {
|
||||||
|
|
||||||
Id int64 `json:"id,omitempty"`
|
Id int64 `json:"id,omitempty"`
|
||||||
|
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
@ -15,6 +15,7 @@ import (
|
|||||||
|
|
||||||
// Order - An order for a pets from the pet store
|
// Order - An order for a pets from the pet store
|
||||||
type Order struct {
|
type Order struct {
|
||||||
|
|
||||||
Id int64 `json:"id,omitempty"`
|
Id int64 `json:"id,omitempty"`
|
||||||
|
|
||||||
PetId int64 `json:"petId,omitempty"`
|
PetId int64 `json:"petId,omitempty"`
|
||||||
|
@ -11,9 +11,10 @@ package petstoreserver
|
|||||||
|
|
||||||
// Pet - A pet for sale in the pet store
|
// Pet - A pet for sale in the pet store
|
||||||
type Pet struct {
|
type Pet struct {
|
||||||
|
|
||||||
Id int64 `json:"id,omitempty"`
|
Id int64 `json:"id,omitempty"`
|
||||||
|
|
||||||
Category *Category `json:"category,omitempty"`
|
Category Category `json:"category,omitempty"`
|
||||||
|
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ package petstoreserver
|
|||||||
|
|
||||||
// Tag - A tag for a pet
|
// Tag - A tag for a pet
|
||||||
type Tag struct {
|
type Tag struct {
|
||||||
|
|
||||||
Id int64 `json:"id,omitempty"`
|
Id int64 `json:"id,omitempty"`
|
||||||
|
|
||||||
Name string `json:"name,omitempty"`
|
Name string `json:"name,omitempty"`
|
||||||
|
@ -11,6 +11,7 @@ package petstoreserver
|
|||||||
|
|
||||||
// User - A User who is purchasing from the pet store
|
// User - A User who is purchasing from the pet store
|
||||||
type User struct {
|
type User struct {
|
||||||
|
|
||||||
Id int64 `json:"id,omitempty"`
|
Id int64 `json:"id,omitempty"`
|
||||||
|
|
||||||
Username string `json:"username,omitempty"`
|
Username string `json:"username,omitempty"`
|
||||||
|
@ -14,7 +14,7 @@ type Pet struct {
|
|||||||
|
|
||||||
Id int64 `json:"id,omitempty"`
|
Id int64 `json:"id,omitempty"`
|
||||||
|
|
||||||
Category *Category `json:"category,omitempty"`
|
Category Category `json:"category,omitempty"`
|
||||||
|
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user