-
-
Notifications
You must be signed in to change notification settings - Fork 211
/
serialized.objects.yaml
162 lines (158 loc) · 4.38 KB
/
serialized.objects.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
openapi: "3.0.2"
info:
version: 1.0.0
title: Request Query Serialization
description: Request Query Serialization Test
servers:
- url: /v1/
paths:
/deep_object:
x-vendorExtension1: accounts
get:
x-vendorExtension2: accounts
summary: "retrieve a deep object"
operationId: getDeepObject
parameters:
- in: query
style: deepObject
explode: true
name: settings
schema:
type: object
properties:
tag_ids:
type: array
items:
type: integer
minimum: 0
minItems: 1
state:
type: string
enum: ["default", "validated", "pending"]
default: "default"
description: "Filter the tags by their validity. The default value ('default') stands for no filtering."
greeting:
type: string
default: "hello"
responses:
"200":
description: the object
/deep_object_2:
get:
summary: "retrieve a deep object"
operationId: getDeepObject2
parameters:
- in: query
style: deepObject
explode: true
name: settings
schema:
$ref: '#/components/schemas/Deep'
responses:
"200":
description: the object
/tags:
get:
summary: "Retrieve all tags"
operationId: getTags
parameters:
- in: query
style: form
name: settings
explode: true
schema:
type: object
properties:
tag_ids:
type: array
items:
type: integer
minimum: 0
minItems: 1
state:
type: string
enum: ["default", "validated", "pending"]
default: "default"
description: "Filter the tags by their validity. The default value ('default') stands for no filtering."
responses:
"200":
description: "An array of tag"
/serialisable:
get:
summary: "Retrieve something"
parameters:
- in: query
style: form
name: settings
description: Should be serialized
explode: true
schema:
allOf:
- type: object
properties:
onlyValidated:
type: boolean
default: true
onlySelected:
type: array
default: []
uniqueItems: true
items:
type: integer
minimum: 0
example: 42
- in: query
name: timestamp
description: Should not be serialized
schema:
description: Value passed to Javascript's `new Date()`.
example: "2019-06-24T12:34:56.789Z"
anyOf:
- type: integer
description: Unix milliseconds
example: 1234567890123
nullable: true
- type: string
description: ISO Timestamp
pattern: \S
- in: query
name: fooBar
description: Should be serialized if an object
schema:
oneOf:
- type: string
pattern: fooBar
- type: object
properties:
foo:
type: string
pattern: bar
additionalProperties: false
required:
- foo
responses:
"200":
description: parsed & validated query params
content:
application/json:
schema:
type: object
components:
schemas:
Deep:
type: object
properties:
tag_ids:
type: array
items:
type: integer
minimum: 0
minItems: 1
state:
type: string
enum: ["default", "validated", "pending"]
default: "default"
description: "Filter the tags by their validity. The default value ('default') stands for no filtering."
greeting:
type: string
default: "hello"