Skip to content

Commit 6842847

Browse files
committed
IBX-8778: Introduce API Platform attributes with schemas
1 parent d860b11 commit 6842847

14 files changed

+2305
-0
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
schemas:
2+
BookmarkList:
3+
description: List of bookmarked Locations.
4+
type: object
5+
required:
6+
- count
7+
- items
8+
properties:
9+
count:
10+
description: The total number of bookmarks.
11+
type: integer
12+
items:
13+
description: List of bookmarked Locations.
14+
type: array
15+
items:
16+
type: object
17+
required:
18+
- Location
19+
- _media-type
20+
- __href
21+
properties:
22+
Location:
23+
type:
24+
$ref: "#/components/schemas/Location"
25+
_media-type:
26+
type: string
27+
__href:
28+
type: string
29+
BookmarkListWrapper:
30+
type: object
31+
required:
32+
- BookmarkList
33+
properties:
34+
BookmarkList:
35+
type:
36+
$ref: "#/components/schemas/BookmarkList"
37+
SummaryEntry:
38+
type: object
39+
required:
40+
- identifier
41+
- id
42+
- names
43+
- quantity
44+
- Price
45+
- PriceInclVat
46+
- SubtotalPrice
47+
- SubtotalPriceInclVat
48+
- VatCategory
49+
- Product
50+
properties:
51+
identifier:
52+
type: string
53+
id:
54+
type: integer
55+
names:
56+
type:
57+
$ref: "#/components/schemas/SummaryEntryNames"
58+
quantity:
59+
type: integer
60+
Price:
61+
type:
62+
$ref: "#/components/schemas/RestPriceWrapper"
63+
PriceInclVat:
64+
type:
65+
$ref: "#/components/schemas/RestPriceWrapper"
66+
SubtotalPrice:
67+
type:
68+
$ref: "#/components/schemas/RestPriceWrapper"
69+
SubtotalPriceInclVat:
70+
type:
71+
$ref: "#/components/schemas/RestPriceWrapper"
72+
VatCategory:
73+
type:
74+
$ref: "#/components/schemas/VatCategory"
75+
Product:
76+
type:
77+
$ref: "#/components/schemas/Product"
78+
SummaryEntryNames:
79+
type:
80+
$ref: "#/components/schemas/ValueObject"
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
schemas:
2+
Location:
3+
allOf:
4+
- $ref: "#/components/schemas/BaseObject"
5+
- description: This class represents a Location in the Repository.
6+
type: object
7+
required:
8+
- id
9+
- priority
10+
- hidden
11+
- invisible
12+
- remoteId
13+
- ContentInfo
14+
- ParentLocation
15+
- pathString
16+
- depth
17+
- childCount
18+
- sortField
19+
- sortOrder
20+
- Content
21+
properties:
22+
id:
23+
description: The ID of the Location.
24+
type: integer
25+
priority:
26+
description: Location priority. Position of the Location among its siblings when sorted using priority sort order.
27+
type: integer
28+
hidden:
29+
description: Indicates that the Location entity has been explicitly marked as hidden.
30+
type: boolean
31+
invisible:
32+
description: Indicates that the Location is implicitly marked as hidden by a parent Location.
33+
type: boolean
34+
remoteId:
35+
description: Remote ID, universally unique identifier.
36+
type: string
37+
ContentInfo:
38+
description: This class provides all version independent information of the content item.
39+
type:
40+
$ref: "#/components/schemas/ContentInfo"
41+
ParentLocation:
42+
description: Parent Location.
43+
Children:
44+
description: Children Location.
45+
pathString:
46+
description: The materialized path of the Location entry e.g. /1/2/.
47+
type: string
48+
depth:
49+
description: Depth Location has in the Location tree.
50+
type: integer
51+
childCount:
52+
description: Depth Location has in the Location tree.
53+
type: integer
54+
sortField:
55+
description: "Specifies which property the child Locations should be sorted on. Map for Location sort fields to their respective SortClauses - class name/identifier and modified subnode. One of the fallowing values: PATH."
56+
enum:
57+
- PATH
58+
- PUBLISHED
59+
- MODIFIED
60+
- SECTION
61+
- DEPTH
62+
- CLASS_IDENTIFIER
63+
- CLASS_NAME
64+
- PRIORITY
65+
- NAME
66+
- MODIFIED_SUBNODE
67+
- NODE_ID
68+
- CONTENTOBJECT_ID
69+
type: string
70+
sortOrder:
71+
description: "Specifies whether the sort order should be ascending or descending. Map for Location sort order to their respective Query SORT constants. One of the fallowing values: const SORT_ORDER_DESC = 0; const SORT_ORDER_ASC = 1."
72+
enum:
73+
- ASC
74+
- DESC
75+
type: string
76+
Content:
77+
description: Represents a content item in a specific version.
78+
UrlAliases:
79+
description: This class represents URL aliases.
80+
LocationWrapper:
81+
type: object
82+
required:
83+
- Location
84+
properties:
85+
Location:
86+
$ref: "#/components/schemas/Location"
87+
LocationCreate:
88+
allOf:
89+
- $ref: "#/components/schemas/BaseObject"
90+
- type: object
91+
required:
92+
- ParentLocation
93+
- priority
94+
- hidden
95+
- sortField
96+
- sortOrder
97+
properties:
98+
ParentLocation:
99+
type: object
100+
required:
101+
- _href
102+
properties:
103+
_href:
104+
xml:
105+
attribute: true
106+
name: href
107+
type: string
108+
priority:
109+
type: string
110+
hidden:
111+
type: [string, boolean]
112+
sortField:
113+
type: string
114+
sortOrder:
115+
type: string
116+
LocationCreateWrapper:
117+
type: object
118+
required:
119+
- LocationCreate
120+
properties:
121+
LocationCreate:
122+
$ref: "#/components/schemas/LocationCreate"
123+
LocationUpdateStruct:
124+
description: This class is used for updating Location meta data.
125+
type: object
126+
required:
127+
- priority
128+
- remoteId
129+
- hidden
130+
- sortField
131+
- sortOrder
132+
properties:
133+
priority:
134+
description: If set the Location priority is changed to the new value.
135+
type: string
136+
remoteId:
137+
description: If set the Location gets a new remoteId. Needs to be a unique Location->remoteId string value.
138+
type: string
139+
hidden:
140+
type: boolean
141+
sortField:
142+
description: If set the sortField is changed. The sort field specifies which property the child Locations should be sorted on. Valid values are found at {@link Location::SORT_FIELD_*}.
143+
enum:
144+
- PATH
145+
- PUBLISHED
146+
- MODIFIED
147+
- SECTION
148+
- DEPTH
149+
- CLASS_IDENTIFIER
150+
- CLASS_NAME
151+
- PRIORITY
152+
- NAME
153+
- MODIFIED_SUBNODE
154+
- NODE_ID
155+
- CONTENTOBJECT_ID
156+
type: string
157+
sortOrder:
158+
description: If set the sortOrder is changed. The sort order specifies whether the sort order should be ascending or descending. Valid values are {@link Location::SORT_ORDER_*}.
159+
enum:
160+
- ASC
161+
- DESC
162+
type: string
163+
LocationUpdateStructWrapper:
164+
type: object
165+
required:
166+
- LocationUpdate
167+
properties:
168+
LocationUpdate:
169+
$ref: "#/components/schemas/LocationUpdateStruct"
170+
LocationList:
171+
allOf:
172+
- $ref: "#/components/schemas/BaseObject"
173+
- description: This class represents a queried Location list holding a totalCount and a partial list of Locations (by offset/limit parameters and permission filters).
174+
type: object
175+
required:
176+
- Location
177+
properties:
178+
Location:
179+
description: The partial list of Locations controlled by offset/limit.
180+
type: array
181+
items:
182+
$ref: "#/components/schemas/Ref"
183+
LocationListWrapper:
184+
type: object
185+
required:
186+
- LocationList
187+
properties:
188+
LocationList:
189+
$ref: "#/components/schemas/LocationList"

0 commit comments

Comments
 (0)