fork of hey-api/openapi-ts because I need some additional things
1{
2 "openapi": "3.0.3",
3 "info": {
4 "title": "OpenAPI 3.0.3 transformers any of null example",
5 "version": "1"
6 },
7 "paths": {
8 "/foo": {
9 "get": {
10 "responses": {
11 "200": {
12 "description": "OK",
13 "content": {
14 "application/json": {
15 "schema": {
16 "type": "array",
17 "items": {
18 "$ref": "#/components/schemas/Foo"
19 }
20 }
21 }
22 }
23 }
24 }
25 }
26 },
27 "/polls": {
28 "get": {
29 "operationId": "getPoll",
30 "responses": {
31 "200": {
32 "description": "OK",
33 "content": {
34 "application/json": {
35 "schema": {
36 "$ref": "#/components/schemas/Poll"
37 }
38 }
39 }
40 }
41 }
42 }
43 },
44 "/polls/nullable": {
45 "get": {
46 "operationId": "getNullablePoll",
47 "responses": {
48 "200": {
49 "description": "OK",
50 "content": {
51 "application/json": {
52 "schema": {
53 "anyOf": [
54 {
55 "$ref": "#/components/schemas/Poll"
56 }
57 ],
58 "nullable": true
59 }
60 }
61 }
62 }
63 }
64 }
65 }
66 },
67 "components": {
68 "schemas": {
69 "Poll": {
70 "type": "object",
71 "properties": {
72 "id": {
73 "type": "integer"
74 },
75 "createdAt": {
76 "type": "string",
77 "format": "date-time"
78 }
79 },
80 "required": ["id", "createdAt"]
81 },
82 "Foo": {
83 "type": "object",
84 "properties": {
85 "foo": {
86 "type": "string",
87 "format": "date-time"
88 },
89 "bar": {
90 "anyOf": [
91 {
92 "type": "string",
93 "nullable": true,
94 "format": "date-time"
95 }
96 ]
97 },
98 "requiredBaz": {
99 "anyOf": [
100 {
101 "type": "string",
102 "nullable": true,
103 "format": "date-time"
104 }
105 ]
106 }
107 },
108 "required": ["requiredBaz"]
109 }
110 }
111 }
112}