Skip to content

Commit 6c306e8

Browse files
committed
use refs
1 parent 15a8c1e commit 6c306e8

File tree

8 files changed

+105
-91
lines changed

8 files changed

+105
-91
lines changed

specs/advanced-personalization/common/responses/BadRequest.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,5 @@ description: Bad request.
22
content:
33
application/json:
44
schema:
5-
title: badRequest
6-
type: object
7-
properties:
8-
status:
9-
type: integer
10-
description: HTTP status code.
11-
enum:
12-
- 400
13-
message:
14-
type: string
15-
description: Details about the response, such as error messages.
16-
enum:
17-
- Invalid request body
5+
- $ref: '../schemas/ErrorResponses.yml#/badRequest'
6+

specs/advanced-personalization/common/responses/BadUserID.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@ description: Invalid user ID format.
22
content:
33
application/json:
44
schema:
5-
title: badUserID
6-
type: object
7-
properties:
8-
status:
9-
type: integer
10-
description: HTTP status code.
11-
enum:
12-
- 400
13-
message:
14-
type: string
15-
description: Details about the response, such as error messages.
16-
enum:
17-
- Invalid userID format
5+
- $ref: '../schemas/ErrorResponses.yml#/badUserID'

specs/advanced-personalization/common/responses/GenericNotFound.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@ description: Not found.
22
content:
33
application/json:
44
schema:
5-
title: userNotFound
6-
type: object
7-
properties:
8-
status:
9-
type: integer
10-
description: HTTP status code.
11-
enum:
12-
- 404
13-
message:
14-
type: string
15-
description: Details about the response, such as error messages.
16-
enum:
17-
- Not Found
5+
- $ref: '../schemas/ErrorResponses.yml#/genericNotFound'

specs/advanced-personalization/common/responses/GenericUnprocessableEntity.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@ description: Unprocessable entity.
22
content:
33
application/json:
44
schema:
5-
title: genericUnprocessableEntity
6-
type: object
7-
properties:
8-
status:
9-
type: integer
10-
description: HTTP status code.
11-
enum:
12-
- 422
13-
message:
14-
type: string
15-
description: Details about the response, such as error messages.
16-
enum:
17-
- Unprocessable Entity
5+
- $ref: '../schemas/ErrorResponses.yml#/genericUnprocessableEntity'

specs/advanced-personalization/common/responses/InternalServerError.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@ description: Internal server error.
22
content:
33
application/json:
44
schema:
5-
title: internalServerError
6-
type: object
7-
properties:
8-
status:
9-
type: integer
10-
description: HTTP status code.
11-
enum:
12-
- 500
13-
message:
14-
type: string
15-
description: Details about the response, such as error messages.
16-
enum:
17-
- Internal Server Error
5+
- $ref: '../schemas/ErrorResponses.yml#/internalServerError'

specs/advanced-personalization/common/responses/InvalidUserID.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@ description: Invalid user token.
22
content:
33
application/json:
44
schema:
5-
title: invalidUserID
6-
type: object
7-
properties:
8-
status:
9-
type: integer
10-
description: HTTP status code.
11-
enum:
12-
- 422
13-
message:
14-
type: string
15-
description: Details about the response, such as error messages.
16-
enum:
17-
- UserID must contain only alphanumeric, equal, plus, slash, hyphen, or underscore characters, and be between 1 and 129 characters long
5+
- $ref: '../schemas/ErrorResponses.yml#/invalidUserID'

specs/advanced-personalization/common/responses/Unauthorized.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@ description: Not authorized to access this resource.
22
content:
33
application/json:
44
schema:
5-
title: unauthorized
6-
type: object
7-
properties:
8-
status:
9-
type: integer
10-
description: HTTP status code.
11-
enum:
12-
- 401
13-
message:
14-
type: string
15-
description: Details about the response, such as error messages.
16-
enum:
17-
- Unauthorized
5+
- $ref: '../schemas/ErrorResponses.yml#/unauthorized'
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
badRequest:
2+
type: object
3+
properties:
4+
status:
5+
type: integer
6+
description: HTTP status code.
7+
enum:
8+
- 400
9+
message:
10+
type: string
11+
description: Details about the response, such as error messages.
12+
enum:
13+
- Invalid request body
14+
15+
badUserID:
16+
type: object
17+
properties:
18+
status:
19+
type: integer
20+
description: HTTP status code.
21+
enum:
22+
- 400
23+
message:
24+
type: string
25+
description: Details about the response, such as error messages.
26+
enum:
27+
- Invalid userID format
28+
29+
genericNotFound:
30+
type: object
31+
properties:
32+
status:
33+
type: integer
34+
description: HTTP status code.
35+
enum:
36+
- 404
37+
message:
38+
type: string
39+
description: Details about the response, such as error messages.
40+
enum:
41+
- Not Found
42+
43+
genericUnprocessableEntity:
44+
type: object
45+
properties:
46+
status:
47+
type: integer
48+
description: HTTP status code.
49+
enum:
50+
- 422
51+
message:
52+
type: string
53+
description: Details about the response, such as error messages.
54+
enum:
55+
- Unprocessable Entity
56+
57+
internalServerError:
58+
type: object
59+
properties:
60+
status:
61+
type: integer
62+
description: HTTP status code.
63+
enum:
64+
- 500
65+
message:
66+
type: string
67+
description: Details about the response, such as error messages.
68+
enum:
69+
- Internal Server Error
70+
71+
invalidUserID:
72+
type: object
73+
properties:
74+
status:
75+
type: integer
76+
description: HTTP status code.
77+
enum:
78+
- 422
79+
message:
80+
type: string
81+
description: Details about the response, such as error messages.
82+
enum:
83+
- UserID must contain only alphanumeric, equal, plus, slash, hyphen, or underscore characters, and be between 1 and 129 characters long
84+
85+
unauthorized:
86+
type: object
87+
properties:
88+
status:
89+
type: integer
90+
description: HTTP status code.
91+
enum:
92+
- 401
93+
message:
94+
type: string
95+
description: Details about the response, such as error messages.
96+
enum:
97+
- Unauthorized

0 commit comments

Comments
 (0)