fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at feat/use-query-options 84 lines 2.1 kB view raw
1{ 2 "openapi": "3.0.3", 3 "info": { 4 "title": "Minimal Polymorphic Discriminator Reproduction", 5 "version": "1.0.0", 6 "description": "Demonstrates an issue where TypeScript type generation results in wrong discriminator for nested allOf inheritance with discriminators at multiple levels." 7 }, 8 "paths": { 9 "/cars": { 10 "get": { 11 "summary": "Get cars", 12 "responses": { 13 "200": { 14 "description": "List of cars", 15 "content": { 16 "application/json": { 17 "schema": { 18 "type": "array", 19 "items": { 20 "oneOf": [ 21 { "$ref": "#/components/schemas/CarDto" }, 22 { "$ref": "#/components/schemas/VolvoDto" } 23 ] 24 } 25 } 26 } 27 } 28 } 29 } 30 } 31 } 32 }, 33 "components": { 34 "schemas": { 35 "VehicleDto": { 36 "type": "object", 37 "required": ["$type", "id"], 38 "properties": { 39 "$type": { 40 "type": "string" 41 }, 42 "id": { 43 "type": "integer" 44 } 45 }, 46 "discriminator": { 47 "propertyName": "$type", 48 "mapping": { 49 "Car": "#/components/schemas/CarDto", 50 "Volvo": "#/components/schemas/VolvoDto" 51 } 52 } 53 }, 54 "CarDto": { 55 "allOf": [ 56 { "$ref": "#/components/schemas/VehicleDto" }, 57 { 58 "type": "object", 59 "required": ["modelName"], 60 "properties": { 61 "modelName": { 62 "type": "string" 63 } 64 } 65 } 66 ] 67 }, 68 "VolvoDto": { 69 "allOf": [ 70 { "$ref": "#/components/schemas/CarDto" }, 71 { 72 "type": "object", 73 "required": ["seatbeltCount"], 74 "properties": { 75 "seatbeltCount": { 76 "type": "integer" 77 } 78 } 79 } 80 ] 81 } 82 } 83 } 84}