mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-18 22:17:05 +00:00
Merge remote-tracking branch 'origin/4.1.x' into sync_41x_50x
This commit is contained in:
@@ -1 +1 @@
|
||||
4.0.0-SNAPSHOT
|
||||
4.0.2-SNAPSHOT
|
||||
@@ -12,7 +12,8 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
|
||||
## Installation
|
||||
|
||||
Install the following dependencies:
|
||||
```
|
||||
|
||||
```shell
|
||||
go get github.com/stretchr/testify/assert
|
||||
go get golang.org/x/oauth2
|
||||
go get golang.org/x/net/context
|
||||
@@ -20,6 +21,7 @@ go get github.com/antihax/optional
|
||||
```
|
||||
|
||||
Put the package under your project folder and add the following in import:
|
||||
|
||||
```golang
|
||||
import "./petstore"
|
||||
```
|
||||
@@ -79,10 +81,12 @@ Class | Method | HTTP request | Description
|
||||
- [ArrayTest](docs/ArrayTest.md)
|
||||
- [Capitalization](docs/Capitalization.md)
|
||||
- [Cat](docs/Cat.md)
|
||||
- [CatAllOf](docs/CatAllOf.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [ClassModel](docs/ClassModel.md)
|
||||
- [Client](docs/Client.md)
|
||||
- [Dog](docs/Dog.md)
|
||||
- [DogAllOf](docs/DogAllOf.md)
|
||||
- [EnumArrays](docs/EnumArrays.md)
|
||||
- [EnumClass](docs/EnumClass.md)
|
||||
- [EnumTest](docs/EnumTest.md)
|
||||
@@ -104,6 +108,7 @@ Class | Method | HTTP request | Description
|
||||
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
- [Model200Response](docs/Model200Response.md)
|
||||
- [Name](docs/Name.md)
|
||||
- [NullableClass](docs/NullableClass.md)
|
||||
- [NumberOnly](docs/NumberOnly.md)
|
||||
- [Order](docs/Order.md)
|
||||
- [OuterComposite](docs/OuterComposite.md)
|
||||
@@ -121,51 +126,71 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
|
||||
## api_key
|
||||
- **Type**: API key
|
||||
|
||||
- **Type**: API key
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
|
||||
Key: "APIKEY",
|
||||
Prefix: "Bearer", // Omit if not necessary.
|
||||
Key: "APIKEY",
|
||||
Prefix: "Bearer", // Omit if not necessary.
|
||||
})
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
|
||||
## api_key_query
|
||||
- **Type**: API key
|
||||
|
||||
- **Type**: API key
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
|
||||
Key: "APIKEY",
|
||||
Prefix: "Bearer", // Omit if not necessary.
|
||||
Key: "APIKEY",
|
||||
Prefix: "Bearer", // Omit if not necessary.
|
||||
})
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
|
||||
## bearer_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
|
||||
UserName: "username",
|
||||
Password: "password",
|
||||
UserName: "username",
|
||||
Password: "password",
|
||||
})
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
|
||||
## http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
|
||||
UserName: "username",
|
||||
Password: "password",
|
||||
UserName: "username",
|
||||
Password: "password",
|
||||
})
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
|
||||
## petstore_auth
|
||||
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
@@ -174,12 +199,14 @@ r, err := client.Service.Operation(auth, args)
|
||||
- **read:pets**: read your pets
|
||||
|
||||
Example
|
||||
|
||||
```golang
|
||||
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "ACCESSTOKENSTRING")
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
|
||||
|
||||
```golang
|
||||
import "golang.org/x/oauth2"
|
||||
|
||||
@@ -190,6 +217,7 @@ auth := context.WithValue(oauth2.NoContext, sw.ContextOAuth2, tokenSource)
|
||||
r, err := client.Service.Operation(auth, args)
|
||||
```
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
||||
@@ -130,7 +130,8 @@ paths:
|
||||
/pet/findByTags:
|
||||
get:
|
||||
deprecated: true
|
||||
description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
description: Multiple tags can be provided with comma separated strings. Use
|
||||
tag1, tag2, tag3 for testing.
|
||||
operationId: findPetsByTags
|
||||
parameters:
|
||||
- description: Tags to filter by
|
||||
@@ -350,7 +351,8 @@ paths:
|
||||
- store
|
||||
/store/order/{order_id}:
|
||||
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
|
||||
operationId: deleteOrder
|
||||
parameters:
|
||||
- description: ID of the order that needs to be deleted
|
||||
@@ -370,7 +372,8 @@ paths:
|
||||
tags:
|
||||
- store
|
||||
get:
|
||||
description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
description: For valid response try integer IDs with value <= 5 or > 10. Other
|
||||
values will generated exceptions
|
||||
operationId: getOrderById
|
||||
parameters:
|
||||
- description: ID of pet that needs to be fetched
|
||||
@@ -604,7 +607,6 @@ paths:
|
||||
name: required_string_group
|
||||
required: true
|
||||
schema:
|
||||
format: int32
|
||||
type: integer
|
||||
style: form
|
||||
- description: Required Boolean in group parameters
|
||||
@@ -630,7 +632,6 @@ paths:
|
||||
name: string_group
|
||||
required: false
|
||||
schema:
|
||||
format: int32
|
||||
type: integer
|
||||
style: form
|
||||
- description: Boolean in group parameters
|
||||
@@ -803,7 +804,6 @@ paths:
|
||||
properties:
|
||||
integer:
|
||||
description: None
|
||||
format: int32
|
||||
maximum: 100
|
||||
minimum: 10
|
||||
type: integer
|
||||
@@ -1045,7 +1045,8 @@ paths:
|
||||
- $another-fake?
|
||||
/fake/body-with-file-schema:
|
||||
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`.
|
||||
operationId: testBodyWithFileSchema
|
||||
requestBody:
|
||||
content:
|
||||
@@ -1368,7 +1369,6 @@ components:
|
||||
property:
|
||||
type: string
|
||||
123Number:
|
||||
format: int32
|
||||
readOnly: true
|
||||
type: integer
|
||||
required:
|
||||
@@ -1393,17 +1393,11 @@ components:
|
||||
Dog:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Animal'
|
||||
- properties:
|
||||
breed:
|
||||
type: string
|
||||
type: object
|
||||
- $ref: '#/components/schemas/Dog_allOf'
|
||||
Cat:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Animal'
|
||||
- properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
type: object
|
||||
- $ref: '#/components/schemas/Cat_allOf'
|
||||
Animal:
|
||||
discriminator:
|
||||
propertyName: className
|
||||
@@ -1423,7 +1417,6 @@ components:
|
||||
format_test:
|
||||
properties:
|
||||
integer:
|
||||
format: int32
|
||||
maximum: 100
|
||||
minimum: 10
|
||||
type: integer
|
||||
@@ -1478,7 +1471,8 @@ components:
|
||||
pattern: ^\d{10}$
|
||||
type: string
|
||||
pattern_with_digits_and_delimiter:
|
||||
description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
|
||||
description: A string starting with 'image_' (case insensitive) and one
|
||||
to three digits following i.e. Image_01.
|
||||
pattern: /^image_\d{1,3}$/i
|
||||
type: string
|
||||
required:
|
||||
@@ -1625,6 +1619,7 @@ components:
|
||||
indirect_map:
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
type: object
|
||||
type: object
|
||||
ArrayTest:
|
||||
properties:
|
||||
@@ -1693,7 +1688,6 @@ components:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
format: int32
|
||||
type: integer
|
||||
OuterEnumDefaultValue:
|
||||
default: placed
|
||||
@@ -1708,7 +1702,6 @@ components:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
format: int32
|
||||
type: integer
|
||||
OuterComposite:
|
||||
example:
|
||||
@@ -1734,6 +1727,7 @@ components:
|
||||
StringBooleanMap:
|
||||
additionalProperties:
|
||||
type: boolean
|
||||
type: object
|
||||
FileSchemaTestClass:
|
||||
example:
|
||||
file:
|
||||
@@ -1766,7 +1760,8 @@ components:
|
||||
xml:
|
||||
name: $special[model.name]
|
||||
HealthCheckResult:
|
||||
description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
|
||||
description: Just a string to inform instance is up and running. Make it nullable
|
||||
in hope to get it as pointer in generated model.
|
||||
example:
|
||||
NullableMessage: NullableMessage
|
||||
properties:
|
||||
@@ -1774,6 +1769,64 @@ components:
|
||||
nullable: true
|
||||
type: string
|
||||
type: object
|
||||
NullableClass:
|
||||
additionalProperties:
|
||||
nullable: true
|
||||
type: object
|
||||
properties:
|
||||
integer_prop:
|
||||
nullable: true
|
||||
type: integer
|
||||
number_prop:
|
||||
nullable: true
|
||||
type: number
|
||||
boolean_prop:
|
||||
nullable: true
|
||||
type: boolean
|
||||
string_prop:
|
||||
nullable: true
|
||||
type: string
|
||||
date_prop:
|
||||
format: date
|
||||
nullable: true
|
||||
type: string
|
||||
datetime_prop:
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
array_nullable_prop:
|
||||
items:
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
array_and_items_nullable_prop:
|
||||
items:
|
||||
nullable: true
|
||||
type: object
|
||||
nullable: true
|
||||
type: array
|
||||
array_items_nullable:
|
||||
items:
|
||||
nullable: true
|
||||
type: object
|
||||
type: array
|
||||
object_nullable_prop:
|
||||
additionalProperties:
|
||||
type: object
|
||||
nullable: true
|
||||
type: object
|
||||
object_and_items_nullable_prop:
|
||||
additionalProperties:
|
||||
nullable: true
|
||||
type: object
|
||||
nullable: true
|
||||
type: object
|
||||
object_items_nullable:
|
||||
additionalProperties:
|
||||
nullable: true
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
inline_response_default:
|
||||
example:
|
||||
string:
|
||||
@@ -1824,7 +1877,6 @@ components:
|
||||
properties:
|
||||
integer:
|
||||
description: None
|
||||
format: int32
|
||||
maximum: 100
|
||||
minimum: 10
|
||||
type: integer
|
||||
@@ -1917,6 +1969,14 @@ components:
|
||||
required:
|
||||
- requiredFile
|
||||
type: object
|
||||
Dog_allOf:
|
||||
properties:
|
||||
breed:
|
||||
type: string
|
||||
Cat_allOf:
|
||||
properties:
|
||||
declawed:
|
||||
type: boolean
|
||||
securitySchemes:
|
||||
petstore_auth:
|
||||
flows:
|
||||
|
||||
@@ -14,7 +14,6 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@@ -33,7 +32,7 @@ To test special tags and operation ID starting with number
|
||||
*/
|
||||
func (a *AnotherFakeApiService) Call123TestSpecialTags(ctx context.Context, client Client) (Client, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Patch")
|
||||
localVarHttpMethod = http.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
|
||||
@@ -14,7 +14,6 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@@ -31,7 +30,7 @@ DefaultApiService
|
||||
*/
|
||||
func (a *DefaultApiService) FooGet(ctx context.Context) (InlineResponseDefault, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
|
||||
@@ -14,7 +14,6 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"github.com/antihax/optional"
|
||||
"os"
|
||||
)
|
||||
@@ -33,7 +32,7 @@ FakeApiService Health check endpoint
|
||||
*/
|
||||
func (a *FakeApiService) FakeHealthGet(ctx context.Context) (HealthCheckResult, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -126,7 +125,7 @@ type FakeOuterBooleanSerializeOpts struct {
|
||||
|
||||
func (a *FakeApiService) FakeOuterBooleanSerialize(ctx context.Context, localVarOptionals *FakeOuterBooleanSerializeOpts) (bool, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -224,7 +223,7 @@ type FakeOuterCompositeSerializeOpts struct {
|
||||
|
||||
func (a *FakeApiService) FakeOuterCompositeSerialize(ctx context.Context, localVarOptionals *FakeOuterCompositeSerializeOpts) (OuterComposite, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -326,7 +325,7 @@ type FakeOuterNumberSerializeOpts struct {
|
||||
|
||||
func (a *FakeApiService) FakeOuterNumberSerialize(ctx context.Context, localVarOptionals *FakeOuterNumberSerializeOpts) (float32, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -424,7 +423,7 @@ type FakeOuterStringSerializeOpts struct {
|
||||
|
||||
func (a *FakeApiService) FakeOuterStringSerialize(ctx context.Context, localVarOptionals *FakeOuterStringSerializeOpts) (string, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -515,7 +514,7 @@ For this test, the body for this request much reference a schema named `Fil
|
||||
*/
|
||||
func (a *FakeApiService) TestBodyWithFileSchema(ctx context.Context, fileSchemaTestClass FileSchemaTestClass) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarHttpMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -583,7 +582,7 @@ FakeApiService
|
||||
*/
|
||||
func (a *FakeApiService) TestBodyWithQueryParams(ctx context.Context, query string, user User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarHttpMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -653,7 +652,7 @@ To test \"client\" model
|
||||
*/
|
||||
func (a *FakeApiService) TestClientModel(ctx context.Context, client Client) (Client, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Patch")
|
||||
localVarHttpMethod = http.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -769,7 +768,7 @@ type TestEndpointParametersOpts struct {
|
||||
|
||||
func (a *FakeApiService) TestEndpointParameters(ctx context.Context, number float32, double float64, patternWithoutDelimiter string, byte_ string, localVarOptionals *TestEndpointParametersOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -913,7 +912,7 @@ type TestEnumParametersOpts struct {
|
||||
|
||||
func (a *FakeApiService) TestEnumParameters(ctx context.Context, localVarOptionals *TestEnumParametersOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -1016,7 +1015,7 @@ type TestGroupParametersOpts struct {
|
||||
|
||||
func (a *FakeApiService) TestGroupParameters(ctx context.Context, requiredStringGroup int32, requiredBooleanGroup bool, requiredInt64Group int64, localVarOptionals *TestGroupParametersOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Delete")
|
||||
localVarHttpMethod = http.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -1093,7 +1092,7 @@ FakeApiService test inline additionalProperties
|
||||
*/
|
||||
func (a *FakeApiService) TestInlineAdditionalProperties(ctx context.Context, requestBody map[string]string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -1161,7 +1160,7 @@ FakeApiService test json serialization of form data
|
||||
*/
|
||||
func (a *FakeApiService) TestJsonFormData(ctx context.Context, param string, param2 string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
|
||||
@@ -14,7 +14,6 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@@ -33,7 +32,7 @@ To test class name in snake case
|
||||
*/
|
||||
func (a *FakeClassnameTags123ApiService) TestClassname(ctx context.Context, client Client) (Client, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Patch")
|
||||
localVarHttpMethod = http.MethodPatch
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"strings"
|
||||
"github.com/antihax/optional"
|
||||
"os"
|
||||
)
|
||||
@@ -34,7 +34,7 @@ PetApiService Add a new pet to the store
|
||||
*/
|
||||
func (a *PetApiService) AddPet(ctx context.Context, pet Pet) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -108,7 +108,7 @@ type DeletePetOpts struct {
|
||||
|
||||
func (a *PetApiService) DeletePet(ctx context.Context, petId int64, localVarOptionals *DeletePetOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Delete")
|
||||
localVarHttpMethod = http.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -179,7 +179,7 @@ Multiple status values can be provided with comma separated strings
|
||||
*/
|
||||
func (a *PetApiService) FindPetsByStatus(ctx context.Context, status []string) ([]Pet, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -267,7 +267,7 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
*/
|
||||
func (a *PetApiService) FindPetsByTags(ctx context.Context, tags []string) ([]Pet, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -355,7 +355,7 @@ Returns a single pet
|
||||
*/
|
||||
func (a *PetApiService) GetPetById(ctx context.Context, petId int64) (Pet, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -453,7 +453,7 @@ PetApiService Update an existing pet
|
||||
*/
|
||||
func (a *PetApiService) UpdatePet(ctx context.Context, pet Pet) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarHttpMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -529,7 +529,7 @@ type UpdatePetWithFormOpts struct {
|
||||
|
||||
func (a *PetApiService) UpdatePetWithForm(ctx context.Context, petId int64, localVarOptionals *UpdatePetWithFormOpts) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -611,7 +611,7 @@ type UploadFileOpts struct {
|
||||
|
||||
func (a *PetApiService) UploadFile(ctx context.Context, petId int64, localVarOptionals *UploadFileOpts) (ApiResponse, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -724,7 +724,7 @@ type UploadFileWithRequiredFileOpts struct {
|
||||
|
||||
func (a *PetApiService) UploadFileWithRequiredFile(ctx context.Context, petId int64, requiredFile *os.File, localVarOptionals *UploadFileWithRequiredFileOpts) (ApiResponse, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@@ -33,7 +33,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or
|
||||
*/
|
||||
func (a *StoreApiService) DeleteOrder(ctx context.Context, orderId string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Delete")
|
||||
localVarHttpMethod = http.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -100,7 +100,7 @@ Returns a map of status codes to quantities
|
||||
*/
|
||||
func (a *StoreApiService) GetInventory(ctx context.Context) (map[string]int32, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -199,7 +199,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
||||
*/
|
||||
func (a *StoreApiService) GetOrderById(ctx context.Context, orderId int64) (Order, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -292,7 +292,7 @@ StoreApiService Place an order for a pet
|
||||
*/
|
||||
func (a *StoreApiService) PlaceOrder(ctx context.Context, order Order) (Order, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
|
||||
@@ -14,8 +14,8 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@@ -33,7 +33,7 @@ This can only be done by the logged in user.
|
||||
*/
|
||||
func (a *UserApiService) CreateUser(ctx context.Context, user User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -100,7 +100,7 @@ UserApiService Creates list of users with given input array
|
||||
*/
|
||||
func (a *UserApiService) CreateUsersWithArrayInput(ctx context.Context, user []User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -167,7 +167,7 @@ UserApiService Creates list of users with given input array
|
||||
*/
|
||||
func (a *UserApiService) CreateUsersWithListInput(ctx context.Context, user []User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarHttpMethod = http.MethodPost
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -235,7 +235,7 @@ This can only be done by the logged in user.
|
||||
*/
|
||||
func (a *UserApiService) DeleteUser(ctx context.Context, username string) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Delete")
|
||||
localVarHttpMethod = http.MethodDelete
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -302,7 +302,7 @@ UserApiService Get user by user name
|
||||
*/
|
||||
func (a *UserApiService) GetUserByName(ctx context.Context, username string) (User, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -390,7 +390,7 @@ UserApiService Logs user into the system
|
||||
*/
|
||||
func (a *UserApiService) LoginUser(ctx context.Context, username string, password string) (string, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -476,7 +476,7 @@ UserApiService Logs out current logged in user session
|
||||
*/
|
||||
func (a *UserApiService) LogoutUser(ctx context.Context) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarHttpMethod = http.MethodGet
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
@@ -543,7 +543,7 @@ This can only be done by the logged in user.
|
||||
*/
|
||||
func (a *UserApiService) UpdateUser(ctx context.Context, username string, user User) (*http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarHttpMethod = http.MethodPut
|
||||
localVarPostBody interface{}
|
||||
localVarFormFileName string
|
||||
localVarFileName string
|
||||
|
||||
@@ -232,10 +232,11 @@ func (c *APIClient) prepareRequest(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// Set the Boundary in the Content-Type
|
||||
headerParams["Content-Type"] = w.FormDataContentType()
|
||||
}
|
||||
|
||||
// Set the Boundary in the Content-Type
|
||||
headerParams["Content-Type"] = w.FormDataContentType()
|
||||
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
w.Close()
|
||||
@@ -257,6 +258,16 @@ func (c *APIClient) prepareRequest(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Override request host, if applicable
|
||||
if c.cfg.Host != "" {
|
||||
url.Host = c.cfg.Host
|
||||
}
|
||||
|
||||
// Override request scheme, if applicable
|
||||
if c.cfg.Scheme != "" {
|
||||
url.Scheme = c.cfg.Scheme
|
||||
}
|
||||
|
||||
// Adding Query Param
|
||||
query := url.Query()
|
||||
for k, v := range queryParams {
|
||||
@@ -287,11 +298,6 @@ func (c *APIClient) prepareRequest(
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
||||
// Override request host, if applicable
|
||||
if c.cfg.Host != "" {
|
||||
localVarRequest.Host = c.cfg.Host
|
||||
}
|
||||
|
||||
// Add the user agent to the request.
|
||||
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||
|
||||
@@ -331,6 +337,10 @@ func (c *APIClient) prepareRequest(
|
||||
}
|
||||
|
||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||
if s, ok := v.(*string); ok {
|
||||
*s = string(b)
|
||||
return nil
|
||||
}
|
||||
if xmlCheck.MatchString(contentType) {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
@@ -385,7 +395,7 @@ func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err e
|
||||
} else if jsonCheck.MatchString(contentType) {
|
||||
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||
} else if xmlCheck.MatchString(contentType) {
|
||||
xml.NewEncoder(bodyBuf).Encode(body)
|
||||
err = xml.NewEncoder(bodyBuf).Encode(body)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# AdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**MapProperty** | **map[string]string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Animal
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
|
||||
@@ -7,7 +7,9 @@ Method | HTTP request | Description
|
||||
[**Call123TestSpecialTags**](AnotherFakeApi.md#Call123TestSpecialTags) | **Patch** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
# **Call123TestSpecialTags**
|
||||
|
||||
## Call123TestSpecialTags
|
||||
|
||||
> Client Call123TestSpecialTags(ctx, client)
|
||||
To test special tags
|
||||
|
||||
@@ -15,10 +17,11 @@ To test special tags and operation ID starting with number
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -30,8 +33,10 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# ApiResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Code** | **int32** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# ArrayOfArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ArrayArrayNumber** | [**[][]float32**](array.md) | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# ArrayOfNumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ArrayNumber** | **[]float32** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# ArrayTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ArrayOfString** | **[]string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Capitalization
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SmallCamel** | **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Cat
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# CatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Declawed** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Category
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **int64** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# ClassModel
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Class** | **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Client
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Client** | **string** | | [optional]
|
||||
|
||||
@@ -7,11 +7,14 @@ Method | HTTP request | Description
|
||||
[**FooGet**](DefaultApi.md#FooGet) | **Get** /foo |
|
||||
|
||||
|
||||
# **FooGet**
|
||||
|
||||
## FooGet
|
||||
|
||||
> InlineResponseDefault FooGet(ctx, )
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@@ -24,8 +27,10 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Dog
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**ClassName** | **string** | |
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# DogAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Breed** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# EnumArrays
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**JustSymbol** | **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# EnumClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# EnumTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**EnumString** | **string** | | [optional]
|
||||
|
||||
@@ -19,11 +19,14 @@ Method | HTTP request | Description
|
||||
[**TestJsonFormData**](FakeApi.md#TestJsonFormData) | **Get** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
# **FakeHealthGet**
|
||||
|
||||
## FakeHealthGet
|
||||
|
||||
> HealthCheckResult FakeHealthGet(ctx, )
|
||||
Health check endpoint
|
||||
|
||||
### Required Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@@ -36,12 +39,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
## FakeOuterBooleanSerialize
|
||||
|
||||
# **FakeOuterBooleanSerialize**
|
||||
> bool FakeOuterBooleanSerialize(ctx, optional)
|
||||
|
||||
|
||||
@@ -49,14 +56,17 @@ Test serialization of outer boolean types
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
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.
|
||||
**optional** | ***FakeOuterBooleanSerializeOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a FakeOuterBooleanSerializeOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **optional.Bool**| Input boolean as post body |
|
||||
@@ -71,12 +81,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[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)
|
||||
|
||||
|
||||
## FakeOuterCompositeSerialize
|
||||
|
||||
# **FakeOuterCompositeSerialize**
|
||||
> OuterComposite FakeOuterCompositeSerialize(ctx, optional)
|
||||
|
||||
|
||||
@@ -84,14 +98,17 @@ Test serialization of object with outer number type
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
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.
|
||||
**optional** | ***FakeOuterCompositeSerializeOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a FakeOuterCompositeSerializeOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**outerComposite** | [**optional.Interface of OuterComposite**](OuterComposite.md)| Input composite as post body |
|
||||
@@ -106,12 +123,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[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)
|
||||
|
||||
|
||||
## FakeOuterNumberSerialize
|
||||
|
||||
# **FakeOuterNumberSerialize**
|
||||
> float32 FakeOuterNumberSerialize(ctx, optional)
|
||||
|
||||
|
||||
@@ -119,14 +140,17 @@ Test serialization of outer number types
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
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.
|
||||
**optional** | ***FakeOuterNumberSerializeOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a FakeOuterNumberSerializeOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **optional.Float32**| Input number as post body |
|
||||
@@ -141,12 +165,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[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)
|
||||
|
||||
|
||||
## FakeOuterStringSerialize
|
||||
|
||||
# **FakeOuterStringSerialize**
|
||||
> string FakeOuterStringSerialize(ctx, optional)
|
||||
|
||||
|
||||
@@ -154,14 +182,17 @@ Test serialization of outer string types
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
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.
|
||||
**optional** | ***FakeOuterStringSerializeOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a FakeOuterStringSerializeOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | **optional.String**| Input string as post body |
|
||||
@@ -176,12 +207,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: */*
|
||||
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -189,10 +224,11 @@ For this test, the body for this request much reference a schema named `File`.
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -204,22 +240,27 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**query** | **string**| |
|
||||
**user** | [**User**](User.md)| |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**query** | **string**| |
|
||||
**user** | [**User**](User.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -231,12 +272,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
[[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)
|
||||
To test \"client\" model
|
||||
|
||||
@@ -244,10 +289,11 @@ To test \"client\" model
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -259,12 +305,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
## TestEndpointParameters
|
||||
|
||||
# **TestEndpointParameters**
|
||||
> TestEndpointParameters(ctx, number, double, patternWithoutDelimiter, byte_, optional)
|
||||
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
|
||||
@@ -272,18 +322,21 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**number** | **float32**| None |
|
||||
**double** | **float64**| None |
|
||||
**patternWithoutDelimiter** | **string**| None |
|
||||
**byte_** | **string**| None |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**number** | **float32**| None |
|
||||
**double** | **float64**| None |
|
||||
**patternWithoutDelimiter** | **string**| None |
|
||||
**byte_** | **string**| None |
|
||||
**optional** | ***TestEndpointParametersOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a TestEndpointParametersOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
@@ -311,12 +364,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## TestEnumParameters
|
||||
|
||||
# **TestEnumParameters**
|
||||
> TestEnumParameters(ctx, optional)
|
||||
To test enum parameters
|
||||
|
||||
@@ -324,14 +381,17 @@ To test enum parameters
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
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.
|
||||
**optional** | ***TestEnumParametersOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a TestEnumParametersOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**enumHeaderStringArray** | [**optional.Interface of []string**](string.md)| Header parameter enum test (string array) |
|
||||
@@ -353,12 +413,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **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)
|
||||
[[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**
|
||||
> TestGroupParameters(ctx, requiredStringGroup, requiredBooleanGroup, requiredInt64Group, optional)
|
||||
Fake endpoint to test group parameters (optional)
|
||||
|
||||
@@ -366,17 +430,20 @@ 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 |
|
||||
**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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
@@ -396,21 +463,26 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **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)
|
||||
[[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)
|
||||
test inline additionalProperties
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**requestBody** | [**map[string]string**](string.md)| request body |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**requestBody** | [**map[string]string**](string.md)| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -422,22 +494,27 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## TestJsonFormData
|
||||
|
||||
# **TestJsonFormData**
|
||||
> TestJsonFormData(ctx, param, param2)
|
||||
test json serialization of form data
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**param** | **string**| field1 |
|
||||
**param2** | **string**| field2 |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**param** | **string**| field1 |
|
||||
**param2** | **string**| field2 |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -449,8 +526,10 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -7,7 +7,9 @@ Method | HTTP request | Description
|
||||
[**TestClassname**](FakeClassnameTags123Api.md#TestClassname) | **Patch** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
# **TestClassname**
|
||||
|
||||
## TestClassname
|
||||
|
||||
> Client TestClassname(ctx, client)
|
||||
To test class name in snake case
|
||||
|
||||
@@ -15,10 +17,11 @@ To test class name in snake case
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**client** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -30,8 +33,10 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# File
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SourceURI** | **string** | Test capitalization | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# FileSchemaTestClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**File** | [**File**](File.md) | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Foo
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Bar** | **string** | | [optional] [default to bar]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# FormatTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Integer** | **int32** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# HasOnlyReadOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Bar** | **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# HealthCheckResult
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**NullableMessage** | Pointer to **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# InlineObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | Updated name of the pet | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# InlineObject1
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# InlineObject2
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**EnumFormStringArray** | **[]string** | Form parameter enum test (string array) | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# InlineObject3
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Integer** | **int32** | None | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# InlineObject4
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Param** | **string** | field1 |
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# InlineObject5
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# InlineResponseDefault
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# List
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Var123List** | **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# MapTest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**MapMapOfString** | [**map[string]map[string]string**](map.md) | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# MixedPropertiesAndAdditionalPropertiesClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Uuid** | **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Model200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int32** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Name
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **int32** | |
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# NullableClass
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**IntegerProp** | Pointer to **int32** | | [optional]
|
||||
**NumberProp** | Pointer to **float32** | | [optional]
|
||||
**BooleanProp** | Pointer to **bool** | | [optional]
|
||||
**StringProp** | Pointer to **string** | | [optional]
|
||||
**DateProp** | Pointer to **string** | | [optional]
|
||||
**DatetimeProp** | Pointer to [**time.Time**](time.Time.md) | | [optional]
|
||||
**ArrayNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||
**ArrayAndItemsNullableProp** | Pointer to [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||
**ArrayItemsNullable** | [**[]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||
**ObjectNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||
**ObjectAndItemsNullableProp** | Pointer to [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||
**ObjectItemsNullable** | [**map[string]map[string]interface{}**](map[string]interface{}.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# NumberOnly
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**JustNumber** | **float32** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Order
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **int64** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# OuterComposite
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**MyNumber** | **float32** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# OuterEnum
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# OuterEnumDefaultValue
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# OuterEnumInteger
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# OuterEnumIntegerDefaultValue
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Pet
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **int64** | | [optional]
|
||||
|
||||
@@ -15,16 +15,19 @@ Method | HTTP request | Description
|
||||
[**UploadFileWithRequiredFile**](PetApi.md#UploadFileWithRequiredFile) | **Post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
# **AddPet**
|
||||
|
||||
## AddPet
|
||||
|
||||
> AddPet(ctx, pet)
|
||||
Add a new pet to the store
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**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 |
|
||||
**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 |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -36,26 +39,33 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## DeletePet
|
||||
|
||||
# **DeletePet**
|
||||
> DeletePet(ctx, petId, optional)
|
||||
Deletes a pet
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| Pet id to delete |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| Pet id to delete |
|
||||
**optional** | ***DeletePetOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a DeletePetOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
@@ -71,12 +81,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## FindPetsByStatus
|
||||
|
||||
# **FindPetsByStatus**
|
||||
> []Pet FindPetsByStatus(ctx, status)
|
||||
Finds Pets by status
|
||||
|
||||
@@ -84,10 +98,11 @@ Multiple status values can be provided with comma separated strings
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**status** | [**[]string**](string.md)| Status values that need to be considered for filter |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**status** | [**[]string**](string.md)| Status values that need to be considered for filter |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -99,12 +114,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
## FindPetsByTags
|
||||
|
||||
# **FindPetsByTags**
|
||||
> []Pet FindPetsByTags(ctx, tags)
|
||||
Finds Pets by tags
|
||||
|
||||
@@ -112,10 +131,11 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**tags** | [**[]string**](string.md)| Tags to filter by |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**tags** | [**[]string**](string.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -127,12 +147,16 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
## GetPetById
|
||||
|
||||
# **GetPetById**
|
||||
> Pet GetPetById(ctx, petId)
|
||||
Find pet by ID
|
||||
|
||||
@@ -140,10 +164,11 @@ Returns a single pet
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet to return |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -155,21 +180,26 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
Update an existing pet
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**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 |
|
||||
**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 |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -181,26 +211,33 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## UpdatePetWithForm
|
||||
|
||||
# **UpdatePetWithForm**
|
||||
> UpdatePetWithForm(ctx, petId, optional)
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet that needs to be updated |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet that needs to be updated |
|
||||
**optional** | ***UpdatePetWithFormOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a UpdatePetWithFormOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
@@ -217,26 +254,33 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## UploadFile
|
||||
|
||||
# **UploadFile**
|
||||
> ApiResponse UploadFile(ctx, petId, optional)
|
||||
uploads an image
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet to update |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet to update |
|
||||
**optional** | ***UploadFileOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a UploadFileOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
@@ -253,27 +297,34 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to README]](../README.md)
|
||||
|
||||
|
||||
## UploadFileWithRequiredFile
|
||||
|
||||
# **UploadFileWithRequiredFile**
|
||||
> ApiResponse UploadFileWithRequiredFile(ctx, petId, requiredFile, optional)
|
||||
uploads an image (required)
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet to update |
|
||||
**requiredFile** | ***os.File*****os.File**| file to upload |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**petId** | **int64**| ID of pet to update |
|
||||
**requiredFile** | ***os.File*****os.File**| file to upload |
|
||||
**optional** | ***UploadFileWithRequiredFileOpts** | optional parameters | nil if no parameters
|
||||
|
||||
### Optional Parameters
|
||||
|
||||
Optional parameters are passed through a pointer to a UploadFileWithRequiredFileOpts struct
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
|
||||
@@ -290,8 +341,10 @@ Name | Type | Description | Notes
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# ReadOnlyFirst
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Bar** | **string** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Return
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Return** | **int32** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# SpecialModelName
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**SpecialPropertyName** | **int64** | | [optional]
|
||||
|
||||
@@ -10,7 +10,9 @@ Method | HTTP request | Description
|
||||
[**PlaceOrder**](StoreApi.md#PlaceOrder) | **Post** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
# **DeleteOrder**
|
||||
|
||||
## DeleteOrder
|
||||
|
||||
> DeleteOrder(ctx, orderId)
|
||||
Delete purchase order by ID
|
||||
|
||||
@@ -18,10 +20,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**orderId** | **string**| ID of the order that needs to be deleted |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**orderId** | **string**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -33,18 +36,23 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## GetInventory
|
||||
|
||||
# **GetInventory**
|
||||
> map[string]int32 GetInventory(ctx, )
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### Required Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@@ -57,12 +65,16 @@ This endpoint does not need any parameter.
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
## GetOrderById
|
||||
|
||||
# **GetOrderById**
|
||||
> Order GetOrderById(ctx, orderId)
|
||||
Find purchase order by ID
|
||||
|
||||
@@ -70,10 +82,11 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**orderId** | **int64**| ID of pet that needs to be fetched |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**orderId** | **int64**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -85,21 +98,26 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
Place an order for a pet
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -111,8 +129,10 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Tag
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **int64** | | [optional]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# User
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **int64** | | [optional]
|
||||
|
||||
@@ -14,7 +14,9 @@ Method | HTTP request | Description
|
||||
[**UpdateUser**](UserApi.md#UpdateUser) | **Put** /user/{username} | Updated user
|
||||
|
||||
|
||||
# **CreateUser**
|
||||
|
||||
## CreateUser
|
||||
|
||||
> CreateUser(ctx, user)
|
||||
Create user
|
||||
|
||||
@@ -22,10 +24,11 @@ This can only be done by the logged in user.
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**user** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -37,21 +40,26 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
[[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)
|
||||
Creates list of users with given input array
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**user** | [**[]User**](array.md)| List of user object |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**user** | [**[]User**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -63,21 +71,26 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
[[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)
|
||||
Creates list of users with given input array
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**user** | [**[]User**](array.md)| List of user object |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**user** | [**[]User**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -89,12 +102,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## DeleteUser
|
||||
|
||||
# **DeleteUser**
|
||||
> DeleteUser(ctx, username)
|
||||
Delete user
|
||||
|
||||
@@ -102,10 +119,11 @@ This can only be done by the logged in user.
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| The name that needs to be deleted |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -117,21 +135,26 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
## GetUserByName
|
||||
|
||||
# **GetUserByName**
|
||||
> User GetUserByName(ctx, username)
|
||||
Get user by user name
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -143,22 +166,27 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
## LoginUser
|
||||
|
||||
# **LoginUser**
|
||||
> string LoginUser(ctx, username, password)
|
||||
Logs user into the system
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| The user name for login |
|
||||
**password** | **string**| The password for login in clear text |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| The user name for login |
|
||||
**password** | **string**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -170,16 +198,21 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
[[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)
|
||||
|
||||
|
||||
## LogoutUser
|
||||
|
||||
# **LogoutUser**
|
||||
> LogoutUser(ctx, )
|
||||
Logs out current logged in user session
|
||||
|
||||
### Required Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
@@ -192,12 +225,16 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
- **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)
|
||||
[[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)
|
||||
Updated user
|
||||
|
||||
@@ -205,11 +242,12 @@ This can only be done by the logged in user.
|
||||
|
||||
### Required Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| name that need to be deleted |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
|
||||
**username** | **string**| name that need to be deleted |
|
||||
**user** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -221,8 +259,10 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **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)
|
||||
[[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)
|
||||
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||
*/
|
||||
|
||||
package petstore
|
||||
|
||||
type CatAllOf struct {
|
||||
Declawed bool `json:"declawed,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||
*/
|
||||
|
||||
package petstore
|
||||
|
||||
type DogAllOf struct {
|
||||
Breed string `json:"breed,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* API version: 1.0.0
|
||||
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
||||
*/
|
||||
|
||||
package petstore
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type NullableClass struct {
|
||||
IntegerProp *int32 `json:"integer_prop,omitempty"`
|
||||
NumberProp *float32 `json:"number_prop,omitempty"`
|
||||
BooleanProp *bool `json:"boolean_prop,omitempty"`
|
||||
StringProp *string `json:"string_prop,omitempty"`
|
||||
DateProp *string `json:"date_prop,omitempty"`
|
||||
DatetimeProp *time.Time `json:"datetime_prop,omitempty"`
|
||||
ArrayNullableProp *[]map[string]interface{} `json:"array_nullable_prop,omitempty"`
|
||||
ArrayAndItemsNullableProp *[]map[string]interface{} `json:"array_and_items_nullable_prop,omitempty"`
|
||||
ArrayItemsNullable []map[string]interface{} `json:"array_items_nullable,omitempty"`
|
||||
ObjectNullableProp *map[string]map[string]interface{} `json:"object_nullable_prop,omitempty"`
|
||||
ObjectAndItemsNullableProp *map[string]map[string]interface{} `json:"object_and_items_nullable_prop,omitempty"`
|
||||
ObjectItemsNullable map[string]map[string]interface{} `json:"object_items_nullable,omitempty"`
|
||||
}
|
||||
@@ -88,7 +88,7 @@ $apiInstance = new OpenAPI\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$user = array(new \OpenAPI\Client\Model\array()); // \OpenAPI\Client\Model\User[] | List of user object
|
||||
$user = array(new \OpenAPI\Client\Model\User()); // \OpenAPI\Client\Model\User[] | List of user object
|
||||
|
||||
try {
|
||||
$apiInstance->createUsersWithArrayInput($user);
|
||||
@@ -103,7 +103,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**\OpenAPI\Client\Model\User[]**](../Model/array.md)| List of user object |
|
||||
**user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -141,7 +141,7 @@ $apiInstance = new OpenAPI\Client\Api\UserApi(
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$user = array(new \OpenAPI\Client\Model\array()); // \OpenAPI\Client\Model\User[] | List of user object
|
||||
$user = array(new \OpenAPI\Client\Model\User()); // \OpenAPI\Client\Model\User[] | List of user object
|
||||
|
||||
try {
|
||||
$apiInstance->createUsersWithListInput($user);
|
||||
@@ -156,7 +156,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**\OpenAPI\Client\Model\User[]**](../Model/array.md)| List of user object |
|
||||
**user** | [**\OpenAPI\Client\Model\User[]**](../Model/User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ from pprint import pprint
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = petstore_api.UserApi()
|
||||
user = None # list[User] | List of user object
|
||||
user = [petstore_api.User()] # list[User] | List of user object
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
@@ -96,7 +96,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**list[User]**](list.md)| List of user object |
|
||||
**user** | [**list[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -134,7 +134,7 @@ from pprint import pprint
|
||||
|
||||
# create an instance of the API class
|
||||
api_instance = petstore_api.UserApi()
|
||||
user = None # list[User] | List of user object
|
||||
user = [petstore_api.User()] # list[User] | List of user object
|
||||
|
||||
try:
|
||||
# Creates list of users with given input array
|
||||
@@ -147,7 +147,7 @@ except ApiException as e:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**list[User]**](list.md)| List of user object |
|
||||
**user** | [**list[User]**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ Layout/EmptyLinesAroundMethodBody:
|
||||
Layout/EmptyLinesAroundModuleBody:
|
||||
Enabled: true
|
||||
|
||||
Layout/FirstParameterIndentation:
|
||||
Layout/IndentFirstArgument:
|
||||
Enabled: true
|
||||
|
||||
# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
|
||||
|
||||
@@ -139,6 +139,12 @@ Class | Method | HTTP request | Description
|
||||
- [Petstore::FormatTest](docs/FormatTest.md)
|
||||
- [Petstore::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Petstore::HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Petstore::InlineObject](docs/InlineObject.md)
|
||||
- [Petstore::InlineObject1](docs/InlineObject1.md)
|
||||
- [Petstore::InlineObject2](docs/InlineObject2.md)
|
||||
- [Petstore::InlineObject3](docs/InlineObject3.md)
|
||||
- [Petstore::InlineObject4](docs/InlineObject4.md)
|
||||
- [Petstore::InlineObject5](docs/InlineObject5.md)
|
||||
- [Petstore::InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Petstore::List](docs/List.md)
|
||||
- [Petstore::MapTest](docs/MapTest.md)
|
||||
|
||||
19
samples/openapi3/client/petstore/ruby/docs/InlineObject.md
Normal file
19
samples/openapi3/client/petstore/ruby/docs/InlineObject.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Petstore::InlineObject
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | Updated name of the pet | [optional]
|
||||
**status** | **String** | Updated status of the pet | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::InlineObject.new(name: null,
|
||||
status: null)
|
||||
```
|
||||
|
||||
|
||||
19
samples/openapi3/client/petstore/ruby/docs/InlineObject1.md
Normal file
19
samples/openapi3/client/petstore/ruby/docs/InlineObject1.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Petstore::InlineObject1
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additional_metadata** | **String** | Additional data to pass to server | [optional]
|
||||
**file** | **File** | file to upload | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::InlineObject1.new(additional_metadata: null,
|
||||
file: null)
|
||||
```
|
||||
|
||||
|
||||
19
samples/openapi3/client/petstore/ruby/docs/InlineObject2.md
Normal file
19
samples/openapi3/client/petstore/ruby/docs/InlineObject2.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Petstore::InlineObject2
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enum_form_string_array** | **Array<String>** | Form parameter enum test (string array) | [optional]
|
||||
**enum_form_string** | **String** | Form parameter enum test (string) | [optional] [default to '-efg']
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::InlineObject2.new(enum_form_string_array: null,
|
||||
enum_form_string: null)
|
||||
```
|
||||
|
||||
|
||||
43
samples/openapi3/client/petstore/ruby/docs/InlineObject3.md
Normal file
43
samples/openapi3/client/petstore/ruby/docs/InlineObject3.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Petstore::InlineObject3
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**integer** | **Integer** | None | [optional]
|
||||
**int32** | **Integer** | None | [optional]
|
||||
**int64** | **Integer** | None | [optional]
|
||||
**number** | **Float** | None |
|
||||
**float** | **Float** | None | [optional]
|
||||
**double** | **Float** | None |
|
||||
**string** | **String** | None | [optional]
|
||||
**pattern_without_delimiter** | **String** | None |
|
||||
**byte** | **String** | None |
|
||||
**binary** | **File** | None | [optional]
|
||||
**date** | **Date** | None | [optional]
|
||||
**date_time** | **DateTime** | None | [optional]
|
||||
**password** | **String** | None | [optional]
|
||||
**callback** | **String** | None | [optional]
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::InlineObject3.new(integer: null,
|
||||
int32: null,
|
||||
int64: null,
|
||||
number: null,
|
||||
float: null,
|
||||
double: null,
|
||||
string: null,
|
||||
pattern_without_delimiter: null,
|
||||
byte: null,
|
||||
binary: null,
|
||||
date: null,
|
||||
date_time: null,
|
||||
password: null,
|
||||
callback: null)
|
||||
```
|
||||
|
||||
|
||||
19
samples/openapi3/client/petstore/ruby/docs/InlineObject4.md
Normal file
19
samples/openapi3/client/petstore/ruby/docs/InlineObject4.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Petstore::InlineObject4
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**param** | **String** | field1 |
|
||||
**param2** | **String** | field2 |
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::InlineObject4.new(param: null,
|
||||
param2: null)
|
||||
```
|
||||
|
||||
|
||||
19
samples/openapi3/client/petstore/ruby/docs/InlineObject5.md
Normal file
19
samples/openapi3/client/petstore/ruby/docs/InlineObject5.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Petstore::InlineObject5
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**additional_metadata** | **String** | Additional data to pass to server | [optional]
|
||||
**required_file** | **File** | file to upload |
|
||||
|
||||
## Code Sample
|
||||
|
||||
```ruby
|
||||
require 'Petstore'
|
||||
|
||||
instance = Petstore::InlineObject5.new(additional_metadata: null,
|
||||
required_file: null)
|
||||
```
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ Creates list of users with given input array
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
user = nil # Array<User> | List of user object
|
||||
user = [Petstore::User.new] # Array<User> | List of user object
|
||||
|
||||
begin
|
||||
#Creates list of users with given input array
|
||||
@@ -89,7 +89,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**Array<User>**](Array.md)| List of user object |
|
||||
**user** | [**Array<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -118,7 +118,7 @@ Creates list of users with given input array
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::UserApi.new
|
||||
user = nil # Array<User> | List of user object
|
||||
user = [Petstore::User.new] # Array<User> | List of user object
|
||||
|
||||
begin
|
||||
#Creates list of users with given input array
|
||||
@@ -133,7 +133,7 @@ end
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**user** | [**Array<User>**](Array.md)| List of user object |
|
||||
**user** | [**Array<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@ require 'petstore/models/foo'
|
||||
require 'petstore/models/format_test'
|
||||
require 'petstore/models/has_only_read_only'
|
||||
require 'petstore/models/health_check_result'
|
||||
require 'petstore/models/inline_object'
|
||||
require 'petstore/models/inline_object1'
|
||||
require 'petstore/models/inline_object2'
|
||||
require 'petstore/models/inline_object3'
|
||||
require 'petstore/models/inline_object4'
|
||||
require 'petstore/models/inline_object5'
|
||||
require 'petstore/models/inline_response_default'
|
||||
require 'petstore/models/list'
|
||||
require 'petstore/models/map_test'
|
||||
|
||||
@@ -10,7 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
module Petstore
|
||||
|
||||
@@ -10,7 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
module Petstore
|
||||
|
||||
@@ -10,7 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
module Petstore
|
||||
|
||||
@@ -10,7 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
module Petstore
|
||||
|
||||
@@ -10,7 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
module Petstore
|
||||
@@ -104,7 +103,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.delete_pet"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s))
|
||||
local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
@@ -291,7 +290,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.get_pet_by_id"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s))
|
||||
local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
@@ -415,7 +414,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.update_pet_with_form"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s))
|
||||
local_var_path = '/pet/{petId}'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
@@ -481,7 +480,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'pet_id' when calling PetApi.upload_file"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/pet/{petId}/uploadImage'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s))
|
||||
local_var_path = '/pet/{petId}/uploadImage'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
@@ -553,7 +552,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'required_file' when calling PetApi.upload_file_with_required_file"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/fake/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s))
|
||||
local_var_path = '/fake/{petId}/uploadImageWithRequiredFile'.sub('{' + 'petId' + '}', CGI.escape(pet_id.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
|
||||
@@ -10,7 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
module Petstore
|
||||
@@ -44,7 +43,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'order_id' when calling StoreApi.delete_order"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/store/order/{order_id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
|
||||
local_var_path = '/store/order/{order_id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
@@ -168,7 +167,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# resource path
|
||||
local_var_path = '/store/order/{order_id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
|
||||
local_var_path = '/store/order/{order_id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
|
||||
@@ -10,7 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
module Petstore
|
||||
@@ -226,7 +225,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.delete_user"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/user/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
||||
local_var_path = '/user/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
@@ -284,7 +283,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.get_user_by_name"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/user/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
||||
local_var_path = '/user/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
@@ -472,7 +471,7 @@ module Petstore
|
||||
fail ArgumentError, "Missing the required parameter 'user' when calling UserApi.update_user"
|
||||
end
|
||||
# resource path
|
||||
local_var_path = '/user/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
||||
local_var_path = '/user/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s).gsub('%2F', '/'))
|
||||
|
||||
# query parameters
|
||||
query_params = opts[:query_params] || {}
|
||||
|
||||
@@ -15,7 +15,6 @@ require 'json'
|
||||
require 'logger'
|
||||
require 'tempfile'
|
||||
require 'typhoeus'
|
||||
require 'uri'
|
||||
|
||||
module Petstore
|
||||
class ApiClient
|
||||
@@ -262,7 +261,7 @@ module Petstore
|
||||
def build_request_url(path)
|
||||
# Add leading and trailing slashes to path
|
||||
path = "/#{path}".gsub(/\/+/, '/')
|
||||
URI.encode(@config.base_url + path)
|
||||
@config.base_url + path
|
||||
end
|
||||
|
||||
# Builds the HTTP request body
|
||||
|
||||
@@ -10,8 +10,6 @@ OpenAPI Generator version: 5.0.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'uri'
|
||||
|
||||
module Petstore
|
||||
class Configuration
|
||||
# Defines url scheme
|
||||
@@ -174,8 +172,7 @@ module Petstore
|
||||
end
|
||||
|
||||
def base_url
|
||||
url = "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
||||
URI.encode(url)
|
||||
"#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '')
|
||||
end
|
||||
|
||||
# Gets API key (with prefix if set).
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'date'
|
||||
|
||||
module Petstore
|
||||
class InlineObject
|
||||
# Updated name of the pet
|
||||
attr_accessor :name
|
||||
|
||||
# Updated status of the pet
|
||||
attr_accessor :status
|
||||
|
||||
# Attribute mapping from ruby-style variable name to JSON key.
|
||||
def self.attribute_map
|
||||
{
|
||||
:'name' => :'name',
|
||||
:'status' => :'status'
|
||||
}
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.openapi_types
|
||||
{
|
||||
:'name' => :'String',
|
||||
:'status' => :'String'
|
||||
}
|
||||
end
|
||||
|
||||
# Initializes the object
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
def initialize(attributes = {})
|
||||
if (!attributes.is_a?(Hash))
|
||||
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject` initialize method"
|
||||
end
|
||||
|
||||
# check to see if the attribute exists and convert string to symbol for hash key
|
||||
attributes = attributes.each_with_object({}) { |(k, v), h|
|
||||
if (!self.class.attribute_map.key?(k.to_sym))
|
||||
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
||||
end
|
||||
h[k.to_sym] = v
|
||||
}
|
||||
|
||||
if attributes.key?(:'name')
|
||||
self.name = attributes[:'name']
|
||||
end
|
||||
|
||||
if attributes.key?(:'status')
|
||||
self.status = attributes[:'status']
|
||||
end
|
||||
end
|
||||
|
||||
# Show invalid properties with the reasons. Usually used together with valid?
|
||||
# @return Array for valid properties with the reasons
|
||||
def list_invalid_properties
|
||||
invalid_properties = Array.new
|
||||
invalid_properties
|
||||
end
|
||||
|
||||
# Check to see if the all the properties in the model are valid
|
||||
# @return true if the model is valid
|
||||
def valid?
|
||||
true
|
||||
end
|
||||
|
||||
# Checks equality by comparing each attribute.
|
||||
# @param [Object] Object to be compared
|
||||
def ==(o)
|
||||
return true if self.equal?(o)
|
||||
self.class == o.class &&
|
||||
name == o.name &&
|
||||
status == o.status
|
||||
end
|
||||
|
||||
# @see the `==` method
|
||||
# @param [Object] Object to be compared
|
||||
def eql?(o)
|
||||
self == o
|
||||
end
|
||||
|
||||
# Calculates hash code according to all attributes.
|
||||
# @return [Integer] Hash code
|
||||
def hash
|
||||
[name, status].hash
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def self.build_from_hash(attributes)
|
||||
new.build_from_hash(attributes)
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
# Deserializes the data based on type
|
||||
# @param string type Data type
|
||||
# @param string value Value to be deserialized
|
||||
# @return [Object] Deserialized data
|
||||
def _deserialize(type, value)
|
||||
case type.to_sym
|
||||
when :DateTime
|
||||
DateTime.parse(value)
|
||||
when :Date
|
||||
Date.parse(value)
|
||||
when :String
|
||||
value.to_s
|
||||
when :Integer
|
||||
value.to_i
|
||||
when :Float
|
||||
value.to_f
|
||||
when :Boolean
|
||||
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
when :Object
|
||||
# generic object (usually a Hash), return directly
|
||||
value
|
||||
when /\AArray<(?<inner_type>.+)>\z/
|
||||
inner_type = Regexp.last_match[:inner_type]
|
||||
value.map { |v| _deserialize(inner_type, v) }
|
||||
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
||||
k_type = Regexp.last_match[:k_type]
|
||||
v_type = Regexp.last_match[:v_type]
|
||||
{}.tap do |hash|
|
||||
value.each do |k, v|
|
||||
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
||||
end
|
||||
end
|
||||
else # model
|
||||
Petstore.const_get(type).build_from_hash(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the string representation of the object
|
||||
# @return [String] String presentation of the object
|
||||
def to_s
|
||||
to_hash.to_s
|
||||
end
|
||||
|
||||
# to_body is an alias to to_hash (backward compatibility)
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_body
|
||||
to_hash
|
||||
end
|
||||
|
||||
# Returns the object in the form of hash
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_hash
|
||||
hash = {}
|
||||
self.class.attribute_map.each_pair do |attr, param|
|
||||
value = self.send(attr)
|
||||
next if value.nil?
|
||||
hash[param] = _to_hash(value)
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
# Outputs non-array value in the form of hash
|
||||
# For object, use to_hash. Otherwise, just return the value
|
||||
# @param [Object] value Any valid value
|
||||
# @return [Hash] Returns the value in the form of hash
|
||||
def _to_hash(value)
|
||||
if value.is_a?(Array)
|
||||
value.compact.map { |v| _to_hash(v) }
|
||||
elsif value.is_a?(Hash)
|
||||
{}.tap do |hash|
|
||||
value.each { |k, v| hash[k] = _to_hash(v) }
|
||||
end
|
||||
elsif value.respond_to? :to_hash
|
||||
value.to_hash
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,207 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'date'
|
||||
|
||||
module Petstore
|
||||
class InlineObject1
|
||||
# Additional data to pass to server
|
||||
attr_accessor :additional_metadata
|
||||
|
||||
# file to upload
|
||||
attr_accessor :file
|
||||
|
||||
# Attribute mapping from ruby-style variable name to JSON key.
|
||||
def self.attribute_map
|
||||
{
|
||||
:'additional_metadata' => :'additionalMetadata',
|
||||
:'file' => :'file'
|
||||
}
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.openapi_types
|
||||
{
|
||||
:'additional_metadata' => :'String',
|
||||
:'file' => :'File'
|
||||
}
|
||||
end
|
||||
|
||||
# Initializes the object
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
def initialize(attributes = {})
|
||||
if (!attributes.is_a?(Hash))
|
||||
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject1` initialize method"
|
||||
end
|
||||
|
||||
# check to see if the attribute exists and convert string to symbol for hash key
|
||||
attributes = attributes.each_with_object({}) { |(k, v), h|
|
||||
if (!self.class.attribute_map.key?(k.to_sym))
|
||||
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
||||
end
|
||||
h[k.to_sym] = v
|
||||
}
|
||||
|
||||
if attributes.key?(:'additional_metadata')
|
||||
self.additional_metadata = attributes[:'additional_metadata']
|
||||
end
|
||||
|
||||
if attributes.key?(:'file')
|
||||
self.file = attributes[:'file']
|
||||
end
|
||||
end
|
||||
|
||||
# Show invalid properties with the reasons. Usually used together with valid?
|
||||
# @return Array for valid properties with the reasons
|
||||
def list_invalid_properties
|
||||
invalid_properties = Array.new
|
||||
invalid_properties
|
||||
end
|
||||
|
||||
# Check to see if the all the properties in the model are valid
|
||||
# @return true if the model is valid
|
||||
def valid?
|
||||
true
|
||||
end
|
||||
|
||||
# Checks equality by comparing each attribute.
|
||||
# @param [Object] Object to be compared
|
||||
def ==(o)
|
||||
return true if self.equal?(o)
|
||||
self.class == o.class &&
|
||||
additional_metadata == o.additional_metadata &&
|
||||
file == o.file
|
||||
end
|
||||
|
||||
# @see the `==` method
|
||||
# @param [Object] Object to be compared
|
||||
def eql?(o)
|
||||
self == o
|
||||
end
|
||||
|
||||
# Calculates hash code according to all attributes.
|
||||
# @return [Integer] Hash code
|
||||
def hash
|
||||
[additional_metadata, file].hash
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def self.build_from_hash(attributes)
|
||||
new.build_from_hash(attributes)
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
# Deserializes the data based on type
|
||||
# @param string type Data type
|
||||
# @param string value Value to be deserialized
|
||||
# @return [Object] Deserialized data
|
||||
def _deserialize(type, value)
|
||||
case type.to_sym
|
||||
when :DateTime
|
||||
DateTime.parse(value)
|
||||
when :Date
|
||||
Date.parse(value)
|
||||
when :String
|
||||
value.to_s
|
||||
when :Integer
|
||||
value.to_i
|
||||
when :Float
|
||||
value.to_f
|
||||
when :Boolean
|
||||
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
when :Object
|
||||
# generic object (usually a Hash), return directly
|
||||
value
|
||||
when /\AArray<(?<inner_type>.+)>\z/
|
||||
inner_type = Regexp.last_match[:inner_type]
|
||||
value.map { |v| _deserialize(inner_type, v) }
|
||||
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
||||
k_type = Regexp.last_match[:k_type]
|
||||
v_type = Regexp.last_match[:v_type]
|
||||
{}.tap do |hash|
|
||||
value.each do |k, v|
|
||||
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
||||
end
|
||||
end
|
||||
else # model
|
||||
Petstore.const_get(type).build_from_hash(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the string representation of the object
|
||||
# @return [String] String presentation of the object
|
||||
def to_s
|
||||
to_hash.to_s
|
||||
end
|
||||
|
||||
# to_body is an alias to to_hash (backward compatibility)
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_body
|
||||
to_hash
|
||||
end
|
||||
|
||||
# Returns the object in the form of hash
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_hash
|
||||
hash = {}
|
||||
self.class.attribute_map.each_pair do |attr, param|
|
||||
value = self.send(attr)
|
||||
next if value.nil?
|
||||
hash[param] = _to_hash(value)
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
# Outputs non-array value in the form of hash
|
||||
# For object, use to_hash. Otherwise, just return the value
|
||||
# @param [Object] value Any valid value
|
||||
# @return [Hash] Returns the value in the form of hash
|
||||
def _to_hash(value)
|
||||
if value.is_a?(Array)
|
||||
value.compact.map { |v| _to_hash(v) }
|
||||
elsif value.is_a?(Hash)
|
||||
{}.tap do |hash|
|
||||
value.each { |k, v| hash[k] = _to_hash(v) }
|
||||
end
|
||||
elsif value.respond_to? :to_hash
|
||||
value.to_hash
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,245 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'date'
|
||||
|
||||
module Petstore
|
||||
class InlineObject2
|
||||
# Form parameter enum test (string array)
|
||||
attr_accessor :enum_form_string_array
|
||||
|
||||
# Form parameter enum test (string)
|
||||
attr_accessor :enum_form_string
|
||||
|
||||
class EnumAttributeValidator
|
||||
attr_reader :datatype
|
||||
attr_reader :allowable_values
|
||||
|
||||
def initialize(datatype, allowable_values)
|
||||
@allowable_values = allowable_values.map do |value|
|
||||
case datatype.to_s
|
||||
when /Integer/i
|
||||
value.to_i
|
||||
when /Float/i
|
||||
value.to_f
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def valid?(value)
|
||||
!value || allowable_values.include?(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Attribute mapping from ruby-style variable name to JSON key.
|
||||
def self.attribute_map
|
||||
{
|
||||
:'enum_form_string_array' => :'enum_form_string_array',
|
||||
:'enum_form_string' => :'enum_form_string'
|
||||
}
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.openapi_types
|
||||
{
|
||||
:'enum_form_string_array' => :'Array<String>',
|
||||
:'enum_form_string' => :'String'
|
||||
}
|
||||
end
|
||||
|
||||
# Initializes the object
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
def initialize(attributes = {})
|
||||
if (!attributes.is_a?(Hash))
|
||||
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject2` initialize method"
|
||||
end
|
||||
|
||||
# check to see if the attribute exists and convert string to symbol for hash key
|
||||
attributes = attributes.each_with_object({}) { |(k, v), h|
|
||||
if (!self.class.attribute_map.key?(k.to_sym))
|
||||
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
||||
end
|
||||
h[k.to_sym] = v
|
||||
}
|
||||
|
||||
if attributes.key?(:'enum_form_string_array')
|
||||
if (value = attributes[:'enum_form_string_array']).is_a?(Array)
|
||||
self.enum_form_string_array = value
|
||||
end
|
||||
end
|
||||
|
||||
if attributes.key?(:'enum_form_string')
|
||||
self.enum_form_string = attributes[:'enum_form_string']
|
||||
else
|
||||
self.enum_form_string = '-efg'
|
||||
end
|
||||
end
|
||||
|
||||
# Show invalid properties with the reasons. Usually used together with valid?
|
||||
# @return Array for valid properties with the reasons
|
||||
def list_invalid_properties
|
||||
invalid_properties = Array.new
|
||||
invalid_properties
|
||||
end
|
||||
|
||||
# Check to see if the all the properties in the model are valid
|
||||
# @return true if the model is valid
|
||||
def valid?
|
||||
enum_form_string_validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"])
|
||||
return false unless enum_form_string_validator.valid?(@enum_form_string)
|
||||
true
|
||||
end
|
||||
|
||||
# Custom attribute writer method checking allowed values (enum).
|
||||
# @param [Object] enum_form_string Object to be assigned
|
||||
def enum_form_string=(enum_form_string)
|
||||
validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"])
|
||||
unless validator.valid?(enum_form_string)
|
||||
fail ArgumentError, "invalid value for \"enum_form_string\", must be one of #{validator.allowable_values}."
|
||||
end
|
||||
@enum_form_string = enum_form_string
|
||||
end
|
||||
|
||||
# Checks equality by comparing each attribute.
|
||||
# @param [Object] Object to be compared
|
||||
def ==(o)
|
||||
return true if self.equal?(o)
|
||||
self.class == o.class &&
|
||||
enum_form_string_array == o.enum_form_string_array &&
|
||||
enum_form_string == o.enum_form_string
|
||||
end
|
||||
|
||||
# @see the `==` method
|
||||
# @param [Object] Object to be compared
|
||||
def eql?(o)
|
||||
self == o
|
||||
end
|
||||
|
||||
# Calculates hash code according to all attributes.
|
||||
# @return [Integer] Hash code
|
||||
def hash
|
||||
[enum_form_string_array, enum_form_string].hash
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def self.build_from_hash(attributes)
|
||||
new.build_from_hash(attributes)
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
# Deserializes the data based on type
|
||||
# @param string type Data type
|
||||
# @param string value Value to be deserialized
|
||||
# @return [Object] Deserialized data
|
||||
def _deserialize(type, value)
|
||||
case type.to_sym
|
||||
when :DateTime
|
||||
DateTime.parse(value)
|
||||
when :Date
|
||||
Date.parse(value)
|
||||
when :String
|
||||
value.to_s
|
||||
when :Integer
|
||||
value.to_i
|
||||
when :Float
|
||||
value.to_f
|
||||
when :Boolean
|
||||
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
when :Object
|
||||
# generic object (usually a Hash), return directly
|
||||
value
|
||||
when /\AArray<(?<inner_type>.+)>\z/
|
||||
inner_type = Regexp.last_match[:inner_type]
|
||||
value.map { |v| _deserialize(inner_type, v) }
|
||||
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
||||
k_type = Regexp.last_match[:k_type]
|
||||
v_type = Regexp.last_match[:v_type]
|
||||
{}.tap do |hash|
|
||||
value.each do |k, v|
|
||||
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
||||
end
|
||||
end
|
||||
else # model
|
||||
Petstore.const_get(type).build_from_hash(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the string representation of the object
|
||||
# @return [String] String presentation of the object
|
||||
def to_s
|
||||
to_hash.to_s
|
||||
end
|
||||
|
||||
# to_body is an alias to to_hash (backward compatibility)
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_body
|
||||
to_hash
|
||||
end
|
||||
|
||||
# Returns the object in the form of hash
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_hash
|
||||
hash = {}
|
||||
self.class.attribute_map.each_pair do |attr, param|
|
||||
value = self.send(attr)
|
||||
next if value.nil?
|
||||
hash[param] = _to_hash(value)
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
# Outputs non-array value in the form of hash
|
||||
# For object, use to_hash. Otherwise, just return the value
|
||||
# @param [Object] value Any valid value
|
||||
# @return [Hash] Returns the value in the form of hash
|
||||
def _to_hash(value)
|
||||
if value.is_a?(Array)
|
||||
value.compact.map { |v| _to_hash(v) }
|
||||
elsif value.is_a?(Hash)
|
||||
{}.tap do |hash|
|
||||
value.each { |k, v| hash[k] = _to_hash(v) }
|
||||
end
|
||||
elsif value.respond_to? :to_hash
|
||||
value.to_hash
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,528 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'date'
|
||||
|
||||
module Petstore
|
||||
class InlineObject3
|
||||
# None
|
||||
attr_accessor :integer
|
||||
|
||||
# None
|
||||
attr_accessor :int32
|
||||
|
||||
# None
|
||||
attr_accessor :int64
|
||||
|
||||
# None
|
||||
attr_accessor :number
|
||||
|
||||
# None
|
||||
attr_accessor :float
|
||||
|
||||
# None
|
||||
attr_accessor :double
|
||||
|
||||
# None
|
||||
attr_accessor :string
|
||||
|
||||
# None
|
||||
attr_accessor :pattern_without_delimiter
|
||||
|
||||
# None
|
||||
attr_accessor :byte
|
||||
|
||||
# None
|
||||
attr_accessor :binary
|
||||
|
||||
# None
|
||||
attr_accessor :date
|
||||
|
||||
# None
|
||||
attr_accessor :date_time
|
||||
|
||||
# None
|
||||
attr_accessor :password
|
||||
|
||||
# None
|
||||
attr_accessor :callback
|
||||
|
||||
# Attribute mapping from ruby-style variable name to JSON key.
|
||||
def self.attribute_map
|
||||
{
|
||||
:'integer' => :'integer',
|
||||
:'int32' => :'int32',
|
||||
:'int64' => :'int64',
|
||||
:'number' => :'number',
|
||||
:'float' => :'float',
|
||||
:'double' => :'double',
|
||||
:'string' => :'string',
|
||||
:'pattern_without_delimiter' => :'pattern_without_delimiter',
|
||||
:'byte' => :'byte',
|
||||
:'binary' => :'binary',
|
||||
:'date' => :'date',
|
||||
:'date_time' => :'dateTime',
|
||||
:'password' => :'password',
|
||||
:'callback' => :'callback'
|
||||
}
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.openapi_types
|
||||
{
|
||||
:'integer' => :'Integer',
|
||||
:'int32' => :'Integer',
|
||||
:'int64' => :'Integer',
|
||||
:'number' => :'Float',
|
||||
:'float' => :'Float',
|
||||
:'double' => :'Float',
|
||||
:'string' => :'String',
|
||||
:'pattern_without_delimiter' => :'String',
|
||||
:'byte' => :'String',
|
||||
:'binary' => :'File',
|
||||
:'date' => :'Date',
|
||||
:'date_time' => :'DateTime',
|
||||
:'password' => :'String',
|
||||
:'callback' => :'String'
|
||||
}
|
||||
end
|
||||
|
||||
# Initializes the object
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
def initialize(attributes = {})
|
||||
if (!attributes.is_a?(Hash))
|
||||
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject3` initialize method"
|
||||
end
|
||||
|
||||
# check to see if the attribute exists and convert string to symbol for hash key
|
||||
attributes = attributes.each_with_object({}) { |(k, v), h|
|
||||
if (!self.class.attribute_map.key?(k.to_sym))
|
||||
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
||||
end
|
||||
h[k.to_sym] = v
|
||||
}
|
||||
|
||||
if attributes.key?(:'integer')
|
||||
self.integer = attributes[:'integer']
|
||||
end
|
||||
|
||||
if attributes.key?(:'int32')
|
||||
self.int32 = attributes[:'int32']
|
||||
end
|
||||
|
||||
if attributes.key?(:'int64')
|
||||
self.int64 = attributes[:'int64']
|
||||
end
|
||||
|
||||
if attributes.key?(:'number')
|
||||
self.number = attributes[:'number']
|
||||
end
|
||||
|
||||
if attributes.key?(:'float')
|
||||
self.float = attributes[:'float']
|
||||
end
|
||||
|
||||
if attributes.key?(:'double')
|
||||
self.double = attributes[:'double']
|
||||
end
|
||||
|
||||
if attributes.key?(:'string')
|
||||
self.string = attributes[:'string']
|
||||
end
|
||||
|
||||
if attributes.key?(:'pattern_without_delimiter')
|
||||
self.pattern_without_delimiter = attributes[:'pattern_without_delimiter']
|
||||
end
|
||||
|
||||
if attributes.key?(:'byte')
|
||||
self.byte = attributes[:'byte']
|
||||
end
|
||||
|
||||
if attributes.key?(:'binary')
|
||||
self.binary = attributes[:'binary']
|
||||
end
|
||||
|
||||
if attributes.key?(:'date')
|
||||
self.date = attributes[:'date']
|
||||
end
|
||||
|
||||
if attributes.key?(:'date_time')
|
||||
self.date_time = attributes[:'date_time']
|
||||
end
|
||||
|
||||
if attributes.key?(:'password')
|
||||
self.password = attributes[:'password']
|
||||
end
|
||||
|
||||
if attributes.key?(:'callback')
|
||||
self.callback = attributes[:'callback']
|
||||
end
|
||||
end
|
||||
|
||||
# Show invalid properties with the reasons. Usually used together with valid?
|
||||
# @return Array for valid properties with the reasons
|
||||
def list_invalid_properties
|
||||
invalid_properties = Array.new
|
||||
if !@integer.nil? && @integer > 100
|
||||
invalid_properties.push('invalid value for "integer", must be smaller than or equal to 100.')
|
||||
end
|
||||
|
||||
if !@integer.nil? && @integer < 10
|
||||
invalid_properties.push('invalid value for "integer", must be greater than or equal to 10.')
|
||||
end
|
||||
|
||||
if !@int32.nil? && @int32 > 200
|
||||
invalid_properties.push('invalid value for "int32", must be smaller than or equal to 200.')
|
||||
end
|
||||
|
||||
if !@int32.nil? && @int32 < 20
|
||||
invalid_properties.push('invalid value for "int32", must be greater than or equal to 20.')
|
||||
end
|
||||
|
||||
if @number.nil?
|
||||
invalid_properties.push('invalid value for "number", number cannot be nil.')
|
||||
end
|
||||
|
||||
if @number > 543.2
|
||||
invalid_properties.push('invalid value for "number", must be smaller than or equal to 543.2.')
|
||||
end
|
||||
|
||||
if @number < 32.1
|
||||
invalid_properties.push('invalid value for "number", must be greater than or equal to 32.1.')
|
||||
end
|
||||
|
||||
if !@float.nil? && @float > 987.6
|
||||
invalid_properties.push('invalid value for "float", must be smaller than or equal to 987.6.')
|
||||
end
|
||||
|
||||
if @double.nil?
|
||||
invalid_properties.push('invalid value for "double", double cannot be nil.')
|
||||
end
|
||||
|
||||
if @double > 123.4
|
||||
invalid_properties.push('invalid value for "double", must be smaller than or equal to 123.4.')
|
||||
end
|
||||
|
||||
if @double < 67.8
|
||||
invalid_properties.push('invalid value for "double", must be greater than or equal to 67.8.')
|
||||
end
|
||||
|
||||
pattern = Regexp.new(/[a-z]/i)
|
||||
if !@string.nil? && @string !~ pattern
|
||||
invalid_properties.push("invalid value for \"string\", must conform to the pattern #{pattern}.")
|
||||
end
|
||||
|
||||
if @pattern_without_delimiter.nil?
|
||||
invalid_properties.push('invalid value for "pattern_without_delimiter", pattern_without_delimiter cannot be nil.')
|
||||
end
|
||||
|
||||
pattern = Regexp.new(/^[A-Z].*/)
|
||||
if @pattern_without_delimiter !~ pattern
|
||||
invalid_properties.push("invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}.")
|
||||
end
|
||||
|
||||
if @byte.nil?
|
||||
invalid_properties.push('invalid value for "byte", byte cannot be nil.')
|
||||
end
|
||||
|
||||
if !@password.nil? && @password.to_s.length > 64
|
||||
invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 64.')
|
||||
end
|
||||
|
||||
if !@password.nil? && @password.to_s.length < 10
|
||||
invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.')
|
||||
end
|
||||
|
||||
invalid_properties
|
||||
end
|
||||
|
||||
# Check to see if the all the properties in the model are valid
|
||||
# @return true if the model is valid
|
||||
def valid?
|
||||
return false if !@integer.nil? && @integer > 100
|
||||
return false if !@integer.nil? && @integer < 10
|
||||
return false if !@int32.nil? && @int32 > 200
|
||||
return false if !@int32.nil? && @int32 < 20
|
||||
return false if @number.nil?
|
||||
return false if @number > 543.2
|
||||
return false if @number < 32.1
|
||||
return false if !@float.nil? && @float > 987.6
|
||||
return false if @double.nil?
|
||||
return false if @double > 123.4
|
||||
return false if @double < 67.8
|
||||
return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i)
|
||||
return false if @pattern_without_delimiter.nil?
|
||||
return false if @pattern_without_delimiter !~ Regexp.new(/^[A-Z].*/)
|
||||
return false if @byte.nil?
|
||||
return false if !@password.nil? && @password.to_s.length > 64
|
||||
return false if !@password.nil? && @password.to_s.length < 10
|
||||
true
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] integer Value to be assigned
|
||||
def integer=(integer)
|
||||
if !integer.nil? && integer > 100
|
||||
fail ArgumentError, 'invalid value for "integer", must be smaller than or equal to 100.'
|
||||
end
|
||||
|
||||
if !integer.nil? && integer < 10
|
||||
fail ArgumentError, 'invalid value for "integer", must be greater than or equal to 10.'
|
||||
end
|
||||
|
||||
@integer = integer
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] int32 Value to be assigned
|
||||
def int32=(int32)
|
||||
if !int32.nil? && int32 > 200
|
||||
fail ArgumentError, 'invalid value for "int32", must be smaller than or equal to 200.'
|
||||
end
|
||||
|
||||
if !int32.nil? && int32 < 20
|
||||
fail ArgumentError, 'invalid value for "int32", must be greater than or equal to 20.'
|
||||
end
|
||||
|
||||
@int32 = int32
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] number Value to be assigned
|
||||
def number=(number)
|
||||
if number.nil?
|
||||
fail ArgumentError, 'number cannot be nil'
|
||||
end
|
||||
|
||||
if number > 543.2
|
||||
fail ArgumentError, 'invalid value for "number", must be smaller than or equal to 543.2.'
|
||||
end
|
||||
|
||||
if number < 32.1
|
||||
fail ArgumentError, 'invalid value for "number", must be greater than or equal to 32.1.'
|
||||
end
|
||||
|
||||
@number = number
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] float Value to be assigned
|
||||
def float=(float)
|
||||
if !float.nil? && float > 987.6
|
||||
fail ArgumentError, 'invalid value for "float", must be smaller than or equal to 987.6.'
|
||||
end
|
||||
|
||||
@float = float
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] double Value to be assigned
|
||||
def double=(double)
|
||||
if double.nil?
|
||||
fail ArgumentError, 'double cannot be nil'
|
||||
end
|
||||
|
||||
if double > 123.4
|
||||
fail ArgumentError, 'invalid value for "double", must be smaller than or equal to 123.4.'
|
||||
end
|
||||
|
||||
if double < 67.8
|
||||
fail ArgumentError, 'invalid value for "double", must be greater than or equal to 67.8.'
|
||||
end
|
||||
|
||||
@double = double
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] string Value to be assigned
|
||||
def string=(string)
|
||||
pattern = Regexp.new(/[a-z]/i)
|
||||
if !string.nil? && string !~ pattern
|
||||
fail ArgumentError, "invalid value for \"string\", must conform to the pattern #{pattern}."
|
||||
end
|
||||
|
||||
@string = string
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] pattern_without_delimiter Value to be assigned
|
||||
def pattern_without_delimiter=(pattern_without_delimiter)
|
||||
if pattern_without_delimiter.nil?
|
||||
fail ArgumentError, 'pattern_without_delimiter cannot be nil'
|
||||
end
|
||||
|
||||
pattern = Regexp.new(/^[A-Z].*/)
|
||||
if pattern_without_delimiter !~ pattern
|
||||
fail ArgumentError, "invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}."
|
||||
end
|
||||
|
||||
@pattern_without_delimiter = pattern_without_delimiter
|
||||
end
|
||||
|
||||
# Custom attribute writer method with validation
|
||||
# @param [Object] password Value to be assigned
|
||||
def password=(password)
|
||||
if !password.nil? && password.to_s.length > 64
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 64.'
|
||||
end
|
||||
|
||||
if !password.nil? && password.to_s.length < 10
|
||||
fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.'
|
||||
end
|
||||
|
||||
@password = password
|
||||
end
|
||||
|
||||
# Checks equality by comparing each attribute.
|
||||
# @param [Object] Object to be compared
|
||||
def ==(o)
|
||||
return true if self.equal?(o)
|
||||
self.class == o.class &&
|
||||
integer == o.integer &&
|
||||
int32 == o.int32 &&
|
||||
int64 == o.int64 &&
|
||||
number == o.number &&
|
||||
float == o.float &&
|
||||
double == o.double &&
|
||||
string == o.string &&
|
||||
pattern_without_delimiter == o.pattern_without_delimiter &&
|
||||
byte == o.byte &&
|
||||
binary == o.binary &&
|
||||
date == o.date &&
|
||||
date_time == o.date_time &&
|
||||
password == o.password &&
|
||||
callback == o.callback
|
||||
end
|
||||
|
||||
# @see the `==` method
|
||||
# @param [Object] Object to be compared
|
||||
def eql?(o)
|
||||
self == o
|
||||
end
|
||||
|
||||
# Calculates hash code according to all attributes.
|
||||
# @return [Integer] Hash code
|
||||
def hash
|
||||
[integer, int32, int64, number, float, double, string, pattern_without_delimiter, byte, binary, date, date_time, password, callback].hash
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def self.build_from_hash(attributes)
|
||||
new.build_from_hash(attributes)
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
# Deserializes the data based on type
|
||||
# @param string type Data type
|
||||
# @param string value Value to be deserialized
|
||||
# @return [Object] Deserialized data
|
||||
def _deserialize(type, value)
|
||||
case type.to_sym
|
||||
when :DateTime
|
||||
DateTime.parse(value)
|
||||
when :Date
|
||||
Date.parse(value)
|
||||
when :String
|
||||
value.to_s
|
||||
when :Integer
|
||||
value.to_i
|
||||
when :Float
|
||||
value.to_f
|
||||
when :Boolean
|
||||
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
when :Object
|
||||
# generic object (usually a Hash), return directly
|
||||
value
|
||||
when /\AArray<(?<inner_type>.+)>\z/
|
||||
inner_type = Regexp.last_match[:inner_type]
|
||||
value.map { |v| _deserialize(inner_type, v) }
|
||||
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
||||
k_type = Regexp.last_match[:k_type]
|
||||
v_type = Regexp.last_match[:v_type]
|
||||
{}.tap do |hash|
|
||||
value.each do |k, v|
|
||||
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
||||
end
|
||||
end
|
||||
else # model
|
||||
Petstore.const_get(type).build_from_hash(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the string representation of the object
|
||||
# @return [String] String presentation of the object
|
||||
def to_s
|
||||
to_hash.to_s
|
||||
end
|
||||
|
||||
# to_body is an alias to to_hash (backward compatibility)
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_body
|
||||
to_hash
|
||||
end
|
||||
|
||||
# Returns the object in the form of hash
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_hash
|
||||
hash = {}
|
||||
self.class.attribute_map.each_pair do |attr, param|
|
||||
value = self.send(attr)
|
||||
next if value.nil?
|
||||
hash[param] = _to_hash(value)
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
# Outputs non-array value in the form of hash
|
||||
# For object, use to_hash. Otherwise, just return the value
|
||||
# @param [Object] value Any valid value
|
||||
# @return [Hash] Returns the value in the form of hash
|
||||
def _to_hash(value)
|
||||
if value.is_a?(Array)
|
||||
value.compact.map { |v| _to_hash(v) }
|
||||
elsif value.is_a?(Hash)
|
||||
{}.tap do |hash|
|
||||
value.each { |k, v| hash[k] = _to_hash(v) }
|
||||
end
|
||||
elsif value.respond_to? :to_hash
|
||||
value.to_hash
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,217 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'date'
|
||||
|
||||
module Petstore
|
||||
class InlineObject4
|
||||
# field1
|
||||
attr_accessor :param
|
||||
|
||||
# field2
|
||||
attr_accessor :param2
|
||||
|
||||
# Attribute mapping from ruby-style variable name to JSON key.
|
||||
def self.attribute_map
|
||||
{
|
||||
:'param' => :'param',
|
||||
:'param2' => :'param2'
|
||||
}
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.openapi_types
|
||||
{
|
||||
:'param' => :'String',
|
||||
:'param2' => :'String'
|
||||
}
|
||||
end
|
||||
|
||||
# Initializes the object
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
def initialize(attributes = {})
|
||||
if (!attributes.is_a?(Hash))
|
||||
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject4` initialize method"
|
||||
end
|
||||
|
||||
# check to see if the attribute exists and convert string to symbol for hash key
|
||||
attributes = attributes.each_with_object({}) { |(k, v), h|
|
||||
if (!self.class.attribute_map.key?(k.to_sym))
|
||||
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
||||
end
|
||||
h[k.to_sym] = v
|
||||
}
|
||||
|
||||
if attributes.key?(:'param')
|
||||
self.param = attributes[:'param']
|
||||
end
|
||||
|
||||
if attributes.key?(:'param2')
|
||||
self.param2 = attributes[:'param2']
|
||||
end
|
||||
end
|
||||
|
||||
# Show invalid properties with the reasons. Usually used together with valid?
|
||||
# @return Array for valid properties with the reasons
|
||||
def list_invalid_properties
|
||||
invalid_properties = Array.new
|
||||
if @param.nil?
|
||||
invalid_properties.push('invalid value for "param", param cannot be nil.')
|
||||
end
|
||||
|
||||
if @param2.nil?
|
||||
invalid_properties.push('invalid value for "param2", param2 cannot be nil.')
|
||||
end
|
||||
|
||||
invalid_properties
|
||||
end
|
||||
|
||||
# Check to see if the all the properties in the model are valid
|
||||
# @return true if the model is valid
|
||||
def valid?
|
||||
return false if @param.nil?
|
||||
return false if @param2.nil?
|
||||
true
|
||||
end
|
||||
|
||||
# Checks equality by comparing each attribute.
|
||||
# @param [Object] Object to be compared
|
||||
def ==(o)
|
||||
return true if self.equal?(o)
|
||||
self.class == o.class &&
|
||||
param == o.param &&
|
||||
param2 == o.param2
|
||||
end
|
||||
|
||||
# @see the `==` method
|
||||
# @param [Object] Object to be compared
|
||||
def eql?(o)
|
||||
self == o
|
||||
end
|
||||
|
||||
# Calculates hash code according to all attributes.
|
||||
# @return [Integer] Hash code
|
||||
def hash
|
||||
[param, param2].hash
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def self.build_from_hash(attributes)
|
||||
new.build_from_hash(attributes)
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
# Deserializes the data based on type
|
||||
# @param string type Data type
|
||||
# @param string value Value to be deserialized
|
||||
# @return [Object] Deserialized data
|
||||
def _deserialize(type, value)
|
||||
case type.to_sym
|
||||
when :DateTime
|
||||
DateTime.parse(value)
|
||||
when :Date
|
||||
Date.parse(value)
|
||||
when :String
|
||||
value.to_s
|
||||
when :Integer
|
||||
value.to_i
|
||||
when :Float
|
||||
value.to_f
|
||||
when :Boolean
|
||||
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
when :Object
|
||||
# generic object (usually a Hash), return directly
|
||||
value
|
||||
when /\AArray<(?<inner_type>.+)>\z/
|
||||
inner_type = Regexp.last_match[:inner_type]
|
||||
value.map { |v| _deserialize(inner_type, v) }
|
||||
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
||||
k_type = Regexp.last_match[:k_type]
|
||||
v_type = Regexp.last_match[:v_type]
|
||||
{}.tap do |hash|
|
||||
value.each do |k, v|
|
||||
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
||||
end
|
||||
end
|
||||
else # model
|
||||
Petstore.const_get(type).build_from_hash(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the string representation of the object
|
||||
# @return [String] String presentation of the object
|
||||
def to_s
|
||||
to_hash.to_s
|
||||
end
|
||||
|
||||
# to_body is an alias to to_hash (backward compatibility)
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_body
|
||||
to_hash
|
||||
end
|
||||
|
||||
# Returns the object in the form of hash
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_hash
|
||||
hash = {}
|
||||
self.class.attribute_map.each_pair do |attr, param|
|
||||
value = self.send(attr)
|
||||
next if value.nil?
|
||||
hash[param] = _to_hash(value)
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
# Outputs non-array value in the form of hash
|
||||
# For object, use to_hash. Otherwise, just return the value
|
||||
# @param [Object] value Any valid value
|
||||
# @return [Hash] Returns the value in the form of hash
|
||||
def _to_hash(value)
|
||||
if value.is_a?(Array)
|
||||
value.compact.map { |v| _to_hash(v) }
|
||||
elsif value.is_a?(Hash)
|
||||
{}.tap do |hash|
|
||||
value.each { |k, v| hash[k] = _to_hash(v) }
|
||||
end
|
||||
elsif value.respond_to? :to_hash
|
||||
value.to_hash
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,212 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'date'
|
||||
|
||||
module Petstore
|
||||
class InlineObject5
|
||||
# Additional data to pass to server
|
||||
attr_accessor :additional_metadata
|
||||
|
||||
# file to upload
|
||||
attr_accessor :required_file
|
||||
|
||||
# Attribute mapping from ruby-style variable name to JSON key.
|
||||
def self.attribute_map
|
||||
{
|
||||
:'additional_metadata' => :'additionalMetadata',
|
||||
:'required_file' => :'requiredFile'
|
||||
}
|
||||
end
|
||||
|
||||
# Attribute type mapping.
|
||||
def self.openapi_types
|
||||
{
|
||||
:'additional_metadata' => :'String',
|
||||
:'required_file' => :'File'
|
||||
}
|
||||
end
|
||||
|
||||
# Initializes the object
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
def initialize(attributes = {})
|
||||
if (!attributes.is_a?(Hash))
|
||||
fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject5` initialize method"
|
||||
end
|
||||
|
||||
# check to see if the attribute exists and convert string to symbol for hash key
|
||||
attributes = attributes.each_with_object({}) { |(k, v), h|
|
||||
if (!self.class.attribute_map.key?(k.to_sym))
|
||||
fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject5`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
||||
end
|
||||
h[k.to_sym] = v
|
||||
}
|
||||
|
||||
if attributes.key?(:'additional_metadata')
|
||||
self.additional_metadata = attributes[:'additional_metadata']
|
||||
end
|
||||
|
||||
if attributes.key?(:'required_file')
|
||||
self.required_file = attributes[:'required_file']
|
||||
end
|
||||
end
|
||||
|
||||
# Show invalid properties with the reasons. Usually used together with valid?
|
||||
# @return Array for valid properties with the reasons
|
||||
def list_invalid_properties
|
||||
invalid_properties = Array.new
|
||||
if @required_file.nil?
|
||||
invalid_properties.push('invalid value for "required_file", required_file cannot be nil.')
|
||||
end
|
||||
|
||||
invalid_properties
|
||||
end
|
||||
|
||||
# Check to see if the all the properties in the model are valid
|
||||
# @return true if the model is valid
|
||||
def valid?
|
||||
return false if @required_file.nil?
|
||||
true
|
||||
end
|
||||
|
||||
# Checks equality by comparing each attribute.
|
||||
# @param [Object] Object to be compared
|
||||
def ==(o)
|
||||
return true if self.equal?(o)
|
||||
self.class == o.class &&
|
||||
additional_metadata == o.additional_metadata &&
|
||||
required_file == o.required_file
|
||||
end
|
||||
|
||||
# @see the `==` method
|
||||
# @param [Object] Object to be compared
|
||||
def eql?(o)
|
||||
self == o
|
||||
end
|
||||
|
||||
# Calculates hash code according to all attributes.
|
||||
# @return [Integer] Hash code
|
||||
def hash
|
||||
[additional_metadata, required_file].hash
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def self.build_from_hash(attributes)
|
||||
new.build_from_hash(attributes)
|
||||
end
|
||||
|
||||
# Builds the object from hash
|
||||
# @param [Hash] attributes Model attributes in the form of hash
|
||||
# @return [Object] Returns the model itself
|
||||
def build_from_hash(attributes)
|
||||
return nil unless attributes.is_a?(Hash)
|
||||
self.class.openapi_types.each_pair do |key, type|
|
||||
if type =~ /\AArray<(.*)>/i
|
||||
# check to ensure the input is an array given that the attribute
|
||||
# is documented as an array but the input is not
|
||||
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
||||
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
||||
end
|
||||
elsif !attributes[self.class.attribute_map[key]].nil?
|
||||
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
||||
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
||||
end
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
# Deserializes the data based on type
|
||||
# @param string type Data type
|
||||
# @param string value Value to be deserialized
|
||||
# @return [Object] Deserialized data
|
||||
def _deserialize(type, value)
|
||||
case type.to_sym
|
||||
when :DateTime
|
||||
DateTime.parse(value)
|
||||
when :Date
|
||||
Date.parse(value)
|
||||
when :String
|
||||
value.to_s
|
||||
when :Integer
|
||||
value.to_i
|
||||
when :Float
|
||||
value.to_f
|
||||
when :Boolean
|
||||
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
||||
true
|
||||
else
|
||||
false
|
||||
end
|
||||
when :Object
|
||||
# generic object (usually a Hash), return directly
|
||||
value
|
||||
when /\AArray<(?<inner_type>.+)>\z/
|
||||
inner_type = Regexp.last_match[:inner_type]
|
||||
value.map { |v| _deserialize(inner_type, v) }
|
||||
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
||||
k_type = Regexp.last_match[:k_type]
|
||||
v_type = Regexp.last_match[:v_type]
|
||||
{}.tap do |hash|
|
||||
value.each do |k, v|
|
||||
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
||||
end
|
||||
end
|
||||
else # model
|
||||
Petstore.const_get(type).build_from_hash(value)
|
||||
end
|
||||
end
|
||||
|
||||
# Returns the string representation of the object
|
||||
# @return [String] String presentation of the object
|
||||
def to_s
|
||||
to_hash.to_s
|
||||
end
|
||||
|
||||
# to_body is an alias to to_hash (backward compatibility)
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_body
|
||||
to_hash
|
||||
end
|
||||
|
||||
# Returns the object in the form of hash
|
||||
# @return [Hash] Returns the object in the form of hash
|
||||
def to_hash
|
||||
hash = {}
|
||||
self.class.attribute_map.each_pair do |attr, param|
|
||||
value = self.send(attr)
|
||||
next if value.nil?
|
||||
hash[param] = _to_hash(value)
|
||||
end
|
||||
hash
|
||||
end
|
||||
|
||||
# Outputs non-array value in the form of hash
|
||||
# For object, use to_hash. Otherwise, just return the value
|
||||
# @param [Object] value Any valid value
|
||||
# @return [Hash] Returns the value in the form of hash
|
||||
def _to_hash(value)
|
||||
if value.is_a?(Array)
|
||||
value.compact.map { |v| _to_hash(v) }
|
||||
elsif value.is_a?(Hash)
|
||||
{}.tap do |hash|
|
||||
value.each { |k, v| hash[k] = _to_hash(v) }
|
||||
end
|
||||
elsif value.respond_to? :to_hash
|
||||
value.to_hash
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,47 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'spec_helper'
|
||||
require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::InlineObject1
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'InlineObject1' do
|
||||
before do
|
||||
# run before each test
|
||||
@instance = Petstore::InlineObject1.new
|
||||
end
|
||||
|
||||
after do
|
||||
# run after each test
|
||||
end
|
||||
|
||||
describe 'test an instance of InlineObject1' do
|
||||
it 'should create an instance of InlineObject1' do
|
||||
expect(@instance).to be_instance_of(Petstore::InlineObject1)
|
||||
end
|
||||
end
|
||||
describe 'test attribute "additional_metadata"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "file"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,55 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'spec_helper'
|
||||
require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::InlineObject2
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'InlineObject2' do
|
||||
before do
|
||||
# run before each test
|
||||
@instance = Petstore::InlineObject2.new
|
||||
end
|
||||
|
||||
after do
|
||||
# run after each test
|
||||
end
|
||||
|
||||
describe 'test an instance of InlineObject2' do
|
||||
it 'should create an instance of InlineObject2' do
|
||||
expect(@instance).to be_instance_of(Petstore::InlineObject2)
|
||||
end
|
||||
end
|
||||
describe 'test attribute "enum_form_string_array"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', [">", "$"])
|
||||
# validator.allowable_values.each do |value|
|
||||
# expect { @instance.enum_form_string_array = value }.not_to raise_error
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "enum_form_string"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"])
|
||||
# validator.allowable_values.each do |value|
|
||||
# expect { @instance.enum_form_string = value }.not_to raise_error
|
||||
# end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -0,0 +1,119 @@
|
||||
=begin
|
||||
#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: \" \\
|
||||
|
||||
The version of the OpenAPI document: 1.0.0
|
||||
|
||||
Generated by: https://openapi-generator.tech
|
||||
OpenAPI Generator version: 4.1.0-SNAPSHOT
|
||||
|
||||
=end
|
||||
|
||||
require 'spec_helper'
|
||||
require 'json'
|
||||
require 'date'
|
||||
|
||||
# Unit tests for Petstore::InlineObject3
|
||||
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
||||
# Please update as you see appropriate
|
||||
describe 'InlineObject3' do
|
||||
before do
|
||||
# run before each test
|
||||
@instance = Petstore::InlineObject3.new
|
||||
end
|
||||
|
||||
after do
|
||||
# run after each test
|
||||
end
|
||||
|
||||
describe 'test an instance of InlineObject3' do
|
||||
it 'should create an instance of InlineObject3' do
|
||||
expect(@instance).to be_instance_of(Petstore::InlineObject3)
|
||||
end
|
||||
end
|
||||
describe 'test attribute "integer"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "int32"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "int64"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "number"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "float"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "double"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "string"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "pattern_without_delimiter"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "byte"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "binary"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "date"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "date_time"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "password"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
describe 'test attribute "callback"' do
|
||||
it 'should work' do
|
||||
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user