Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#42362] added storages link to project resource

Eric Schubert7e712363d6e6
diff --git a/docs/api/apiv3/components/schemas/project_model.yml b/docs/api/apiv3/components/schemas/project_model.yml
index 2a3115025b0..f54de1c3cac 100644
--- a/docs/api/apiv3/components/schemas/project_model.yml
+++ b/docs/api/apiv3/components/schemas/project_model.yml
@@ -2,6 +2,10 @@
---
type: object
properties:
+ _type:
+ type: string
+ enum:
+ - Project
id:
type: integer
description: Projects' id
@@ -15,165 +19,162 @@ properties:
description: Indicates whether the project is currently active or already archived
statusExplanation:
allOf:
- - "$ref": "./formattable.yml"
- - description: A text detailing and explaining why the project has the reported
- status
+ - $ref: './formattable.yml'
+ - description: A text detailing and explaining why the project has the reported status
public:
type: boolean
description: Indicates whether the project is accessible for everybody
description:
- allOf:
- - "$ref": "./formattable.yml"
- - {}
+ $ref: './formattable.yml'
createdAt:
type: string
format: date-time
description: Time of creation
- readOnly: true
updatedAt:
type: string
format: date-time
description: Time of the most recent change to the project
- readOnly: true
_links:
type: object
required:
- - self
- - categories
- - types
- - versions
- - memberships
- - workPackages
+ - self
+ - categories
+ - types
+ - versions
+ - memberships
+ - workPackages
properties:
update:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Form endpoint that aids in updating this project
-
- # Conditions
-
- **Permission**: edit project
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Form endpoint that aids in updating this project
+
+ # Conditions
+
+ **Permission**: edit project
updateImmediately:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Directly update this project
-
- # Conditions
-
- **Permission**: edit project
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Directly update this project
+
+ # Conditions
+
+ **Permission**: edit project
delete:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Delete this project
-
- # Conditions
-
- **Permission**: admin
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Delete this project
+
+ # Conditions
+
+ **Permission**: admin
createWorkPackage:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Form endpoint that aids in preparing and creating a work package
-
- # Conditions
-
- **Permission**: add work packages
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Form endpoint that aids in preparing and creating a work package
+
+ # Conditions
+
+ **Permission**: add work packages
createWorkPackageImmediately:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Directly creates a work package in the project
-
- # Conditions
-
- **Permission**: add work packages
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Directly creates a work package in the project
+
+ # Conditions
+
+ **Permission**: add work packages
self:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- This project
-
- **Resource**: Project
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ This project
+
+ **Resource**: Project
categories:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Categories available in this project
-
- **Resource**: Collection
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Categories available in this project
+
+ **Resource**: Collection
types:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Types available in this project
-
- **Resource**: Collection
-
- # Conditions
-
- **Permission**: view work packages or manage types
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Types available in this project
+
+ **Resource**: Collection
+
+ # Conditions
+
+ **Permission**: view work packages or manage types
versions:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Versions available in this project
-
- **Resource**: Collection
-
- # Conditions
-
- **Permission**: view work packages or manage versions
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Versions available in this project
+
+ **Resource**: Collection
+
+ # Conditions
+
+ **Permission**: view work packages or manage versions
memberships:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Memberships in the project
-
- **Resource**: Collection
-
- # Conditions
-
- **Permission**: view members
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Memberships in the project
+
+ **Resource**: Collection
+
+ # Conditions
+
+ **Permission**: view members
workPackages:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Work Packages of this project
-
- **Resource**: Collection
- readOnly: true
+ - $ref: './link.yml'
+ - description: |-
+ Work Packages of this project
+
+ **Resource**: Collection
parent:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Parent project of the project
-
- **Resource**: Project
-
- # Conditions
-
- **Permission** edit project
+ - $ref: './link.yml'
+ - description: |-
+ Parent project of the project
+
+ **Resource**: Project
+
+ # Conditions
+
+ **Permission** edit project
status:
allOf:
- - "$ref": "./link.yml"
- - description: |-
- Denotes the status of the project, so whether the project is on track, at risk or is having trouble.
-
- **Resource**: ProjectStatus
-
- # Conditions
-
- **Permission** edit project
+ - $ref: './link.yml'
+ - description: |-
+ Denotes the status of the project, so whether the project is on track, at risk or is having trouble.
+
+ **Resource**: ProjectStatus
+
+ # Conditions
+
+ **Permission** edit project
+ storages:
+ type: array
+ items:
+ allOf:
+ - $ref: './link.yml'
+ - description: |-
+ The link to a storage that is active for this project.
+
+ **Resource**: Storage
+
+ # Conditions
+
+ **Permission**: view_file_links
diff --git a/docs/api/apiv3/components/schemas/work_packages_model.yml b/docs/api/apiv3/components/schemas/work_packages_model.yml
index 6d9b100d8d2..b1a86d5a2de 100644
--- a/docs/api/apiv3/components/schemas/work_packages_model.yml
+++ b/docs/api/apiv3/components/schemas/work_packages_model.yml
@@ -1,7 +1,7 @@
# Schema: Work_PackagesModel
---
allOf:
- - "$ref": "./collection_model.yml"
+ - $ref: './collection_model.yml'
- type: object
required:
- _links
@@ -14,7 +14,7 @@ allOf:
properties:
self:
allOf:
- - "$ref": "./link.yml"
+ - $ref: './link.yml'
- description: |-
The work package collection
@@ -33,7 +33,7 @@ allOf:
example:
_links:
self:
- href: "/api/v3/work_packages"
+ href: '/api/v3/work_packages'
total: 2
count: 2
_type: Collection
@@ -43,11 +43,11 @@ example:
_type: WorkPackage
_links:
self:
- href: "/api/v3/work_packages/1"
+ href: '/api/v3/work_packages/1'
id: 1
- _hint: Work package resource shortened for brevity
_type: WorkPackage
_links:
self:
- href: "/api/v3/work_packages/2"
+ href: '/api/v3/work_packages/2'
id: 2
diff --git a/docs/api/apiv3/paths/work_packages.yml b/docs/api/apiv3/paths/work_packages.yml
index 3f1a07e750d..0c5e310f3ef 100644
--- a/docs/api/apiv3/paths/work_packages.yml
+++ b/docs/api/apiv3/paths/work_packages.yml
@@ -1,6 +1,11 @@
# /api/v3/work_packages
---
get:
+ summary: List work packages
+ operationId: list_work_packages
+ tags:
+ - Work Packages
+ description: Returns a collection of work packages.
parameters:
- description: Page number inside the requested collection.
example: '25'
@@ -123,69 +128,35 @@ get:
'200':
content:
application/hal+json:
- examples:
- response:
- value:
- _embedded:
- elements:
- - _links:
- self:
- href: "/api/v3/work_packages/1"
- _type: WorkPackage
- id: 1
- subject: Skipped other properties for brevity
- - _links:
- self:
- href: "/api/v3/work_packages/2"
- _type: WorkPackage
- id: 2
- subject: Skipped other properties for brevity
- _links:
- self:
- href: "/api/v3/work_packages"
- _type: Collection
- count: 2
- total: 2
schema:
- "$ref": "../components/schemas/work_packages_model.yml"
+ $ref: '../components/schemas/work_packages_model.yml'
description: OK
- headers: { }
'400':
content:
application/hal+json:
schema:
- $ref: "../components/schemas/error_response.yml"
- examples:
- response:
- value:
- _type: Error
- errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery
- message: Operator can't be blank.
+ $ref: '../components/schemas/error_response.yml'
+ example:
+ _type: Error
+ errorIdentifier: urn:openproject-org:api:v3:errors:InvalidQuery
+ message: Operator can't be blank.
description: |-
Returned if the client sends a query parameter, that the server knows, but does not understand.
E.g. by providing a syntactically incorrect `filters` parameter.
- headers: { }
'403':
content:
application/hal+json:
schema:
- $ref: "../components/schemas/error_response.yml"
- examples:
- response:
- value:
- _type: Error
- errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission
- message: You are not allowed to see work packages.
+ $ref: '../components/schemas/error_response.yml'
+ example:
+ _type: Error
+ errorIdentifier: urn:openproject-org:api:v3:errors:MissingPermission
+ message: You are not allowed to see work packages.
description: |-
Returned if the client does not have sufficient permissions.
**Required permission:** view work packages (globally or in any project)
- headers: { }
- tags:
- - Work Packages
- description: ''
- operationId: List_work_packages
- summary: List work packages
+
post:
parameters:
- description: |-