-
Notifications
You must be signed in to change notification settings - Fork 4
/
apispec.yaml
166 lines (166 loc) · 5.11 KB
/
apispec.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
163
164
165
166
openapi: 3.0.3
info:
description: API for managing Formfield resources.
version: 0.0.1
title: Formfields API
servers:
- url: SERVER_URL
security: []
paths:
/formfields:
get:
summary: List 'Formfield' objects.
description: Retrieve a page of 'Formfield' objects from the server. Follows
the standards for parameters from the [List AIP]( https://aip.dev/132).
parameters:
- name: pageSize
in: query
description: Max size of returned list.
schema:
type: integer
default: "25"
- name: pageToken
in: query
description: A page token recieved from the previous list call. Provide this
to retrieve the next page.
schema:
type: string
- name: orderBy
in: query
description: The ordering of the returned list. See the [List Ordering API](
https://aip.dev/132) for details on the formatting of this field.
schema:
type: string
default: displayName
- name: filter
in: query
description: Filter that will be used to select Formfield objects to return.
See the [Filtering AIP](https://aip.dev/160) for usage and details on the
filtering grammar.
schema:
type: string
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: object
properties:
formfields:
type: array
items:
$ref: '#/components/schemas/ListOfFormfields'
post:
summary: Creates a new 'Formfield' object.
description: Creates a new 'Formfield' object.
requestBody:
description: The Formfield object to create.
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/Formfield'
responses:
"201":
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Formfield'
/formfields/{formfield}:
get:
summary: Retrieve Formfield object.
description: Retrieve a single Formfield object.
parameters:
- name: formfield
in: path
required: true
description: Unique identifier of the desired Formfield object.
schema:
type: string
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Formfield'
"404":
description: Formfield was not found.
put:
summary: Update Formfield object.
description: Update a single Formfield object.
parameters:
- name: formfield
in: path
required: true
description: Unique identifier of the desired Formfield object.
schema:
type: string
requestBody:
description: The Formfield object to update.
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/Formfield'
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Formfield'
"404":
description: Formfield was not found.
delete:
summary: Delete Formfield object.
description: Delete a single Formfield object.
parameters:
- name: formfield
in: path
required: true
description: Unique identifier of the desired Formfield object.
schema:
type: string
responses:
"200":
description: Successful response
"404":
description: Formfield was not found.
components:
securitySchemes: {}
schemas:
Formfield:
title: Formfield
type: object
properties:
_id:
description: The _id of the Formfield
type: string
example: 61423ce41b520b8e9296fca3
documentId:
description: The documentId of the Formfield
type: string
example: jdkjrk3
documentPath:
description: The documentPath of the Formfield
type: string
example: /path/to/doc
formFields:
description: The formFields of the Formfield
type: string
example: "\nEnglish\n=☑ \nFrançais\n=\nEsperanto\n=\nHouse nr: =88\n\nPostcode:\n=12345\n\nDeutsch
=☐ \nLatin\n=☐ \nGender:\n=Man\n\nCity: =Hobiton\n\nGiven Name:\n=Bilbo\n\nFamily
Name:\n=Baggins\n\nAddress 1:\n=Bag End\n\nHeight (cm):\n=65\n\nCountry:\n=The
Shire\n\nFavourite colour:\n=Red\n\nDriving License:\n="
formId:
description: The formId of the Formfield
type: string
example: test123
ListOfFormfields:
title: List of Formfield objects
type: array
items:
$ref: '#/components/schemas/Formfield'