- file links are splitted into read and write - checked with openapitools for generated code - only 'oneOf' is still not supported, but rest of the generated code looks finepull/10270/head
parent
5cb07c0f02
commit
9b46ac563e
@ -0,0 +1,35 @@ |
||||
# Schema: FileLinkCollectionWriteModel |
||||
--- |
||||
allOf: |
||||
- $ref: './collection_model.yml' |
||||
- type: object |
||||
required: |
||||
- _embedded |
||||
properties: |
||||
_embedded: |
||||
type: object |
||||
required: |
||||
- elements |
||||
properties: |
||||
elements: |
||||
type: array |
||||
items: |
||||
$ref: './file_link_write_model.yml' |
||||
|
||||
example: |
||||
_embedded: |
||||
elements: |
||||
- originData: |
||||
id: 5503 |
||||
name: logo.png |
||||
mimeType: image/png |
||||
size: 16042 |
||||
createdAt: '2021-12-19T09:42:10.170Z' |
||||
lastModifiedAt: '2021-12-20T14:00:13.987Z' |
||||
createdByName: Luke Skywalker |
||||
lastModifiedByName: Anakin Skywalker |
||||
_links: |
||||
storage: |
||||
href: /api/v3/storage/42 |
||||
- _hint: File Link resource shortened for brevity |
||||
id: 1338 |
@ -0,0 +1,47 @@ |
||||
# Schema: FileLinkWriteModel |
||||
--- |
||||
type: object |
||||
required: |
||||
- originData |
||||
- _links |
||||
properties: |
||||
originData: |
||||
$ref: './file_link_origin_data_model.yml' |
||||
_links: |
||||
oneOf: |
||||
- type: object |
||||
required: |
||||
- storage |
||||
properties: |
||||
storage: |
||||
allOf: |
||||
- $ref: './link.yml' |
||||
- description: |- |
||||
The storage resource of the linked file. |
||||
|
||||
**Resource**: Storage |
||||
- type: object |
||||
required: |
||||
- storageUrl |
||||
properties: |
||||
storageUrl: |
||||
allOf: |
||||
- $ref: './link.yml' |
||||
- description: |- |
||||
The storage url the file link references to. |
||||
|
||||
**Resource**: N/A |
||||
|
||||
example: |
||||
originData: |
||||
id: 5503 |
||||
name: logo.png |
||||
mimeType: image/png |
||||
size: 16042 |
||||
createdAt: '2021-12-19T09:42:10.170Z' |
||||
lastModifiedAt: '2021-12-20T14:00:13.987Z' |
||||
createdByName: Luke Skywalker |
||||
lastModifiedByName: Anakin Skywalker |
||||
_links: |
||||
storageUrl: |
||||
href: 'https://nextcloud.my-deathstar.org' |
Loading…
Reference in new issue