2023-05-21 12:40:36 +02:00
|
|
|
openapi: 3.0.3
|
|
|
|
|
|
|
|
info:
|
|
|
|
version: 0.0.1-beta
|
|
|
|
title: Engelsystem
|
2023-11-03 23:27:31 +01:00
|
|
|
description: >
|
2023-07-22 22:47:55 +02:00
|
|
|
This API is as stable as a **beta** version might be.
|
2023-05-21 12:40:36 +02:00
|
|
|
It could burst into flames and morph into a monster at any second!
|
|
|
|
(But we try to keep it somewhat consistent, at least during events).
|
|
|
|
contact:
|
|
|
|
name: GitHub Issues
|
|
|
|
url: https://github.com/engelsystem/engelsystem/issues
|
|
|
|
license:
|
|
|
|
name: GPL 2.0
|
|
|
|
# identifier: GPL-2.0
|
|
|
|
|
|
|
|
servers:
|
|
|
|
- url: /api/v0-beta
|
|
|
|
description: This server
|
|
|
|
- url: http://localhost:5080/api/v0-beta
|
|
|
|
description: Your local dev instance
|
|
|
|
|
|
|
|
tags:
|
2023-12-22 14:18:12 +01:00
|
|
|
- name: api
|
|
|
|
description: API related
|
2023-12-14 00:54:58 +01:00
|
|
|
- name: angeltype
|
|
|
|
description: Angeltypes
|
2023-12-22 14:18:12 +01:00
|
|
|
- name: event
|
|
|
|
description: Event information
|
2023-12-14 00:54:58 +01:00
|
|
|
- name: location
|
|
|
|
description: Event locations
|
2023-05-21 12:40:36 +02:00
|
|
|
- name: news
|
2023-07-19 21:30:07 +02:00
|
|
|
description: News and meeting announcements
|
|
|
|
- name: shift
|
2023-12-14 00:54:58 +01:00
|
|
|
description: Event shifts
|
2023-11-03 23:27:31 +01:00
|
|
|
- name: user
|
|
|
|
description: User information
|
2023-05-21 12:40:36 +02:00
|
|
|
|
2023-12-23 21:59:48 +01:00
|
|
|
security:
|
|
|
|
- bearer-auth: [ ]
|
|
|
|
- api-key-header: [ ]
|
|
|
|
|
2023-05-21 12:40:36 +02:00
|
|
|
components:
|
|
|
|
securitySchemes:
|
2023-12-23 21:59:48 +01:00
|
|
|
bearer-auth:
|
2023-05-21 12:40:36 +02:00
|
|
|
type: http
|
|
|
|
scheme: bearer
|
|
|
|
bearerFormat: API key from settings
|
2023-12-23 21:59:48 +01:00
|
|
|
api-key-header:
|
|
|
|
type: apiKey
|
|
|
|
name: x-api-key
|
|
|
|
in: header
|
2023-05-21 12:40:36 +02:00
|
|
|
|
|
|
|
responses:
|
2023-07-10 17:59:49 +02:00
|
|
|
UnauthorizedError: # 401
|
2023-05-21 12:40:36 +02:00
|
|
|
description: Access token is missing or invalid
|
2023-07-10 17:59:49 +02:00
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Error'
|
|
|
|
ForbiddenError: # 403
|
|
|
|
description: The client is not allowed to access
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Error'
|
2023-07-31 00:26:19 +02:00
|
|
|
NotFoundError: # 404
|
|
|
|
description: This resource can not be found
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Error'
|
|
|
|
NotImplementedError: # 405
|
2023-07-10 17:59:49 +02:00
|
|
|
description: This endpoint or method is not implemented
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
$ref: '#/components/schemas/Error'
|
2023-05-21 12:40:36 +02:00
|
|
|
|
|
|
|
schemas:
|
2023-07-19 21:30:07 +02:00
|
|
|
AngelType:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
example: 42
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
example: Angel
|
2023-07-27 14:34:21 +02:00
|
|
|
description:
|
|
|
|
type: string
|
|
|
|
example: Meta-Group of all registered Angels
|
|
|
|
url:
|
|
|
|
type: string
|
2023-07-31 00:26:19 +02:00
|
|
|
example: https://example.com/angeltype/42
|
|
|
|
description: Link to the page of the given angeltype.
|
2023-07-27 14:34:21 +02:00
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- name
|
|
|
|
- description
|
|
|
|
- url
|
2023-11-03 23:27:31 +01:00
|
|
|
UserAngelType:
|
|
|
|
allOf:
|
|
|
|
- $ref: '#/components/schemas/AngelType'
|
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
confirmed:
|
|
|
|
type: boolean
|
|
|
|
example: true
|
|
|
|
description: >
|
|
|
|
If the user is confirmed
|
|
|
|
(either by the angeltype not requiring confirmation, being a supporter or being confirmed by one).
|
|
|
|
supporter:
|
|
|
|
type: boolean
|
|
|
|
example: false
|
|
|
|
description: If the user is a supporter of the angeltype.
|
|
|
|
required:
|
|
|
|
- confirmed
|
|
|
|
- supporter
|
2023-05-21 12:40:36 +02:00
|
|
|
News:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
example: 42
|
|
|
|
title:
|
|
|
|
type: string
|
|
|
|
example: First helper introduction
|
|
|
|
text:
|
|
|
|
type: string
|
|
|
|
example: |
|
|
|
|
The first introduction meeting takes place at the **Foo Hall** at 13:37.
|
|
|
|
Please bring your own seating as it might take some time.
|
2023-07-31 00:26:19 +02:00
|
|
|
description: |
|
|
|
|
The complete news text with markdown formatting.
|
|
|
|
Might include a `[more]` tag to be used as a separator which must be removed from the text when shown.
|
2023-05-21 12:40:36 +02:00
|
|
|
is_meeting:
|
|
|
|
type: boolean
|
|
|
|
example: true
|
|
|
|
description: Whether or not the news announces a meeting
|
|
|
|
is_pinned:
|
|
|
|
type: boolean
|
|
|
|
example: false
|
|
|
|
description: True if the news is pinned to the top
|
|
|
|
is_highlighted:
|
|
|
|
type: boolean
|
|
|
|
example: false
|
|
|
|
description: True if the news should be highlightet and shown on the dashboard
|
|
|
|
created_at:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTime'
|
2023-05-21 12:40:36 +02:00
|
|
|
updated_at:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
2023-07-27 14:34:21 +02:00
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
example: https://example.com/news/42
|
2023-07-31 00:26:19 +02:00
|
|
|
description: Direct link to the news page
|
2023-07-27 14:34:21 +02:00
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- title
|
|
|
|
- text
|
|
|
|
- is_meeting
|
|
|
|
- is_pinned
|
|
|
|
- is_highlighted
|
|
|
|
- created_at
|
|
|
|
- updated_at
|
|
|
|
- url
|
2023-11-03 19:03:31 +01:00
|
|
|
Location:
|
2023-07-19 21:30:07 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
example: 42
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
example: Heaven
|
2023-07-27 14:34:21 +02:00
|
|
|
url:
|
|
|
|
type: string
|
2023-11-03 19:03:31 +01:00
|
|
|
example: https://example.com/location/42
|
|
|
|
description: Link of the location page
|
2023-07-27 14:34:21 +02:00
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- name
|
|
|
|
- url
|
2023-07-19 21:30:07 +02:00
|
|
|
Shift:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
example: 42
|
|
|
|
title:
|
|
|
|
type: string
|
|
|
|
example: Cleanup the venue
|
|
|
|
description:
|
|
|
|
type: string
|
2023-11-03 23:27:31 +01:00
|
|
|
example: You clean up the venue after the event. Its fun, we promise!
|
|
|
|
description: >
|
|
|
|
Shift description, should be added to the shift type description but might be empty.
|
2023-07-31 00:26:19 +02:00
|
|
|
Normally contains additional information for a specific shift / task.
|
2023-11-03 19:03:31 +01:00
|
|
|
starts_at:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTime'
|
2023-11-03 19:03:31 +01:00
|
|
|
ends_at:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTime'
|
2023-11-03 19:03:31 +01:00
|
|
|
location:
|
|
|
|
$ref: '#/components/schemas/Location'
|
2023-07-19 21:30:07 +02:00
|
|
|
shift_type:
|
|
|
|
$ref: '#/components/schemas/ShiftType'
|
|
|
|
created_at:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
2023-07-19 21:30:07 +02:00
|
|
|
updated_at:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
2023-07-29 21:37:46 +02:00
|
|
|
entries:
|
|
|
|
type: array
|
|
|
|
description: Can be empty (for example on Schedule import of unused room)
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/ShiftEntry'
|
2023-07-27 14:34:21 +02:00
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
example: https://example.com/shifts/42
|
2023-11-03 23:27:31 +01:00
|
|
|
description: Direct link to the shift
|
2023-07-27 14:34:21 +02:00
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- title
|
|
|
|
- description
|
2023-11-03 19:03:31 +01:00
|
|
|
- starts_at
|
|
|
|
- ends_at
|
|
|
|
- location
|
2023-07-27 14:34:21 +02:00
|
|
|
- shift_type
|
|
|
|
- created_at
|
|
|
|
- updated_at
|
2023-07-29 21:37:46 +02:00
|
|
|
- entries
|
2023-07-27 14:34:21 +02:00
|
|
|
- url
|
2023-07-19 21:30:07 +02:00
|
|
|
ShiftEntry:
|
|
|
|
type: object
|
|
|
|
properties:
|
2023-07-29 21:37:46 +02:00
|
|
|
users:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/User'
|
2023-07-19 21:30:07 +02:00
|
|
|
type:
|
|
|
|
$ref: '#/components/schemas/AngelType'
|
2023-07-29 21:37:46 +02:00
|
|
|
needs:
|
|
|
|
type: integer
|
2023-11-03 23:27:31 +01:00
|
|
|
description: >
|
|
|
|
Number of users needed for the shift of the given type.
|
|
|
|
Will be more than users count when not full, less when overbooked
|
|
|
|
or 0 when only additional users with given type have been added.
|
2023-07-29 21:37:46 +02:00
|
|
|
example: 3
|
2023-07-27 14:34:21 +02:00
|
|
|
required:
|
2023-07-29 21:37:46 +02:00
|
|
|
- users
|
2023-07-27 14:34:21 +02:00
|
|
|
- type
|
2023-07-29 21:37:46 +02:00
|
|
|
- needs
|
2023-07-19 21:30:07 +02:00
|
|
|
ShiftType:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
example: 42
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
example: Build-Up
|
|
|
|
description:
|
|
|
|
type: string
|
|
|
|
example: This is a generic build-up shift, mostly involving heavy lifting.
|
2023-07-27 14:34:21 +02:00
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- name
|
|
|
|
- description
|
2023-07-19 21:30:07 +02:00
|
|
|
User:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
id:
|
|
|
|
type: integer
|
|
|
|
example: 42
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
example: HelpfulUser
|
|
|
|
first_name:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: Helpful
|
|
|
|
last_name:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: User
|
|
|
|
pronoun:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: They/Them
|
2023-07-31 00:26:19 +02:00
|
|
|
description: Should be displayed where possible to allow users to be addressed properly
|
2023-07-19 21:30:07 +02:00
|
|
|
contact:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
dect:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: 4242
|
2023-07-31 00:26:19 +02:00
|
|
|
description: The DECT number is a short internal number where users can be easily reached
|
2023-07-19 21:30:07 +02:00
|
|
|
mobile:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: 1234567890
|
2023-07-27 14:34:21 +02:00
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
example: https://example.com/users/42
|
2023-07-31 00:26:19 +02:00
|
|
|
description: Links to the users profile page
|
2023-07-27 14:34:21 +02:00
|
|
|
required:
|
|
|
|
- id
|
|
|
|
- name
|
|
|
|
- first_name
|
|
|
|
- last_name
|
|
|
|
- pronoun
|
|
|
|
- contact
|
|
|
|
- url
|
2023-12-14 00:54:58 +01:00
|
|
|
UserDetail:
|
|
|
|
allOf:
|
|
|
|
- $ref: '#/components/schemas/User'
|
|
|
|
- type: object
|
|
|
|
properties:
|
|
|
|
email:
|
|
|
|
type: string
|
|
|
|
example: user@example.com
|
|
|
|
tshirt:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
example: XL
|
|
|
|
dates:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
planned_arrival:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
2023-12-14 00:54:58 +01:00
|
|
|
planned_departure:
|
2023-12-22 14:18:12 +01:00
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
2023-12-14 00:54:58 +01:00
|
|
|
arrival:
|
|
|
|
type: string
|
|
|
|
nullable: true
|
|
|
|
format: date-time
|
|
|
|
description: Actual arrival date, DateTime in ISO-8601 format
|
|
|
|
example: 2023-05-23T13:37:42.000000Z
|
|
|
|
required:
|
|
|
|
- planned_arrival
|
|
|
|
- planned_departure
|
|
|
|
- arrival
|
|
|
|
language:
|
|
|
|
type: string
|
|
|
|
example: en_US
|
|
|
|
arrived:
|
|
|
|
type: boolean
|
|
|
|
example: true
|
|
|
|
required:
|
|
|
|
- email
|
|
|
|
- tshirt
|
|
|
|
- dates
|
|
|
|
- language
|
|
|
|
- arrived
|
2023-05-21 12:40:36 +02:00
|
|
|
|
2023-12-22 14:18:12 +01:00
|
|
|
DateTime:
|
|
|
|
type: string
|
|
|
|
format: date-time
|
|
|
|
description: DateTime in ISO-8601 format
|
|
|
|
example: 2023-05-23T00:00:00.000000Z
|
|
|
|
DateTimeOptional:
|
|
|
|
type: string
|
|
|
|
format: date-time
|
|
|
|
description: DateTime in ISO-8601 format
|
|
|
|
example: 2023-05-23T00:00:00.000000Z
|
|
|
|
nullable: true
|
|
|
|
Error:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
message:
|
|
|
|
type: string
|
|
|
|
EventInfo:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
api:
|
|
|
|
type: string
|
|
|
|
description: API version for easier version detection
|
|
|
|
example: 1.2.3
|
|
|
|
spec:
|
|
|
|
type: string
|
|
|
|
description: Link to OpenAPI specification
|
|
|
|
example: https://galactic-help.example/api/v1.2.3/openapi
|
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
example: 42. Galactic Conglomeration Congress
|
|
|
|
app_name:
|
|
|
|
type: string
|
|
|
|
example: Engelsystem
|
|
|
|
url:
|
|
|
|
type: string
|
|
|
|
description: URL to be used when linking to the application
|
|
|
|
example: https://galactic-help.example
|
|
|
|
timezone:
|
|
|
|
type: string
|
|
|
|
example: Europe/Berlin
|
|
|
|
description: Timezone of the event
|
|
|
|
buildup:
|
2023-12-22 17:21:31 +01:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
start:
|
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
|
|
|
required:
|
|
|
|
- start
|
|
|
|
event:
|
2023-12-22 14:18:12 +01:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
start:
|
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
|
|
|
end:
|
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
|
|
|
required:
|
|
|
|
- start
|
|
|
|
- end
|
|
|
|
teardown:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
end:
|
|
|
|
$ref: '#/components/schemas/DateTimeOptional'
|
|
|
|
required:
|
|
|
|
- end
|
|
|
|
required:
|
|
|
|
- api
|
|
|
|
- spec
|
|
|
|
- name
|
|
|
|
- app_name
|
|
|
|
- url
|
|
|
|
- timezone
|
|
|
|
- buildup
|
2023-12-22 17:21:31 +01:00
|
|
|
- event
|
2023-12-22 14:18:12 +01:00
|
|
|
- teardown
|
|
|
|
|
2023-05-21 12:40:36 +02:00
|
|
|
paths:
|
2023-07-19 21:30:07 +02:00
|
|
|
/angeltypes:
|
|
|
|
get:
|
|
|
|
tags:
|
2023-12-14 00:54:58 +01:00
|
|
|
- angeltype
|
2023-07-19 21:30:07 +02:00
|
|
|
summary: Get a list of angeltypes
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-07-21 18:45:51 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/AngelType'
|
2023-07-19 21:30:07 +02:00
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
|
|
|
|
2023-12-14 00:54:58 +01:00
|
|
|
/angeltypes/{id}/shifts:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
description: The angeltype identifier
|
|
|
|
example: 42
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- angeltype
|
|
|
|
- shift
|
|
|
|
summary: Get all shifts of the requested angeltype
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Shift'
|
|
|
|
|
2023-05-21 12:40:36 +02:00
|
|
|
/news:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- news
|
|
|
|
summary: Get a list of all news
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-07-21 18:45:51 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/News'
|
2023-05-21 12:40:36 +02:00
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
2023-07-19 21:30:07 +02:00
|
|
|
|
2023-11-03 19:03:31 +01:00
|
|
|
/locations:
|
2023-07-19 21:30:07 +02:00
|
|
|
get:
|
|
|
|
tags:
|
2023-12-14 00:54:58 +01:00
|
|
|
- location
|
2023-11-03 19:03:31 +01:00
|
|
|
summary: Get a list of locations
|
2023-07-19 21:30:07 +02:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-07-21 18:45:51 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: array
|
|
|
|
items:
|
2023-11-03 19:03:31 +01:00
|
|
|
$ref: '#/components/schemas/Location'
|
2023-07-19 21:30:07 +02:00
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
|
|
|
|
2023-11-03 19:03:31 +01:00
|
|
|
/locations/{id}/shifts:
|
2023-07-19 21:30:07 +02:00
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
2023-11-03 19:03:31 +01:00
|
|
|
description: The locations identifier
|
2023-07-19 21:30:07 +02:00
|
|
|
example: 42
|
|
|
|
schema:
|
|
|
|
type: integer
|
|
|
|
get:
|
|
|
|
tags:
|
2023-12-14 00:54:58 +01:00
|
|
|
- location
|
2023-07-19 21:30:07 +02:00
|
|
|
- shift
|
2023-11-03 19:03:31 +01:00
|
|
|
summary: Get all shifts in the requested location
|
2023-07-19 21:30:07 +02:00
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
2023-07-21 18:45:51 +02:00
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Shift'
|
2023-07-19 21:30:07 +02:00
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
2023-07-31 00:26:19 +02:00
|
|
|
'404':
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
2023-11-03 23:27:31 +01:00
|
|
|
|
2023-12-14 18:45:49 +01:00
|
|
|
/users/{id}:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
|
|
|
description: The user identifier or `self`
|
|
|
|
example: 42
|
|
|
|
schema:
|
|
|
|
oneOf:
|
|
|
|
- type: string
|
|
|
|
- type: integer
|
2023-12-14 00:54:58 +01:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- user
|
|
|
|
summary: Get the requesting users information
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
2023-12-14 18:45:49 +01:00
|
|
|
anyOf:
|
|
|
|
- $ref: '#/components/schemas/UserDetail'
|
|
|
|
- $ref: '#/components/schemas/User'
|
2023-12-14 00:54:58 +01:00
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
|
|
|
'404':
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
2023-11-03 23:27:31 +01:00
|
|
|
/users/{id}/angeltypes:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
2023-12-14 18:45:49 +01:00
|
|
|
description: The user identifier or `self`
|
2023-11-03 23:27:31 +01:00
|
|
|
example: 42
|
|
|
|
schema:
|
2023-12-14 18:45:49 +01:00
|
|
|
oneOf:
|
|
|
|
- type: string
|
|
|
|
- type: integer
|
2023-11-03 23:27:31 +01:00
|
|
|
get:
|
|
|
|
tags:
|
2023-12-14 00:54:58 +01:00
|
|
|
- angeltype
|
2023-11-03 23:27:31 +01:00
|
|
|
- user
|
|
|
|
summary: Get the users angel types
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/UserAngelType'
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
|
|
|
'404':
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
2023-11-15 22:41:44 +01:00
|
|
|
|
2023-12-14 00:54:58 +01:00
|
|
|
/users/{id}/shifts:
|
|
|
|
parameters:
|
|
|
|
- name: id
|
|
|
|
in: path
|
|
|
|
required: true
|
2023-12-14 18:45:49 +01:00
|
|
|
description: The user identifier or `self`
|
2023-12-14 00:54:58 +01:00
|
|
|
example: 42
|
|
|
|
schema:
|
2023-12-14 18:45:49 +01:00
|
|
|
oneOf:
|
|
|
|
- type: string
|
|
|
|
- type: integer
|
2023-12-14 00:54:58 +01:00
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- shift
|
|
|
|
- user
|
|
|
|
summary: Get all shifts of the requested user
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
type: array
|
|
|
|
items:
|
|
|
|
$ref: '#/components/schemas/Shift'
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
|
|
|
'404':
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
2023-12-22 14:18:12 +01:00
|
|
|
/info:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- event
|
|
|
|
summary: Get event information
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json:
|
|
|
|
schema:
|
|
|
|
type: object
|
|
|
|
properties:
|
|
|
|
data:
|
|
|
|
$ref: '#/components/schemas/EventInfo'
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
|
|
|
'404':
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|
|
|
|
|
2023-11-15 22:41:44 +01:00
|
|
|
/openapi:
|
|
|
|
get:
|
|
|
|
tags:
|
|
|
|
- api
|
|
|
|
summary: Get the OpenAPI definition
|
|
|
|
responses:
|
|
|
|
'200':
|
|
|
|
description: Ok
|
|
|
|
content:
|
|
|
|
application/json: {}
|
|
|
|
'401':
|
|
|
|
$ref: '#/components/responses/UnauthorizedError'
|
|
|
|
'403':
|
|
|
|
$ref: '#/components/responses/ForbiddenError'
|
|
|
|
'404':
|
|
|
|
$ref: '#/components/responses/NotFoundError'
|