-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Documented custom form via API, tag and document DTO examples
- Loading branch information
1 parent
fb0cceb
commit cf70b46
Showing
10 changed files
with
519 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. _documents-system-intro: | ||
|
||
================ | ||
Documents system | ||
================ | ||
|
||
|
||
Exposing documents in API | ||
------------------------- | ||
|
||
When using API Platform data transfer objects, Documents are ready-to-use with translations set-up on | ||
``name`` and ``description`` fields. Made sure to configure your API operations with at least ``document_display`` | ||
serialization group: | ||
|
||
.. code-block:: json | ||
{ | ||
"@type": "Document", | ||
"@id": "/api/documents/52", | ||
"relativePath": "fffb9adc/my_image.jpg", | ||
"type": "image", | ||
"mimeType": "image/jpeg", | ||
"name": null, | ||
"description": null, | ||
"embedId": null, | ||
"embedPlatform": null, | ||
"imageAverageColor": "#141414", | ||
"imageWidth": 1000, | ||
"imageHeight": 750, | ||
"mediaDuration": 0, | ||
"copyright": "© John Doe", | ||
"externalUrl": null, | ||
"processable": true, | ||
"thumbnail": null, | ||
"alt": "This is an image" | ||
} |
Oops, something went wrong.