...
1swagger: '2.0'
2info:
3 title: Object
4 version: 0.1.0
5
6paths:
7 /:
8 get:
9 parameters:
10 - name: itemsparam
11 in: body
12 schema:
13 type: array
14 items:
15 type: object
16 required: [ items ]
17 properties:
18 items:
19 type: number
20 example:
21 - items: 123
22 - items: 456
23 responses:
24 '200':
25 description: Ok
26 schema:
27 type: object
28 properties:
29 a:
30 type: string
31 items:
32 type: string
33 default: "xyz"
34 example: "123"
35 examples:
36 application/json:
37 a: abc
38 items: xyz
39 # we verify that it is legal to name a property "type" or "properties"
40 /type:
41 get:
42 parameters:
43 - name: typeparam
44 in: body
45 schema:
46 type: object
47 properties:
48 type:
49 type: string
50 example: z
51 properties:
52 type: number
53 example: 1
54 default: { "type": "abc", "properties": 123 }
55 example: { "type": "abc", "properties": 123 }
56 responses:
57 '200':
58 description: Ok
59 schema:
60 type: object
61 properties:
62 type:
63 type: string
64 properties:
65 type: number
66 default: 123
67 example: 123
68 examples:
69 application/json:
70 type: abc
71 properties: 123
View as plain text