Skip to content

Commit

Permalink
[#59391] updated API specs for new pagination in file links
Browse files Browse the repository at this point in the history
  • Loading branch information
Kharonus committed Nov 19, 2024
1 parent f79d17f commit 7e83713
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# Schema: FileLinkCollectionReadModel
---
allOf:
- $ref: './collection_model.yml'
- $ref: './paginated_collection_model.yml'
- type: object
required:
- _links
- _embedded
properties:
_links:
type: object
required:
- self
properties:
self:
allOf:
- $ref: "./link.yml"
- $ref: './link.yml'
- description: |-
This file links collection
**Resource**: FileLinkCollectionReadModel
_embedded:
type: object
required:
- elements
properties:
elements:
type: array
Expand All @@ -33,9 +26,17 @@ example:
_type: Collection
total: 2
count: 2
pageSize: 30
offset: 1
_links:
self:
href: '/api/v3/work_packages/42/file_links'
jumpTo:
href: '/api/v3/work_packages/42/file_links?offset=%7Boffset%7D&pageSize=30'
templated: true
changeSize:
href: '/api/v3/work_packages/42/file_links?offset=1&pageSize=%7Bsize%7D'
templated: true
_embedded:
elements:
- id: 1337
Expand Down
36 changes: 2 additions & 34 deletions docs/api/apiv3/components/schemas/file_link_read_model.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Schema: FileLinkReadModel
---
type: object
required:
- id
- _type
- originData
- _links
properties:
id:
type: integer
Expand Down Expand Up @@ -36,17 +31,6 @@ properties:
$ref: './work_package_model.yml'
_links:
type: object
required:
- self
- storage
- container
- creator
- permission
- originOpen
- staticOriginOpen
- originOpenLocation
- staticOriginOpenLocation
- staticOriginDownload
properties:
self:
allOf:
Expand Down Expand Up @@ -166,24 +150,8 @@ example:
container:
_hint: Work package resource shortened for brevity
_type: WorkPackage
_links:
self:
href: "/api/v3/work_packages/1528"
title: Develop API
schema:
href: "/api/v3/work_packages/schemas/11-2"
id: 1528
subject: Develop API
description:
format: markdown
raw: Develop super cool OpenProject API.
html: "<p>Develop super cool OpenProject API.</p>"
scheduleManually: false
readonly: false
startDate:
dueDate:
createdAt: '2014-08-29T12:40:53.860Z'
updatedAt: '2014-08-29T12:44:41.036Z'
_links:
self:
href: /api/v3/work_package/17/file_links/1337
Expand All @@ -199,8 +167,8 @@ example:
delete:
href: /api/v3/work_package/17/file_links/1337
status:
href: urn:openproject-org:api:v3:file-links:permission:View
title: View
href: urn:openproject-org:api:v3:file-links:permission:ViewAllowed
title: View allowed
originOpen:
href: https://nextcloud.deathstar.rocks/index.php/f/5503?openfile=1
staticOriginOpen:
Expand Down

0 comments on commit 7e83713

Please sign in to comment.