Skip to content

Commit

Permalink
Merge pull request #14862 from opf/feature/meetings-attachments
Browse files Browse the repository at this point in the history
Allow attachments on meetings for agenda items
  • Loading branch information
oliverguenther authored Mar 5, 2024
2 parents 8d415ef + bef4fe0 commit 24310f2
Show file tree
Hide file tree
Showing 25 changed files with 1,066 additions and 15 deletions.
88 changes: 88 additions & 0 deletions docs/api/apiv3/components/schemas/meeting_model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Schema: Meeting_PageModel
---
type: object
required:
- title
properties:
id:
type: integer
description: Identifier of this meeting
readOnly: true
exclusiveMinimum: 0
title:
type: string
description: The meeting's title
_links:
type: object
properties:
self:
allOf:
- "$ref": "./link.yml"
- description: |-
This meeting
**Resource**: Meeting
readOnly: true
author:
allOf:
- "$ref": "./link.yml"
- description: |-
The user having created the meeting
**Resource**: User
readOnly: true
project:
allOf:
- "$ref": "./link.yml"
- description: |-
The project the meeting is in
**Resource**: Project
attachments:
allOf:
- $ref: './link.yml'
- description: |-
The attachment collection of this grid.
**Resource**: AttachmentCollection
addAttachment:
allOf:
- "$ref": "./link.yml"
- description: |-
Attach a file to the meeting
# Conditions
**Permission**: edit meeting
readOnly: true
example:
_type: Meeting
id: 72
lockVersion: 5
title: A meeting
startTime: '2014-05-21T08:00:00.000Z'
endTime: '2014-05-21T10:00:00.000Z'
duration: 120
createdAt: '2014-05-21T08:51:20.396Z'
updatedAt: '2014-05-21T09:14:02.776Z'
_embedded:
project:
_type: Project...
id: 12
author:
_type: User...
id: 2
_links:
addAttachment:
href: "/api/v3/meetings/72/attachments"
method: post
attachments:
href: "/api/v3/meetings/72/attachments"
project:
href: "/api/v3/projects/12"
title: some project
author:
href: "/api/v3/users/2"
title: Peggie Feeney
self:
href: "/api/v3/meetings/72"
6 changes: 6 additions & 0 deletions docs/api/apiv3/openapi-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ paths:
"$ref": "./paths/help_texts.yml"
"/api/v3/help_texts/{id}":
"$ref": "./paths/help_text.yml"
"/api/v3/meetings/{id}":
"$ref": "./paths/meeting.yml"
"/api/v3/meetings/{id}/attachments":
"$ref": "./paths/meeting_attachments.yml"
"/api/v3/memberships":
"$ref": "./paths/memberships.yml"
"/api/v3/memberships/available_projects":
Expand Down Expand Up @@ -649,6 +653,8 @@ components:
"$ref": "./components/schemas/list_of_news_model.yml"
List_projects_by_versionModel:
"$ref": "./components/schemas/list_projects_by_version_model.yml"
MeetingModel:
"$ref": "./components/schemas/meeting_model.yml"
MarkdownModel:
"$ref": "./components/schemas/markdown_model.yml"
MembershipCollectionModel:
Expand Down
72 changes: 72 additions & 0 deletions docs/api/apiv3/paths/meeting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# /api/v3/meetings/{id}
---
get:
parameters:
- description: Meeting identifier
example: '1'
in: path
name: id
required: true
schema:
type: integer
responses:
'200':
content:
application/hal+json:
examples:
response:
value:
_embedded:
project:
_type: Project...
id: 12
author:
_type: User...
id: 2
_links:
addAttachment:
href: "/api/v3/meetings/72/attachments"
method: post
attachments:
href: "/api/v3/meetings/72/attachments"
project:
href: "/api/v3/projects/12"
title: some project
author:
href: "/api/v3/users/2"
title: Peggie Feeney
self:
href: "/api/v3/meetings/72"
_type: Meeting
id: 72
lockVersion: 5
title: A meeting
startTime: '2014-05-21T08:00:00.000Z'
duration: 120
createdAt: '2014-05-21T08:51:20.396Z'
updatedAt: '2014-05-21T09:14:02.776Z'
schema:
"$ref": "../components/schemas/meeting_model.yml"
description: OK
headers: { }
'404':
content:
application/hal+json:
schema:
$ref: "../components/schemas/error_response.yml"
examples:
response:
value:
_type: Error
errorIdentifier: urn:openproject-org:api:v3:errors:NotFound
message: The requested resource could not be found.
description: |-
Returned if the meeting does not exist or the client does not have sufficient permissions to see it.
**Required permission:** view meetings in the page's project
headers: { }
tags:
- Meetings
description: Retrieve an individual meeting as identified by the id parameter
operationId: View_Meeting
summary: View Meeting Page
Loading

0 comments on commit 24310f2

Please sign in to comment.