| 1 |
{ |
| 2 |
"definitions": { |
| 3 |
"Cat": { |
| 4 |
"description": "A representation of a cat", |
| 5 |
"allOf": [ |
| 6 |
{ "$ref": "#/models/Pet" }, |
| 7 |
{ |
| 8 |
"properties": { |
| 9 |
"huntingSkill": { |
| 10 |
"type": "string", |
| 11 |
"description": "The measured skill for hunting", |
| 12 |
"default": "lazy", |
| 13 |
"enum": ["clueless", "lazy", "adventerous", "aggressive"] |
| 14 |
} |
| 15 |
}, |
| 16 |
"required": [ "huntingSkill" ] |
| 17 |
} |
| 18 |
] |
| 19 |
}, |
| 20 |
"Dog": { |
| 21 |
"description": "A representation of a dog", |
| 22 |
"allOf": [ |
| 23 |
{ "$ref": "#/models/Pet" }, |
| 24 |
{ |
| 25 |
"properties": { |
| 26 |
"packSize": { |
| 27 |
"type": "integer", |
| 28 |
"format": "int32", |
| 29 |
"description": "the size of the pack the dog is from", |
| 30 |
"default": 0, |
| 31 |
"minimum": 0 |
| 32 |
} |
| 33 |
}, |
| 34 |
"required": [ "name", "packSize" ] |
| 35 |
} |
| 36 |
] |
| 37 |
}, |
| 38 |
"Fish": { |
| 39 |
"description": "A representation of a fish", |
| 40 |
"allOf": [ |
| 41 |
{ "$ref": "#/models/Pet" }, |
| 42 |
{ |
| 43 |
"properties": { |
| 44 |
"fins": { |
| 45 |
"type": "integer", |
| 46 |
"format": "int32", |
| 47 |
"description": "count of fins", |
| 48 |
"minimum": 0 |
| 49 |
} |
| 50 |
}, |
| 51 |
"required": [ "fins" ] |
| 52 |
} |
| 53 |
] |
| 54 |
}, |
| 55 |
"Pet": { |
| 56 |
"discriminator": "petType", |
| 57 |
"properties": { |
| 58 |
"name": { |
| 59 |
"type": "string" |
| 60 |
}, |
| 61 |
"petType": { |
| 62 |
"type": "string" |
| 63 |
} |
| 64 |
}, |
| 65 |
"required": [ "name", "petType" ] |
| 66 |
} |
| 67 |
} |
| 68 |
} |