Add a new pet to the store
POST
/pet请求参数
Body 参数application/x-www-form-urlencoded
name
string
Pet Name
示例值:
Hello Kitty
status
string
必需
Pet Sales Status
示例值:
sold
示例代码
返回响应
OK(201)
HTTP 状态码: 201
内容格式: JSONapplication/json
数据结构
code
integer
必需
>= 0<= 0
data
object (Pet)
必需
id
integer <int64>
Pet ID
>= 1
category
object (Category)
group
name
string
name
示例值:
doggie
photoUrls
array[string]
image URL
tags
array[object (Tag) {2}]
tag
status
enum<string>
必需
Pet Sales Status
枚举值:
availablependingsold
示例
{
"code": 0,
"data": {
"name": "Hello Kity",
"photoUrls": [
"http://dummyimage.com/400x400"
],
"id": 3,
"category": {
"id": 71,
"name": "Cat"
},
"tags": [
{
"id": 22,
"name": "Cat"
}
],
"status": "sold"
}
}
最后修改时间: 1 年前