Merge pull request #12004 from opf/implementation/45954-extend-openapi-spec-for-storage-files-endpoint
[#45954] Extend OpenAPI spec for storage files endpointpull/11925/merge
commit
cee88ad7cd
@ -1,64 +0,0 @@ |
|||||||
# Schema: FileCollectionModel |
|
||||||
--- |
|
||||||
allOf: |
|
||||||
- $ref: './collection_model.yml' |
|
||||||
- type: object |
|
||||||
required: |
|
||||||
- _links |
|
||||||
- _embedded |
|
||||||
properties: |
|
||||||
_links: |
|
||||||
type: object |
|
||||||
required: |
|
||||||
- self |
|
||||||
properties: |
|
||||||
self: |
|
||||||
allOf: |
|
||||||
- $ref: './link.yml' |
|
||||||
- description: |- |
|
||||||
This file collection |
|
||||||
|
|
||||||
**Resource**: FileCollectionModel |
|
||||||
_embedded: |
|
||||||
type: object |
|
||||||
required: |
|
||||||
- elements |
|
||||||
properties: |
|
||||||
elements: |
|
||||||
type: array |
|
||||||
items: |
|
||||||
$ref: './storage_file_model.yml' |
|
||||||
|
|
||||||
example: |
|
||||||
_type: Collection |
|
||||||
total: 2 |
|
||||||
count: 2 |
|
||||||
_links: |
|
||||||
self: |
|
||||||
href: '/api/v3/storages/42/files' |
|
||||||
_embedded: |
|
||||||
elements: |
|
||||||
- id: 1337 |
|
||||||
location: '/data/logo.png' |
|
||||||
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: |
|
||||||
self: |
|
||||||
href: 'urn:openproject-org:api:v3:storages:storage_file:no_link_provided' |
|
||||||
- id: 1338 |
|
||||||
location: '1338' |
|
||||||
name: README.md |
|
||||||
mimeType: text/markdown |
|
||||||
size: 3742 |
|
||||||
createdAt: '2021-12-20T09:42:10.170Z' |
|
||||||
lastModifiedAt: '2021-12-21T14:00:13.987Z' |
|
||||||
createdByName: Leia Organa |
|
||||||
lastModifiedByName: Leia Organa |
|
||||||
_links: |
|
||||||
self: |
|
||||||
href: 'urn:openproject-org:api:v3:storages:storage_file:no_link_provided' |
|
@ -1,22 +0,0 @@ |
|||||||
# Schema: StorageFileLocationModel |
|
||||||
--- |
|
||||||
type: object |
|
||||||
required: |
|
||||||
- location |
|
||||||
properties: |
|
||||||
location: |
|
||||||
type: string |
|
||||||
description: Location identification for file in storage |
|
||||||
_links: |
|
||||||
type: object |
|
||||||
required: |
|
||||||
- self |
|
||||||
properties: |
|
||||||
self: |
|
||||||
allOf: |
|
||||||
- "$ref": "./link.yml" |
|
||||||
- description: |- |
|
||||||
Not provided |
|
||||||
|
|
||||||
**Resource**: urn:openproject-org:api:v3:storages:storage_file:no_link_provided |
|
||||||
readOnly: true |
|
@ -0,0 +1,80 @@ |
|||||||
|
# Schema: StorageFilesModel |
||||||
|
--- |
||||||
|
type: object |
||||||
|
required: |
||||||
|
- _type |
||||||
|
- files |
||||||
|
- parent |
||||||
|
- _links |
||||||
|
properties: |
||||||
|
_type: |
||||||
|
type: string |
||||||
|
enum: |
||||||
|
- StorageFiles |
||||||
|
files: |
||||||
|
type: array |
||||||
|
items: |
||||||
|
$ref: './storage_file_model.yml' |
||||||
|
description: List of files provided by the selected storage. |
||||||
|
parent: |
||||||
|
allOf: |
||||||
|
- $ref: './storage_file_model.yml' |
||||||
|
- description: File of the currently selected parent directory. |
||||||
|
_links: |
||||||
|
type: object |
||||||
|
required: |
||||||
|
- self |
||||||
|
properties: |
||||||
|
self: |
||||||
|
allOf: |
||||||
|
- $ref: "./link.yml" |
||||||
|
- description: |- |
||||||
|
Not provided |
||||||
|
|
||||||
|
**Resource**: urn:openproject-org:api:v3:storages:storage_file:no_link_provided |
||||||
|
example: |
||||||
|
_type: StorageFiles |
||||||
|
files: |
||||||
|
- id: 42 |
||||||
|
name: readme.md |
||||||
|
_type: StorageFile |
||||||
|
location: '/readme.md' |
||||||
|
mimeType: 'text/markdown' |
||||||
|
size: 4096 |
||||||
|
createdAt: '2021-12-19T09:42:10.170Z' |
||||||
|
lastModifiedAt: '2021-12-20T14:00:13.987Z' |
||||||
|
createdByName: Luke Skywalker |
||||||
|
lastModifiedByName: Anakin Skywalker |
||||||
|
_links: |
||||||
|
self: |
||||||
|
href: 'urn:openproject-org:api:v3:storages:storage_file:no_link_provided' |
||||||
|
- id: 43 |
||||||
|
name: readme.pdf |
||||||
|
_type: StorageFile |
||||||
|
location: '/readme.pdf' |
||||||
|
mimeType: 'application/pdf' |
||||||
|
size: 2048 |
||||||
|
createdAt: '2021-12-19T09:42:10.170Z' |
||||||
|
lastModifiedAt: '2021-12-20T14:00:13.987Z' |
||||||
|
createdByName: Luke Skywalker |
||||||
|
lastModifiedByName: Anakin Skywalker |
||||||
|
_links: |
||||||
|
self: |
||||||
|
href: 'urn:openproject-org:api:v3:storages:storage_file:no_link_provided' |
||||||
|
parent: |
||||||
|
id: 41 |
||||||
|
name: '/' |
||||||
|
location: '/' |
||||||
|
mimeType: 'application/x-op-directory' |
||||||
|
size: 6144 |
||||||
|
createdAt: '2021-12-20T09:42:10.170Z' |
||||||
|
lastModifiedAt: '2021-12-21T14:00:13.987Z' |
||||||
|
createdByName: Luke Skywalker |
||||||
|
lastModifiedByName: Anakin Skywalker |
||||||
|
_links: |
||||||
|
self: |
||||||
|
href: 'urn:openproject-org:api:v3:storages:storage_file:no_link_provided' |
||||||
|
_links: |
||||||
|
self: |
||||||
|
href: 'urn:openproject-org:api:v3:storages:storage_file:no_link_provided' |
||||||
|
|
Loading…
Reference in new issue