fork of hey-api/openapi-ts because I need some additional things
1{
2 "openapi": "3.1.0",
3 "info": {
4 "title": "OpenAPI 3.1.0 validators union merge example",
5 "version": "1"
6 },
7 "components": {
8 "schemas": {
9 "User": {
10 "allOf": [
11 {
12 "$ref": "#/components/schemas/Contact"
13 },
14 {
15 "properties": {
16 "username": {
17 "type": "string"
18 }
19 },
20 "required": ["username"],
21 "type": "object"
22 }
23 ]
24 },
25 "Contact": {
26 "oneOf": [
27 {
28 "properties": {
29 "email": {
30 "type": "string"
31 }
32 },
33 "required": ["email"],
34 "type": "object"
35 },
36 {
37 "properties": {
38 "phone": {
39 "type": "string"
40 }
41 },
42 "required": ["phone"],
43 "type": "object"
44 }
45 ]
46 },
47 "PetStore": {
48 "type": "object",
49 "required": ["animals"],
50 "properties": {
51 "animals": {
52 "type": "array",
53 "items": {
54 "type": "object",
55 "required": ["name", "details"],
56 "properties": {
57 "name": {
58 "type": "string"
59 },
60 "type": {
61 "type": "string",
62 "enum": ["dog", "cat"],
63 "default": "dog"
64 },
65 "details": {
66 "oneOf": [
67 { "$ref": "#/components/schemas/DogDetails" },
68 { "$ref": "#/components/schemas/CatDetails" }
69 ]
70 }
71 }
72 }
73 }
74 }
75 },
76 "DogDetails": {
77 "type": "object",
78 "required": ["breed", "barkVolume"],
79 "properties": {
80 "breed": {
81 "type": "string"
82 },
83 "barkVolume": {
84 "type": "integer",
85 "minimum": 1,
86 "maximum": 10
87 }
88 }
89 },
90 "CatDetails": {
91 "type": "object",
92 "required": ["furLength", "purrs"],
93 "properties": {
94 "furLength": {
95 "type": "string",
96 "enum": ["short", "medium", "long"]
97 },
98 "purrs": {
99 "type": "boolean"
100 }
101 }
102 }
103 }
104 }
105}