issue-6 #8

Merged
sebastian merged 12 commits from issue-6 into master 2023-09-25 13:18:06 +02:00
2 changed files with 213 additions and 2 deletions
Showing only changes of commit c2a95a1d13 - Show all commits

View File

@ -18,7 +18,7 @@ import java.util.List;
@CrossOrigin(origins = "*", maxAge = 3600) @CrossOrigin(origins = "*", maxAge = 3600)
@RestController @RestController
@RequestMapping("/api/settings") @RequestMapping("/api")
public class TaskgroupController { public class TaskgroupController {
private final TaskgroupService taskgroupService; private final TaskgroupService taskgroupService;

View File

@ -564,6 +564,190 @@ paths:
example: "failed" example: "failed"
enum: enum:
- "failed" - "failed"
/taskgroups:
get:
security:
- API_TOKEN: []
tags:
- taskgroup
summary: list all taskgroups of authorized user
description: list all taskgroups of authorized user
responses:
200:
description: Anfrage erfolgreich
content:
'application/json':
schema:
type: array
items:
$ref: '#/components/schemas/TaskgroupEntityInfo'
put:
security:
- API_TOKEN: []
tags:
- taskgroup
summary: creates taskgroup
description: creates taskgroup
responses:
200:
description: Anfrage erfolgreich
content:
'application/json':
schema:
$ref: '#/components/schemas/TaskgroupEntityInfo'
409:
description: Taskgroup already exists
content:
application/json:
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "failed"
enum:
- "failed"
/taskgroups/{taskgroupID}:
post:
security:
- API_TOKEN: []
tags:
- taskgroup
summary: edits taskgroup
description: edits taskgroup
parameters:
- name: taskgroupID
in: path
description: internal id of taskgroup
required: true
schema:
type: number
example: 1
responses:
200:
description: Anfrage erfolgreich
content:
'application/json':
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "success"
enum:
- "success"
403:
description: No permission
content:
'application/json':
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "failed"
enum:
- "failed"
404:
description: Taskgroup does not exist
content:
'application/json':
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "failed"
enum:
- "failed"
409:
description: Taskgroup with that new name already exists
content:
'application/json':
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "failed"
enum:
- "failed"
delete:
security:
- API_TOKEN: []
tags:
- taskgroup
summary: deletes taskgroup
description: deletes taskgroup
parameters:
- name: taskgroupID
in: path
description: internal id of taskgroup
required: true
schema:
type: number
example: 1
responses:
200:
description: Anfrage erfolgreich
content:
'application/json':
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "success"
enum:
- "success"
403:
description: No permission
content:
'application/json':
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "failed"
enum:
- "failed"
404:
description: Taskgroup does not exist
content:
'application/json':
schema:
type: object
required:
- status
properties:
status:
type: string
description: Status
example: "failed"
enum:
- "failed"
components: components:
securitySchemes: securitySchemes:
API_TOKEN: API_TOKEN:
@ -750,3 +934,30 @@ components:
type: array type: array
items: items:
$ref: '#/components/schemas/PropertyInfo' $ref: '#/components/schemas/PropertyInfo'
TaskgroupEntityInfo:
required:
- taskgroupID
- taskgroupName
additionalProperties: false
properties:
taskgroupID:
type: number
description: internal id of taskgroup
example: 1
taskgroupName:
type: string
description: name of taskgroup
example: Taskgroup 1
maxLength: 255
minLength: 1
TaskgroupFieldInfo:
required:
- name
additionalProperties: false
properties:
name:
type: string
description: name of taskgroup
example: Taskgroup 1
maxLength: 255
minLength: 1