{"openapi":"3.0.0","info":{"version":"1.0.0","title":"Swagger Petstore","license":{"name":"MIT"}},"servers":[{"url":"http://petstore.swagger.io/v1"}],"paths":{"/pets":{"post":{"summary":"Create a pet","description":"This polymorphic endpoint is here to populate.","requestBody":{"required":true,"description":"This description is about requestBody","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Pet"},{"$ref":"#/components/schemas/Human"}],"discriminator":{"propertyName":"type","mapping":{"pet":"#/components/schemas/Pet","human":"#/components/schemas/Human"}}}}}},"responses":{"default":{"description":"Default response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/ErrorBis"}]}}}},"200":{"description":"Simple response - no alternatives","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","default":42},"message":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Cat":{"type":"object","description":"I want to describe... 🐈 cat","required":["kind"],"properties":{"kind":{"type":"string"},"hunts":{"type":"boolean"},"age":{"type":"integer"},"lives":{"type":"integer","default":7},"name":{"oneOf":[{"type":"string","title":"Padme","default":"Padme","description":"❤️ PaulR"},{"type":"string","title":"Alan","default":"Alan","description":"❤️ Antho"},{"type":"string","title":"Patemolle","default":"Patemolle","description":"❤️ Seb"}]}}},"Dog":{"type":"object","description":"I want to describe... 🐕 dog","required":["kind"],"properties":{"kind":{"type":"string"},"bones":{"type":"boolean","description":"This pet love bones","default":true},"name":{"anyOf":[{"type":"string","title":"Juna","default":"Juna","description":"❤️ Thimy"},{"type":"string","title":"Pixel","default":"Pixel","description":"❤️ Jay","enum":["Monstro","Potatoe","Crapouillou","Agent Jambonneau"]},{"type":"string","title":"Popit","default":"Popit","description":"❤️ Sarah","enum":["My Croquette"]}]}}},"Pet":{"type":"object","description":"I want to describe... 🦄 any Pets","required":["type","animal"],"properties":{"type":{"type":"string"},"animal":{"type":"object","required":["species"],"properties":{"species":{"oneOf":[{"$ref":"#/components/schemas/Dog"},{"$ref":"#/components/schemas/Cat"}],"discriminator":{"propertyName":"kind","mapping":{"🐕":"#/components/schemas/Dog","🐈":"#/components/schemas/Cat"}}}}}}},"Human":{"type":"object","description":"I want to describe... 🚻 humans","required":["type"],"properties":{"type":{"type":"string"},"country":{"type":"string","default":"Argentina"},"name":{"type":"string","default":"Bob"}}},"Error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorBis":{"type":"object","required":["code"],"properties":{"code":{"type":"integer","default":42},"message":{"anyOf":[{"type":"string","title":"FirstMessage","enum":["foo","bar"]},{"type":"integer","title":"LastMessage","minimim":17,"maximum":42}]}}}}}}