Responses
-
Simple response - no alternatives
-
Default response
POST /pets
curl \
-X POST http://petstore.swagger.io/v1/pets \
-H "Content-Type: application/json" \
-d '{"type":"pet","animal":{"species":{"kind":"🐕","bones":true,"name":"Juna"}}}'
Request examples
Human (generated)
{
"type": "human",
"country": "Argentina",
"name": "Bob"
}
{
"type": "pet",
"animal": {
"species": {
"kind": "🐕",
"bones": true,
"name": "Juna"
}
}
}
Request examples
Pet (generated)
{
"type": "pet",
"animal": {
"species": {
"kind": "🐕",
"bones": true,
"name": "Juna"
}
}
}
{
"type": "human",
"country": "Argentina",
"name": "Bob"
}
Response examples (200)
{
"code": 42,
"message": "string"
}
Response examples (200)
{
"code": 42,
"message": "string"
}
Response examples (default)
Error (generated)
{
"message": "string"
}
{
"code": 42,
"message": "foo"
}
Response examples (default)
Error (generated)
{
"message": "string"
}
{
"code": 42,
"message": "foo"
}