Skip to content

Commit 4cc0c80

Browse files
committed
IBX-1430: Fix REST API reference (#1615)
- Fix several indentation errors that hide some parts or create non-existing routes. - Fix /user/users parameters (cherry picked from commit 7544e68)
1 parent 08252d4 commit 4cc0c80

13 files changed

Lines changed: 31383 additions & 30989 deletions

docs/api/rest_api_reference/input/examples/content/objects/POST/ContentCreate.xml.example

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<ContentType href="/api/ibexa/v2/content/types/2"/>
44
<mainLanguageCode>eng-GB</mainLanguageCode>
55
<LocationCreate>
6-
<ParentLocation href="/api/ibexa/v2/content/locations/1/2" />
6+
<ParentLocation href="/api/ibexa/v2/content/locations/1/2"/>
77
<priority>0</priority>
88
<hidden>false</hidden>
99
<sortField>PATH</sortField>
@@ -22,15 +22,15 @@
2222
<fieldDefinitionIdentifier>intro</fieldDefinitionIdentifier>
2323
<languageCode>eng-GB</languageCode>
2424
<fieldValue>
25-
<value key="xml"><![CDATA[<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit"><p>draft draft</p></section>]]></value>
26-
</fieldValue>
25+
<value key="xml"><![CDATA[<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"><p>draft draft</p></section>]]></value>
26+
</fieldValue>
2727
</field>
2828
<field>
2929
<fieldDefinitionIdentifier>body</fieldDefinitionIdentifier>
3030
<languageCode>eng-GB</languageCode>
3131
<fieldValue>
32-
<value key="xml"><![CDATA[<section xmlns="http://ez.no/namespaces/ezpublish5/xhtml5/edit"><p>draft draft draft </p></section>]]></value>
33-
</fieldValue>
32+
<value key="xml"><![CDATA[<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"><p>draft draft draft</p></section>]]></value>
33+
</fieldValue>
3434
</field>
3535
</fields>
3636
</ContentCreate>

docs/api/rest_api_reference/input/ez-calendar.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
displayName: Calendar
2-
/calendar/event:
2+
/event:
33
get:
44
displayName: Calendar list
55
description: Calendar event list.

docs/api/rest_api_reference/input/ez-commerce.raml

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -199,41 +199,40 @@ displayName: eCommerce API
199199
type: Basket
200200
example: !include examples/commerce/basket/Basket.json.example
201201

202-
/{basketId}:
203-
/line:
204-
post:
205-
displayName: Add products to stored basket
206-
description: Adds products to the stored basket.
207-
body:
208-
application/vnd.ibexa.api.BasketLineData+json:
209-
type: BasketLineData
210-
example: !include examples/commerce/basket/current/lines/POST/BasketLineData.json.example
211-
responses:
212-
200:
213-
body:
214-
application/vnd.ibexa.api.Basket+json:
215-
type: Basket
216-
example: !include examples/commerce/basket/Basket.json.example
217-
400:
218-
body:
219-
application/vnd.ibexa.api.ValidationResponse+json:
220-
type: ValidationResponse
221-
example: !include examples/commerce/basket/current/lines/POST/ValidationResponse.json.example
202+
/line:
203+
post:
204+
displayName: Add products to stored basket
205+
description: Adds products to the stored basket.
206+
body:
207+
application/vnd.ibexa.api.BasketLineData+json:
208+
type: BasketLineData
209+
example: !include examples/commerce/basket/current/lines/POST/BasketLineData.json.example
210+
responses:
211+
200:
212+
body:
213+
application/vnd.ibexa.api.Basket+json:
214+
type: Basket
215+
example: !include examples/commerce/basket/Basket.json.example
216+
400:
217+
body:
218+
application/vnd.ibexa.api.ValidationResponse+json:
219+
type: ValidationResponse
220+
example: !include examples/commerce/basket/current/lines/POST/ValidationResponse.json.example
222221

223-
/line/{lineId}:
224-
delete:
225-
displayName: Delete a line from a stored basket
226-
responses:
227-
200:
228-
body:
229-
application/vnd.ibexa.api.Basket+json:
230-
type: Basket
231-
example: !include examples/commerce/basket/Basket.json.example
232-
400:
233-
body:
234-
application/vnd.ibexa.api.ValidationResponse+json:
235-
type: ValidationResponse
236-
example: !include examples/commerce/basket/_id_/line/_line_id_/DELETE/ValidationResponse.json.example
222+
/line/{lineId}:
223+
delete:
224+
displayName: Delete a line from a stored basket
225+
responses:
226+
200:
227+
body:
228+
application/vnd.ibexa.api.Basket+json:
229+
type: Basket
230+
example: !include examples/commerce/basket/Basket.json.example
231+
400:
232+
body:
233+
application/vnd.ibexa.api.ValidationResponse+json:
234+
type: ValidationResponse
235+
example: !include examples/commerce/basket/_id_/line/_line_id_/DELETE/ValidationResponse.json.example
237236

238237
/{basketName}:
239238
post:

docs/api/rest_api_reference/input/ez-content-assets.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
displayName: content/assets/images
2-
/assets/images/{assetId}/{assetSource}:
2+
/images/{assetId}/{assetSource}:
33
get:
44
displayName: Fetch image asset value
55
description: Fetches the image asset value object. Depending on the provider, the asset metadata object can contain different parameters.

docs/api/rest_api_reference/input/ez-content-location.raml

Lines changed: 90 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -84,105 +84,104 @@ get:
8484
description: Error - the user is not authorized to delete this subtree.
8585
404:
8686
description: Error - the Location with the given ID does not exist.
87-
/children:
88-
get:
89-
displayName: Get child Locations.
90-
description: Loads all child Locations for the given parent Location.
91-
queryParameters:
92-
offset:
93-
description: The offset of the result set.
94-
type: integer
95-
limit:
96-
description: The number of Locations returned.
97-
type: integer
98-
headers:
99-
Accept:
100-
description: If set, the new Location list is returned in XML or JSON format.
101-
example: |
102-
application/vnd.ibexa.api.LocationList+xml
103-
application/vnd.ibexa.api.LocationList+json
104-
responses:
105-
200:
106-
body:
107-
application/vnd.ibexa.api.LocationList+xml:
108-
type: LocationList
109-
example: !include examples/content/locations/path/children/GET/LocationList.xml.example
110-
401:
111-
description: Error - the user is not authorized to read this Content item.
112-
404:
113-
description: Error - the Content item with the given ID does not exist.
114-
/urlaliases:
115-
get:
116-
displayName: List URL aliases for Location
117-
description: Returns the list of URL aliases for a Location.
118-
queryParameters:
119-
custom:
120-
description: Indicates whether autogenerated (false) or manual URL aliases (true) should be returned (default true).
121-
type: boolean
122-
headers:
123-
Accept:
124-
description: If set, the URL alias list contains only references and is returned in XML or JSON format.
125-
example: |
126-
application/vnd.ibexa.api.UrlAliasRefList+xml
127-
application/vnd.ibexa.api.UrlAliasRefList+json
128-
responses:
129-
200:
130-
description: OK - returns the list of URL aliases.
131-
body:
132-
application/vnd.ibexa.api.UrlAliasRefList+xml:
133-
type: UrlAliasRefList
134-
exammple: examples/content/locations/path/urlaliases/GET/UrlAliasRefList.xml.example
135-
400:
136-
description: Error - The user has no permission to read URL aliases.
137-
401:
138-
description: Error - The Location was not found.
139-
/{locationId}:
140-
patch:
141-
displayName: Update Location
142-
description: Updates the Location. This method can also be used to hide/reveal a Location via the hidden field in the LocationUpdate. PATCH or POST with header X-HTTP-Method-Override PATCH.
87+
patch:
88+
displayName: Update Location
89+
description: Updates the Location. This method can also be used to hide/reveal a Location via the hidden field in the LocationUpdate. PATCH or POST with header X-HTTP-Method-Override PATCH.
90+
headers:
91+
Accept:
92+
description: If set, the Location is returned in XML or JSON format.
93+
example: |
94+
application/vnd.ibexa.api.Location+xml
95+
application/vnd.ibexa.api.Location+json
96+
Content-Type:
97+
description: The LocationUpdate schema encoded in XML or JSON format.
98+
example: |
99+
application/vnd.ibexa.api.LocationUpdate+xml
100+
application/vnd.ibexa.api.LocationUpdate+json
101+
If-Match:
102+
description: ETag
103+
body:
104+
application/vnd.ibexa.api.LocationUpdate+xml:
105+
type: LocationUpdateStruct
106+
example: !include examples/content/locations/location_id/PATCH/LocationUpdate.xml.example
107+
application/vnd.ibexa.api.LocationUpdate+json:
108+
type: LocationUpdateStruct
109+
example: !include examples/content/locations/location_id/PATCH/LocationUpdate.json.example
110+
responses:
111+
200:
112+
body:
113+
application/vnd.ibexa.api.Location+xml:
114+
type: Location
115+
example: !include examples/content/locations/location_id/PATCH/Location.xml.example
116+
application/vnd.ibexa.api.Location+json:
117+
type: Location
118+
example: !include examples/content/locations/location_id/PATCH/Location.json.example
119+
401:
120+
description: Error - the user is not authorized to update this Location.
121+
404:
122+
description: Error - the Location with the given ID does not exist.
123+
swap:
124+
displayName: Swap Location
125+
description: Swaps the Location of a Content item with the given Location of another Content item. SWAP or POST with header X-HTTP-Method-Override SWAP.
126+
headers:
127+
Destination:
128+
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
129+
responses:
130+
204:
131+
description: No Content. Swapped the Location of a Content item with the given Location of another Content item.
132+
401:
133+
description: Error - the user is not authorized to swap this Location.
134+
404:
135+
description: Error - the Location with the given ID does not exist.
136+
/children:
137+
get:
138+
displayName: Get child Locations.
139+
description: Loads all child Locations for the given parent Location.
140+
queryParameters:
141+
offset:
142+
description: The offset of the result set.
143+
type: integer
144+
limit:
145+
description: The number of Locations returned.
146+
type: integer
143147
headers:
144148
Accept:
145-
description: If set, the Location is returned in XML or JSON format.
146-
example: |
147-
application/vnd.ibexa.api.Location+xml
148-
application/vnd.ibexa.api.Location+json
149-
Content-Type:
150-
description: The LocationUpdate schema encoded in XML or JSON format.
149+
description: If set, the new Location list is returned in XML or JSON format.
151150
example: |
152-
application/vnd.ibexa.api.LocationUpdate+xml
153-
application/vnd.ibexa.api.LocationUpdate+json
154-
If-Match:
155-
description: ETag
156-
body:
157-
application/vnd.ibexa.api.LocationUpdate+xml:
158-
type: LocationUpdateStruct
159-
example: !include examples/content/locations/location_id/PATCH/LocationUpdate.xml.example
160-
application/vnd.ibexa.api.LocationUpdate+json:
161-
type: LocationUpdateStruct
162-
example: !include examples/content/locations/location_id/PATCH/LocationUpdate.json.example
151+
application/vnd.ibexa.api.LocationList+xml
152+
application/vnd.ibexa.api.LocationList+json
163153
responses:
164154
200:
165155
body:
166-
application/vnd.ibexa.api.Location+xml:
167-
type: Location
168-
example: !include examples/content/locations/location_id/PATCH/Location.xml.example
169-
application/vnd.ibexa.api.Location+json:
170-
type: Location
171-
example: !include examples/content/locations/location_id/PATCH/Location.json.example
156+
application/vnd.ibexa.api.LocationList+xml:
157+
type: LocationList
158+
example: !include examples/content/locations/path/children/GET/LocationList.xml.example
172159
401:
173-
description: Error - the user is not authorized to update this Location.
160+
description: Error - the user is not authorized to read this Content item.
174161
404:
175-
description: Error - the Location with the given ID does not exist.
176-
swap:
177-
displayName: Swap Location
178-
description: Swaps the Location of a Content item with the given Location of another Content item. SWAP or POST with header X-HTTP-Method-Override SWAP.
162+
description: Error - the Content item with the given ID does not exist.
163+
/urlaliases:
164+
get:
165+
displayName: List URL aliases for Location
166+
description: Returns the list of URL aliases for a Location.
167+
queryParameters:
168+
custom:
169+
description: Indicates whether autogenerated (false) or manual URL aliases (true) should be returned (default true).
170+
type: boolean
179171
headers:
180-
Destination:
181-
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
172+
Accept:
173+
description: If set, the URL alias list contains only references and is returned in XML or JSON format.
174+
example: |
175+
application/vnd.ibexa.api.UrlAliasRefList+xml
176+
application/vnd.ibexa.api.UrlAliasRefList+json
182177
responses:
183-
204:
184-
description: No Content. Swapped the Location of a Content item with the given Location of another Content item.
178+
200:
179+
description: OK - returns the list of URL aliases.
180+
body:
181+
application/vnd.ibexa.api.UrlAliasRefList+xml:
182+
type: UrlAliasRefList
183+
exammple: examples/content/locations/path/urlaliases/GET/UrlAliasRefList.xml.example
184+
400:
185+
description: Error - The user has no permission to read URL aliases.
185186
401:
186-
description: Error - the user is not authorized to swap this Location.
187-
404:
188-
description: Error - the Location with the given ID does not exist.
187+
description: Error - The Location was not found.

docs/api/rest_api_reference/input/ez-content-types.raml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -118,30 +118,31 @@ get:
118118
description: Error - There are object instances of this Content Type.
119119
404:
120120
description: Error - The Content Type does not exist.
121-
/{fieldDefinitionId}:
122-
get:
123-
displayName: Get Field definition
124-
description: Returns the Field definition by the given ID.
125-
headers:
126-
Accept:
127-
description: If set, the Field definition is returned in XML or JSON format.
128-
example: |
129-
application/vnd.ibexa.api.FieldDefinition+xml
130-
application/vnd.ibexa.api.FieldDefinition+json
131-
responses:
132-
200:
133-
description: OK - returns the Field definition.
134-
body:
135-
application/vnd.ibexa.api.FieldDefinition+xml:
136-
type: FieldDefinition
137-
example: !include examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example
138-
application/vnd.ibexa.api.FieldDefinition+json:
139-
type: FieldDefinition
140-
example: !include examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example
141-
401:
142-
description: Error - The user is not authorized to read the Content Type.
143-
404:
144-
description: Error - The Content Type does not exist.
121+
/fieldDefinitions:
122+
/{fieldDefinitionId}:
123+
get:
124+
displayName: Get Field definition
125+
description: Returns the Field definition by the given ID.
126+
headers:
127+
Accept:
128+
description: If set, the Field definition is returned in XML or JSON format.
129+
example: |
130+
application/vnd.ibexa.api.FieldDefinition+xml
131+
application/vnd.ibexa.api.FieldDefinition+json
132+
responses:
133+
200:
134+
description: OK - returns the Field definition.
135+
body:
136+
application/vnd.ibexa.api.FieldDefinition+xml:
137+
type: FieldDefinition
138+
example: !include examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example
139+
application/vnd.ibexa.api.FieldDefinition+json:
140+
type: FieldDefinition
141+
example: !include examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example
142+
401:
143+
description: Error - The user is not authorized to read the Content Type.
144+
404:
145+
description: Error - The Content Type does not exist.
145146
/draft:
146147
patch:
147148
displayName: Update Content Type draft

0 commit comments

Comments
 (0)