forked from loafle/openapi-generator-original
[Python] fix numeric enum in python flask, aiohttp (#5019)
* minor code format fix * fix numeric enum in python flask and aiohttp * add python-server-all.sh to ensure-up-to-date
This commit is contained in:
parent
6a34706a9b
commit
fff759b79c
@ -39,6 +39,7 @@ declare -a samples=(
|
|||||||
"${root}/bin/mysql-schema-petstore.sh"
|
"${root}/bin/mysql-schema-petstore.sh"
|
||||||
"${root}/bin/nim-client-petstore.sh"
|
"${root}/bin/nim-client-petstore.sh"
|
||||||
"${root}/bin/python-petstore-all.sh"
|
"${root}/bin/python-petstore-all.sh"
|
||||||
|
"${root}/bin/python-server-all.sh"
|
||||||
"${root}/bin/openapi3/python-petstore.sh"
|
"${root}/bin/openapi3/python-petstore.sh"
|
||||||
"${root}/bin/php-petstore.sh"
|
"${root}/bin/php-petstore.sh"
|
||||||
"${root}/bin/php-silex-petstore-server.sh"
|
"${root}/bin/php-silex-petstore-server.sh"
|
||||||
|
@ -276,7 +276,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
// If the package name consists of dots(openapi.client), then we need to create the directory structure like openapi/client with __init__ files.
|
// If the package name consists of dots(openapi.client), then we need to create the directory structure like openapi/client with __init__ files.
|
||||||
String[] packageNameSplits = packageName.split("\\.");
|
String[] packageNameSplits = packageName.split("\\.");
|
||||||
String currentPackagePath = "";
|
String currentPackagePath = "";
|
||||||
for (int i = 0; i < packageNameSplits.length-1; i++) {
|
for (int i = 0; i < packageNameSplits.length - 1; i++) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
currentPackagePath = currentPackagePath + File.separatorChar;
|
currentPackagePath = currentPackagePath + File.separatorChar;
|
||||||
}
|
}
|
||||||
@ -566,7 +566,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
name = name.replaceAll("-", "_");
|
name = name.replaceAll("-", "_");
|
||||||
|
|
||||||
// e.g. PhoneNumberApi.py => phone_number_api.py
|
// e.g. PhoneNumberApi.py => phone_number_api.py
|
||||||
return underscore(name+ "_" + apiNameSuffix);
|
return underscore(name + "_" + apiNameSuffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -584,7 +584,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
if (name.length() == 0) {
|
if (name.length() == 0) {
|
||||||
return "default_api";
|
return "default_api";
|
||||||
}
|
}
|
||||||
return underscore(name+ "_" + apiNameSuffix);
|
return underscore(name + "_" + apiNameSuffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -649,6 +649,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the default value of the property
|
* Return the default value of the property
|
||||||
|
*
|
||||||
* @param p OpenAPI property object
|
* @param p OpenAPI property object
|
||||||
* @return string presentation of the default value of the property
|
* @return string presentation of the default value of the property
|
||||||
*/
|
*/
|
||||||
@ -678,7 +679,7 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig
|
|||||||
if (Pattern.compile("\r\n|\r|\n").matcher((String) p.getDefault()).find())
|
if (Pattern.compile("\r\n|\r|\n").matcher((String) p.getDefault()).find())
|
||||||
return "'''" + p.getDefault() + "'''";
|
return "'''" + p.getDefault() + "'''";
|
||||||
else
|
else
|
||||||
return "'" + ((String) p.getDefault()).replaceAll("'","\'") + "'";
|
return "'" + ((String) p.getDefault()).replaceAll("'", "\'") + "'";
|
||||||
}
|
}
|
||||||
} else if (ModelUtils.isArraySchema(p)) {
|
} else if (ModelUtils.isArraySchema(p)) {
|
||||||
if (p.getDefault() != null) {
|
if (p.getDefault() != null) {
|
||||||
|
@ -89,8 +89,8 @@ class {{classname}}(Model):
|
|||||||
:type {{name}}: {{dataType}}
|
:type {{name}}: {{dataType}}
|
||||||
"""
|
"""
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}]
|
|
||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
|
allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
|
||||||
{{#isListContainer}}
|
{{#isListContainer}}
|
||||||
if not set({{{name}}}).issubset(set(allowed_values)):
|
if not set({{{name}}}).issubset(set(allowed_values)):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
@ -109,6 +109,7 @@ class {{classname}}(Model):
|
|||||||
{{/isMapContainer}}
|
{{/isMapContainer}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
|
allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
|
||||||
if {{{name}}} not in allowed_values:
|
if {{{name}}} not in allowed_values:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid value for `{{{name}}}` ({0}), must be one of {1}"
|
"Invalid value for `{{{name}}}` ({0}), must be one of {1}"
|
||||||
|
@ -25,7 +25,8 @@ class {{classname}}(Model):
|
|||||||
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
"""NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
|
||||||
Do not edit the class manually.
|
Do not edit the class manually.
|
||||||
"""{{#allowableValues}}
|
"""
|
||||||
|
{{#allowableValues}}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
allowed enum values
|
allowed enum values
|
||||||
@ -33,7 +34,8 @@ class {{classname}}(Model):
|
|||||||
{{#enumVars}}
|
{{#enumVars}}
|
||||||
{{name}} = {{{value}}}{{^-last}}
|
{{name}} = {{{value}}}{{^-last}}
|
||||||
{{/-last}}
|
{{/-last}}
|
||||||
{{/enumVars}}{{/allowableValues}}
|
{{/enumVars}}
|
||||||
|
{{/allowableValues}}
|
||||||
|
|
||||||
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
|
def __init__(self{{#vars}}, {{name}}={{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}None{{/defaultValue}}{{/vars}}): # noqa: E501
|
||||||
"""{{classname}} - a model defined in OpenAPI
|
"""{{classname}} - a model defined in OpenAPI
|
||||||
@ -96,8 +98,8 @@ class {{classname}}(Model):
|
|||||||
:type {{name}}: {{dataType}}
|
:type {{name}}: {{dataType}}
|
||||||
"""
|
"""
|
||||||
{{#isEnum}}
|
{{#isEnum}}
|
||||||
allowed_values = [{{#allowableValues}}{{#values}}"{{{this}}}"{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
|
|
||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
|
allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#items.isString}}"{{/items.isString}}{{{this}}}{{#items.isString}}"{{/items.isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
|
||||||
{{#isListContainer}}
|
{{#isListContainer}}
|
||||||
if not set({{{name}}}).issubset(set(allowed_values)):
|
if not set({{{name}}}).issubset(set(allowed_values)):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
@ -116,6 +118,7 @@ class {{classname}}(Model):
|
|||||||
{{/isMapContainer}}
|
{{/isMapContainer}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
|
allowed_values = [{{#isNullable}}None,{{/isNullable}}{{#allowableValues}}{{#values}}{{#isString}}"{{/isString}}{{{this}}}{{#isString}}"{{/isString}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}] # noqa: E501
|
||||||
if {{{name}}} not in allowed_values:
|
if {{{name}}} not in allowed_values:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid value for `{{{name}}}` ({0}), must be one of {1}"
|
"Invalid value for `{{{name}}}` ({0}), must be one of {1}"
|
||||||
|
@ -162,7 +162,7 @@ class Order(Model):
|
|||||||
:param status: The status of this Order.
|
:param status: The status of this Order.
|
||||||
:type status: str
|
:type status: str
|
||||||
"""
|
"""
|
||||||
allowed_values = ["placed", "approved", "delivered"]
|
allowed_values = ["placed", "approved", "delivered"] # noqa: E501
|
||||||
if status not in allowed_values:
|
if status not in allowed_values:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid value for `status` ({0}), must be one of {1}"
|
"Invalid value for `status` ({0}), must be one of {1}"
|
||||||
|
@ -189,7 +189,7 @@ class Pet(Model):
|
|||||||
:param status: The status of this Pet.
|
:param status: The status of this Pet.
|
||||||
:type status: str
|
:type status: str
|
||||||
"""
|
"""
|
||||||
allowed_values = ["available", "pending", "sold"]
|
allowed_values = ["available", "pending", "sold"] # noqa: E501
|
||||||
if status not in allowed_values:
|
if status not in allowed_values:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid value for `status` ({0}), must be one of {1}"
|
"Invalid value for `status` ({0}), must be one of {1}"
|
||||||
|
@ -32,7 +32,7 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
x-body-name: body
|
x-body-name: body
|
||||||
responses:
|
responses:
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid input
|
description: Invalid input
|
||||||
security:
|
security:
|
||||||
@ -58,13 +58,13 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
x-body-name: body
|
x-body-name: body
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Pet not found
|
description: Pet not found
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Validation exception
|
description: Validation exception
|
||||||
security:
|
security:
|
||||||
@ -97,7 +97,7 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
style: form
|
style: form
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -110,7 +110,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
type: array
|
type: array
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid status value
|
description: Invalid status value
|
||||||
security:
|
security:
|
||||||
@ -139,7 +139,7 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
style: form
|
style: form
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -152,7 +152,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
type: array
|
type: array
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid tag value
|
description: Invalid tag value
|
||||||
security:
|
security:
|
||||||
@ -179,7 +179,7 @@ paths:
|
|||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid pet value
|
description: Invalid pet value
|
||||||
security:
|
security:
|
||||||
@ -202,7 +202,7 @@ paths:
|
|||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -211,10 +211,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Pet not found
|
description: Pet not found
|
||||||
security:
|
security:
|
||||||
@ -246,7 +246,7 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
x-body-name: body
|
x-body-name: body
|
||||||
responses:
|
responses:
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid input
|
description: Invalid input
|
||||||
security:
|
security:
|
||||||
@ -283,7 +283,7 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
x-body-name: body
|
x-body-name: body
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@ -303,7 +303,7 @@ paths:
|
|||||||
description: Returns a map of status codes to quantities
|
description: Returns a map of status codes to quantities
|
||||||
operationId: get_inventory
|
operationId: get_inventory
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@ -330,7 +330,7 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
x-body-name: body
|
x-body-name: body
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -339,7 +339,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Order'
|
$ref: '#/components/schemas/Order'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid Order
|
description: Invalid Order
|
||||||
summary: Place an order for a pet
|
summary: Place an order for a pet
|
||||||
@ -360,10 +360,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Order not found
|
description: Order not found
|
||||||
summary: Delete purchase order by ID
|
summary: Delete purchase order by ID
|
||||||
@ -385,7 +385,7 @@ paths:
|
|||||||
minimum: 1
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -394,10 +394,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Order'
|
$ref: '#/components/schemas/Order'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Order not found
|
description: Order not found
|
||||||
summary: Find purchase order by ID
|
summary: Find purchase order by ID
|
||||||
@ -486,7 +486,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -506,7 +506,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
format: date-time
|
format: date-time
|
||||||
type: string
|
type: string
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username/password supplied
|
description: Invalid username/password supplied
|
||||||
summary: Logs user into the system
|
summary: Logs user into the system
|
||||||
@ -536,10 +536,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username supplied
|
description: Invalid username supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Delete user
|
summary: Delete user
|
||||||
@ -556,7 +556,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -565,10 +565,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/User'
|
$ref: '#/components/schemas/User'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username supplied
|
description: Invalid username supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Get user by user name
|
summary: Get user by user name
|
||||||
@ -594,10 +594,10 @@ paths:
|
|||||||
required: true
|
required: true
|
||||||
x-body-name: body
|
x-body-name: body
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid user supplied
|
description: Invalid user supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Updated user
|
summary: Updated user
|
||||||
|
@ -31,7 +31,7 @@ paths:
|
|||||||
description: Pet object that needs to be added to the store
|
description: Pet object that needs to be added to the store
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid input
|
description: Invalid input
|
||||||
security:
|
security:
|
||||||
@ -56,13 +56,13 @@ paths:
|
|||||||
description: Pet object that needs to be added to the store
|
description: Pet object that needs to be added to the store
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Pet not found
|
description: Pet not found
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Validation exception
|
description: Validation exception
|
||||||
security:
|
security:
|
||||||
@ -95,7 +95,7 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
style: form
|
style: form
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -108,7 +108,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
type: array
|
type: array
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid status value
|
description: Invalid status value
|
||||||
security:
|
security:
|
||||||
@ -137,7 +137,7 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
style: form
|
style: form
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -150,7 +150,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
type: array
|
type: array
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid tag value
|
description: Invalid tag value
|
||||||
security:
|
security:
|
||||||
@ -177,7 +177,7 @@ paths:
|
|||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid pet value
|
description: Invalid pet value
|
||||||
security:
|
security:
|
||||||
@ -200,7 +200,7 @@ paths:
|
|||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -209,10 +209,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Pet not found
|
description: Pet not found
|
||||||
security:
|
security:
|
||||||
@ -243,7 +243,7 @@ paths:
|
|||||||
description: Updated status of the pet
|
description: Updated status of the pet
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid input
|
description: Invalid input
|
||||||
security:
|
security:
|
||||||
@ -278,7 +278,7 @@ paths:
|
|||||||
format: binary
|
format: binary
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@ -297,7 +297,7 @@ paths:
|
|||||||
description: Returns a map of status codes to quantities
|
description: Returns a map of status codes to quantities
|
||||||
operationId: get_inventory
|
operationId: get_inventory
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@ -323,7 +323,7 @@ paths:
|
|||||||
description: order placed for purchasing the pet
|
description: order placed for purchasing the pet
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -332,7 +332,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Order'
|
$ref: '#/components/schemas/Order'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid Order
|
description: Invalid Order
|
||||||
summary: Place an order for a pet
|
summary: Place an order for a pet
|
||||||
@ -353,10 +353,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Order not found
|
description: Order not found
|
||||||
summary: Delete purchase order by ID
|
summary: Delete purchase order by ID
|
||||||
@ -378,7 +378,7 @@ paths:
|
|||||||
minimum: 1
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -387,10 +387,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Order'
|
$ref: '#/components/schemas/Order'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Order not found
|
description: Order not found
|
||||||
summary: Find purchase order by ID
|
summary: Find purchase order by ID
|
||||||
@ -476,7 +476,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -496,7 +496,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
format: date-time
|
format: date-time
|
||||||
type: string
|
type: string
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username/password supplied
|
description: Invalid username/password supplied
|
||||||
summary: Logs user into the system
|
summary: Logs user into the system
|
||||||
@ -526,10 +526,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username supplied
|
description: Invalid username supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Delete user
|
summary: Delete user
|
||||||
@ -546,7 +546,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -555,10 +555,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/User'
|
$ref: '#/components/schemas/User'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username supplied
|
description: Invalid username supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Get user by user name
|
summary: Get user by user name
|
||||||
@ -583,10 +583,10 @@ paths:
|
|||||||
description: Updated user object
|
description: Updated user object
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid user supplied
|
description: Invalid user supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Updated user
|
summary: Updated user
|
||||||
|
@ -31,7 +31,7 @@ paths:
|
|||||||
description: Pet object that needs to be added to the store
|
description: Pet object that needs to be added to the store
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid input
|
description: Invalid input
|
||||||
security:
|
security:
|
||||||
@ -56,13 +56,13 @@ paths:
|
|||||||
description: Pet object that needs to be added to the store
|
description: Pet object that needs to be added to the store
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Pet not found
|
description: Pet not found
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Validation exception
|
description: Validation exception
|
||||||
security:
|
security:
|
||||||
@ -95,7 +95,7 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
style: form
|
style: form
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -108,7 +108,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
type: array
|
type: array
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid status value
|
description: Invalid status value
|
||||||
security:
|
security:
|
||||||
@ -137,7 +137,7 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
style: form
|
style: form
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -150,7 +150,7 @@ paths:
|
|||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
type: array
|
type: array
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid tag value
|
description: Invalid tag value
|
||||||
security:
|
security:
|
||||||
@ -177,7 +177,7 @@ paths:
|
|||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid pet value
|
description: Invalid pet value
|
||||||
security:
|
security:
|
||||||
@ -200,7 +200,7 @@ paths:
|
|||||||
format: int64
|
format: int64
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -209,10 +209,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Pet'
|
$ref: '#/components/schemas/Pet'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Pet not found
|
description: Pet not found
|
||||||
security:
|
security:
|
||||||
@ -243,7 +243,7 @@ paths:
|
|||||||
description: Updated status of the pet
|
description: Updated status of the pet
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
405:
|
"405":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid input
|
description: Invalid input
|
||||||
security:
|
security:
|
||||||
@ -278,7 +278,7 @@ paths:
|
|||||||
format: binary
|
format: binary
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@ -297,7 +297,7 @@ paths:
|
|||||||
description: Returns a map of status codes to quantities
|
description: Returns a map of status codes to quantities
|
||||||
operationId: get_inventory
|
operationId: get_inventory
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
@ -323,7 +323,7 @@ paths:
|
|||||||
description: order placed for purchasing the pet
|
description: order placed for purchasing the pet
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -332,7 +332,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Order'
|
$ref: '#/components/schemas/Order'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid Order
|
description: Invalid Order
|
||||||
summary: Place an order for a pet
|
summary: Place an order for a pet
|
||||||
@ -353,10 +353,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Order not found
|
description: Order not found
|
||||||
summary: Delete purchase order by ID
|
summary: Delete purchase order by ID
|
||||||
@ -378,7 +378,7 @@ paths:
|
|||||||
minimum: 1
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -387,10 +387,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/Order'
|
$ref: '#/components/schemas/Order'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid ID supplied
|
description: Invalid ID supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: Order not found
|
description: Order not found
|
||||||
summary: Find purchase order by ID
|
summary: Find purchase order by ID
|
||||||
@ -476,7 +476,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -496,7 +496,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
format: date-time
|
format: date-time
|
||||||
type: string
|
type: string
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username/password supplied
|
description: Invalid username/password supplied
|
||||||
summary: Logs user into the system
|
summary: Logs user into the system
|
||||||
@ -526,10 +526,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username supplied
|
description: Invalid username supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Delete user
|
summary: Delete user
|
||||||
@ -546,7 +546,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
200:
|
"200":
|
||||||
content:
|
content:
|
||||||
application/xml:
|
application/xml:
|
||||||
schema:
|
schema:
|
||||||
@ -555,10 +555,10 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/User'
|
$ref: '#/components/schemas/User'
|
||||||
description: successful operation
|
description: successful operation
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid username supplied
|
description: Invalid username supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Get user by user name
|
summary: Get user by user name
|
||||||
@ -583,10 +583,10 @@ paths:
|
|||||||
description: Updated user object
|
description: Updated user object
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
400:
|
"400":
|
||||||
content: {}
|
content: {}
|
||||||
description: Invalid user supplied
|
description: Invalid user supplied
|
||||||
404:
|
"404":
|
||||||
content: {}
|
content: {}
|
||||||
description: User not found
|
description: User not found
|
||||||
summary: Updated user
|
summary: Updated user
|
||||||
|
Loading…
x
Reference in New Issue
Block a user