Files
gremiumhub/legalconsenthub-backend/api/legalconsenthub.yml

968 lines
30 KiB
YAML

openapi: "3.0.3"
info:
title: legalconsenthub
version: 0.1.0
description: A platform for digital applications, approvals and discussions.
contact:
name: Denis Lugowski
email: denis.lugowski@gmail.com
servers:
- url: /
paths:
/application-forms:
get:
summary: Get all ApplicationForms
operationId: getAllApplicationForms
tags:
- application-form
responses:
"200":
description: Paged list of application forms
content:
application/json:
schema:
$ref: "#/components/schemas/PagedApplicationFormDto"
"500":
description: Internal server error
post:
summary: Create a new ApplicationForm
operationId: createApplicationForm
tags:
- application-form
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateApplicationFormDto"
responses:
"201":
description: Successfully created application form
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/application-forms/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
summary: Get a specific ApplicationForm
operationId: getApplicationFormById
tags:
- application-form
responses:
"200":
description: Get application form by ID
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
put:
summary: Updates a ApplicationForm
operationId: updateApplicationForm
tags:
- application-form
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
responses:
"200":
description: Successfully updated application form
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
delete:
summary: Delete a ApplicationForm
operationId: deleteApplicationForm
tags:
- application-form
responses:
"204":
description: Application Form successfully deleted
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/application-form-templates:
get:
summary: Get all ApplicationFormTemplates
operationId: getAllApplicationFormTemplates
tags:
- application-form-template
responses:
"200":
description: Paged list of application form templates
content:
application/json:
schema:
$ref: "#/components/schemas/PagedApplicationFormDto"
"500":
description: Internal server error
post:
summary: Create a new ApplicationFormTemplate
operationId: createApplicationFormTemplate
tags:
- application-form-template
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateApplicationFormDto"
responses:
"201":
description: Successfully created application form template
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/application-form-templates/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
summary: Get a specific ApplicationFormTemplate
operationId: getApplicationFormTemplateById
tags:
- application-form-template
responses:
"200":
description: Get application form template by ID
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
put:
summary: Updates a ApplicationFormTemplate
operationId: updateApplicationFormTemplate
tags:
- application-form-template
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
responses:
"200":
description: Successfully updated application form template
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationFormDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
delete:
summary: Delete a ApplicationFormTemplate
operationId: deleteApplicationFormTemplate
tags:
- application-form-template
responses:
"204":
description: Application Form Template successfully deleted
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/users:
get:
summary: Get all users
operationId: getAllUsers
tags:
- user
responses:
"200":
description: Paged list of users
content:
application/json:
schema:
$ref: "#/components/schemas/PagedUserDto"
"500":
description: Internal server error
post:
summary: Create a new user
operationId: createUser
tags:
- user
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateUserDTO"
responses:
"201":
description: Successfully created user
content:
application/json:
schema:
$ref: "#/components/schemas/UserDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/users/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
summary: Get a specific user
operationId: getUserById
tags:
- user
responses:
"200":
description: Get user by ID
content:
application/json:
schema:
$ref: "#/components/schemas/UserDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
delete:
summary: Delete a user
operationId: deleteUser
tags:
- user
responses:
"204":
description: User successfully deleted
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/comments:
get:
summary: Get all comments
operationId: getAllComments
tags:
- comment
responses:
"200":
description: Paged list of comments
content:
application/json:
schema:
$ref: "#/components/schemas/PagedCommentDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
post:
summary: Create a new comment
operationId: createComment
tags:
- comment
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateCommentDto"
responses:
"201":
description: Successfully created comment
content:
application/json:
schema:
$ref: "#/components/schemas/CommentDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/comments/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
summary: Get a specific comment
operationId: getCommentById
tags:
- comment
responses:
"200":
description: Get comment by ID
content:
application/json:
schema:
$ref: "#/components/schemas/CommentDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
delete:
summary: Delete a comment
operationId: deleteComment
tags:
- comment
responses:
"204":
description: Comment successfully deleted
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/roles:
get:
summary: Get all roles
operationId: getAllRoles
tags:
- role
responses:
"200":
description: List of roles
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/RoleDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
post:
summary: Create a new role
operationId: createRole
tags:
- role
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CreateRoleDto"
responses:
"201":
description: Successfully created role
content:
application/json:
schema:
$ref: "#/components/schemas/RoleDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/roles/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
summary: Get a specific role
operationId: getRoleById
tags:
- role
responses:
"200":
description: Get role by ID
content:
application/json:
schema:
$ref: "#/components/schemas/RoleDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
delete:
summary: Delete a role
operationId: deleteRole
tags:
- role
responses:
"204":
description: Role successfully deleted
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/files:
get:
summary: Get all files
operationId: getAllFiles
tags:
- file
responses:
"200":
description: Successful response
"500":
description: Internal server error
post:
summary: Upload a new file
operationId: uploadFile
tags:
- file
requestBody:
required: true
content:
multipart/form-data:
schema:
$ref: "#/components/schemas/UploadFileDto"
responses:
"201":
description: File uploaded
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
/files/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
summary: Get a specific file
operationId: getFileById
tags:
- file
responses:
"200":
description: Get file by ID
content:
application/json:
schema:
$ref: "#/components/schemas/FileDto"
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
delete:
summary: Delete a file
operationId: deleteFile
tags:
- file
responses:
"204":
description: File successfully deleted
"400":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/BadRequest"
"401":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/Unauthorized"
"500":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServerError"
"503":
$ref: "https://api.swaggerhub.com/domains/smartbear-public/ProblemDetails/1.0.0#/components/responses/ServiceUnavailable"
components:
schemas:
####### UserDto #######
UserDto:
type: object
required:
- id
- username
- firstname
- lastname
- email
- password
- roleId
- createdAt
- modifiedAt
properties:
id:
type: string
format: uuid
username:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
format: email
password:
type: string
roleId:
type: string
format: uuid
createdAt:
type: string
format: date-time
modifiedAt:
type: string
format: date-time
CreateUserDTO:
type: object
required:
- username
- firstname
- lastname
- email
- password
- roleId
- createdAt
- modifiedAt
properties:
username:
type: string
firstName:
type: string
lastName:
type: string
email:
type: string
format: email
password:
type: string
roleId:
type: string
format: uuid
PagedUserDto:
type: object
allOf:
- $ref: "#/components/schemas/Page"
required:
- content
properties:
content:
type: array
items:
$ref: "#/components/schemas/UserDto"
####### ApplicationFormDto #######
ApplicationFormDto:
type: object
required:
- id
- formElements
- isTemplate
- createdAt
- modifiedAt
properties:
id:
type: string
format: uuid
formElements:
type: array
items:
$ref: "#/components/schemas/FormElementDto"
isTemplate:
type: boolean
createdAt:
type: string
format: date-time
modifiedAt:
type: string
format: date-time
CreateApplicationFormDto:
required:
- formElements
- isTemplate
type: object
properties:
formElements:
type: array
items:
$ref: "#/components/schemas/CreateFormElementDto"
isTemplate:
type: boolean
default: false
PagedApplicationFormDto:
type: object
allOf:
- $ref: "#/components/schemas/Page"
required:
- content
properties:
content:
type: array
items:
$ref: "#/components/schemas/ApplicationFormDto"
####### CommentDto #######
CommentDto:
type: object
required:
- id
- message
- createdAt
- modifiedAt
properties:
id:
type: string
format: uuid
message:
type: string
createdAt:
type: string
format: date-time
modifiedAt:
type: string
format: date-time
CreateCommentDto:
type: object
required:
- message
properties:
message:
type: string
PagedCommentDto:
type: object
allOf:
- $ref: "#/components/schemas/Page"
required:
- content
properties:
content:
type: array
items:
$ref: "#/components/schemas/CommentDto"
####### RoleDto #######
RoleDto:
type: object
required:
- id
- name
properties:
id:
type: string
format: uuid
name:
type: string
CreateRoleDto:
type: object
required:
- name
properties:
name:
type: string
####### FileDto #######
FileDto:
type: object
required:
- id
- name
- file
- createdAt
- modifiedAt
properties:
id:
type: string
format: uuid
name:
type: string
file:
type: string
createdAt:
type: string
format: date-time
modifiedAt:
type: string
format: date-time
UploadFileDto:
type: object
required:
- name
- file
properties:
name:
type: string
file:
type: string
format: binary
####### Form #######
FormElementDto:
type: object
required:
- id
- applicationFormId
- options
- type
properties:
id:
type: string
format: uuid
applicationFormId:
type: string
format: uuid
options:
type: array
items:
$ref: "#/components/schemas/FormOptionDto"
type:
$ref: "#/components/schemas/FormElementType"
CreateFormElementDto:
type: object
required:
- options
- type
properties:
options:
type: array
items:
$ref: "#/components/schemas/FormOptionDto"
type:
$ref: "#/components/schemas/FormElementType"
FormOptionDto:
type: object
required:
- value
- label
- processingPurpose
- employeeDataCategory
properties:
value:
type: string
label:
type: string
processingPurpose:
$ref: "#/components/schemas/ProcessingPurpose"
employeeDataCategory:
$ref: "#/components/schemas/EmployeeDataCategory"
FormElementType:
type: string
enum:
- DROPDOWN
- CHECKBOX
- RADIOBUTTON
- TEXTFIELD
- SWITCH
####### Notification #######
NotificationDto:
type: object
required:
- id
- notificationType
properties:
id:
type: string
format: uuid
notificationType:
$ref: "#/components/schemas/NotificationType"
NotificationType:
type: string
enum:
- EMAIL
####### Miscellaneous #######
ProcessingPurpose:
type: string
enum:
- SYSTEM_OPERATION
- BUSINESS_PROCESS
- DATA_ANALYSIS
- NONE
EmployeeDataCategory:
type: string
enum:
- NON_CRITICAL
- REVIEW_REQUIRED
- SENSITIVE
- NONE
ComplianceStatus:
type: string
enum:
- NON_CRITICAL
- WARNING
- CRITICAL
####### Supporting components #######
Page:
type: object
required:
- number
- size
- numberOfElements
- last
- totalPages
- first
- totalElements
- empty
properties:
number:
type: integer
format: int32
example: 0
size:
type: integer
format: int32
example: 100
numberOfElements:
type: integer
format: int32
example: 0
last:
type: boolean
example: true
totalPages:
type: integer
format: int32
example: 0
first:
type: boolean
example: true
totalElements:
type: integer
format: int64
example: 0
empty:
type: boolean
example: true