/
serialized.objects.yaml
71 lines (68 loc) 路 1.91 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
openapi: '3.0.2'
info:
version: 1.0.0
title: Request Query Serialization
description: Request Query Serialization Test
servers:
- url: /v1/
paths:
/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