Marcel van Lohuizen | 6bf3697 | 2019-08-06 20:15:58 +0200 | [diff] [blame] | 1 | { |
2 | "openapi": "3.0.0", | ||||
3 | "info": {}, | ||||
4 | "components": { | ||||
5 | "schemas": { | ||||
6 | "MyStruct": { | ||||
7 | "type": "object", | ||||
8 | "required": [ | ||||
9 | "contains" | ||||
10 | ], | ||||
11 | "properties": { | ||||
12 | "timestamp1": { | ||||
13 | "type": "string", | ||||
14 | "format": "dateTime" | ||||
15 | }, | ||||
16 | "timestamp2": { | ||||
17 | "type": "string", | ||||
18 | "format": "dateTime" | ||||
19 | }, | ||||
20 | "timestamp3": { | ||||
21 | "type": "string", | ||||
22 | "format": "dateTime" | ||||
23 | }, | ||||
24 | "timestamp4": { | ||||
25 | "type": "string", | ||||
26 | "format": "dateTime" | ||||
27 | }, | ||||
28 | "date1": { | ||||
29 | "type": "string", | ||||
30 | "format": "date" | ||||
31 | }, | ||||
32 | "date2": { | ||||
33 | "type": "string", | ||||
34 | "format": "date" | ||||
35 | }, | ||||
36 | "timeout": { | ||||
37 | "$ref": "#/components/schemas/Duration" | ||||
38 | }, | ||||
39 | "contains": { | ||||
40 | "type": "array" | ||||
41 | } | ||||
42 | } | ||||
43 | }, | ||||
44 | "Duration": { | ||||
45 | "description": "This is not an OpenAPI type and has no format. In this case\nwe map to a type so that it can be documented properly (without\nrepeating it).", | ||||
46 | "type": "string" | ||||
47 | } | ||||
48 | } | ||||
49 | } | ||||
50 | } |