Skip to content

Commit 2ce1328

Browse files
committed
[chore] maintained priority collection api specification
1 parent 4c00577 commit 2ce1328

File tree

5 files changed

+93
-105
lines changed

5 files changed

+93
-105
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Example: Priority collection
2+
---
3+
value:
4+
_embedded:
5+
elements:
6+
- _links:
7+
self:
8+
href: "/api/v3/priorities/1"
9+
title: Low
10+
_type: Priority
11+
id: 1
12+
isActive: true
13+
isDefault: false
14+
name: Low
15+
position: 1
16+
- _links:
17+
self:
18+
href: "/api/v3/priorities/2"
19+
title: Normal
20+
_type: Priority
21+
id: 2
22+
isActive: true
23+
isDefault: true
24+
name: Normal
25+
position: 2
26+
- _links:
27+
self:
28+
href: "/api/v3/priorities/3"
29+
title: High
30+
_type: Priority
31+
id: 3
32+
isActive: true
33+
isDefault: false
34+
name: High
35+
position: 3
36+
- _links:
37+
self:
38+
href: "/api/v3/priorities/4"
39+
title: Immediate
40+
_type: Priority
41+
id: 4
42+
isActive: true
43+
isDefault: false
44+
name: Immediate
45+
position: 5
46+
_links:
47+
self:
48+
href: "/api/v3/priorities"
49+
_type: Collection
50+
count: 4
51+
total: 4

Diff for: docs/api/apiv3/components/schemas/priorities_model.yml

-52
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Schema: PriorityCollectionModel
2+
---
3+
allOf:
4+
- $ref: "./collection_model.yml"
5+
- type: object
6+
required:
7+
- _links
8+
- _embedded
9+
properties:
10+
_links:
11+
type: object
12+
required:
13+
- self
14+
properties:
15+
self:
16+
allOf:
17+
- $ref: "./link.yml"
18+
- properties:
19+
self:
20+
allOf:
21+
- $ref: "./link.yml"
22+
- description: |-
23+
This priority collection
24+
25+
**Resource**: PriorityCollectionModel
26+
readOnly: true
27+
_embedded:
28+
type: object
29+
required:
30+
- elements
31+
properties:
32+
elements:
33+
type: array
34+
items:
35+
$ref: "./priority_model.yml"

Diff for: docs/api/apiv3/openapi-spec.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ components:
505505
$ref: "./components/examples/notification_collection.yml"
506506
PlaceholderUserResponse:
507507
$ref: "./components/examples/placeholder-user-response.yml"
508+
PriorityCollection:
509+
$ref: "./components/examples/priority_collection.yml"
508510
Project:
509511
$ref: "./components/examples/project.yml"
510512
ProjectBody:
@@ -695,8 +697,8 @@ components:
695697
"$ref": "./components/schemas/principal_collection_model.yml"
696698
PrincipalModel:
697699
"$ref": "./components/schemas/principal_model.yml"
698-
PrioritiesModel:
699-
"$ref": "./components/schemas/priorities_model.yml"
700+
PriorityCollectionModel:
701+
"$ref": "./components/schemas/priority_collection_model.yml"
700702
PriorityModel:
701703
"$ref": "./components/schemas/priority_model.yml"
702704
ProjectCollectionModel:

Diff for: docs/api/apiv3/paths/priorities.yml

+3-51
Original file line numberDiff line numberDiff line change
@@ -6,58 +6,10 @@ get:
66
content:
77
application/hal+json:
88
examples:
9-
response:
10-
value:
11-
_embedded:
12-
elements:
13-
- _links:
14-
self:
15-
href: "/api/v3/priorities/1"
16-
title: Low
17-
_type: Priority
18-
id: 1
19-
isActive: true
20-
isDefault: false
21-
name: Low
22-
position: 1
23-
- _links:
24-
self:
25-
href: "/api/v3/priorities/2"
26-
title: Normal
27-
_type: Priority
28-
id: 2
29-
isActive: true
30-
isDefault: true
31-
name: Normal
32-
position: 2
33-
- _links:
34-
self:
35-
href: "/api/v3/priorities/3"
36-
title: High
37-
_type: Priority
38-
id: 3
39-
isActive: true
40-
isDefault: false
41-
name: High
42-
position: 3
43-
- _links:
44-
self:
45-
href: "/api/v3/priorities/4"
46-
title: Immediate
47-
_type: Priority
48-
id: 4
49-
isActive: true
50-
isDefault: false
51-
name: Immediate
52-
position: 5
53-
_links:
54-
self:
55-
href: "/api/v3/priorities"
56-
_type: Collection
57-
count: 4
58-
total: 4
9+
'simple priority collection':
10+
$ref: "../components/examples/priority_collection.yml"
5911
schema:
60-
"$ref": "../components/schemas/priorities_model.yml"
12+
"$ref": "../components/schemas/priority_collection_model.yml"
6113
description: OK
6214
headers: {}
6315
'403':

0 commit comments

Comments
 (0)