Skip to content

Commit 1c75b78

Browse files
committed
Add DeviceId to the OpenAPI spec
This adds a DeviceId component to the OpenAPI spec. It is an optional paramater header and has been added to all API endpoints.
1 parent 4c7c49e commit 1c75b78

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/api_openapi_specification.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ paths:
1818
post:
1919
summary: Start conversation
2020
description: Create a conversation by posting an initial question
21+
parameters:
22+
- $ref: "#/components/parameters/DeviceIdHeader"
2123
requestBody:
2224
required: true
2325
content:
@@ -52,6 +54,7 @@ paths:
5254
schema:
5355
type: string
5456
format: uuid
57+
- $ref: "#/components/parameters/DeviceIdHeader"
5558
responses:
5659
"200":
5760
description: |
@@ -82,6 +85,7 @@ paths:
8285
schema:
8386
type: string
8487
format: uuid
88+
- $ref: "#/components/parameters/DeviceIdHeader"
8589
requestBody:
8690
required: true
8791
content:
@@ -123,6 +127,7 @@ paths:
123127
schema:
124128
type: string
125129
format: uuid
130+
- $ref: "#/components/parameters/DeviceIdHeader"
126131
responses:
127132
"200":
128133
description: The answer is available and is returned
@@ -158,6 +163,7 @@ paths:
158163
schema:
159164
type: string
160165
format: uuid
166+
- $ref: "#/components/parameters/DeviceIdHeader"
161167
requestBody:
162168
required: true
163169
content:
@@ -195,6 +201,17 @@ components:
195201
GOV.UK Signon issued bearer token which is used to authenticate the
196202
client application (e.g. GOV.UK App) and not an individual end user
197203
scheme: bearer
204+
parameters:
205+
DeviceIdHeader:
206+
name: Govuk-Chat-Client-Device-Id
207+
in: header
208+
required: false
209+
description: |
210+
An identifier for an individual end-user client to be used to provide
211+
individual end-user rate limiting to ensure that no one client can
212+
consume all of an API users' limits.
213+
schema:
214+
type: string
198215
schemas:
199216
UserQuestion:
200217
type: object

0 commit comments

Comments
 (0)