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: http://localhost:8080 security: - bearerAuth: [] paths: ####### Application Forms ####### /application-forms: get: summary: Get all ApplicationForms operationId: getAllApplicationForms tags: - application-form parameters: - in: query name: organizationId schema: type: string description: Filter application forms by organization ID 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-forms/{id}/pdf: get: summary: Returns the application form rendered as PDF operationId: getApplicationFormPdf tags: - application-form parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: Application form as PDF content: application/pdf: schema: type: string format: binary "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}/html: get: summary: Returns the application form rendered as HTML operationId: getApplicationFormHtml tags: - application-form parameters: - name: id in: path required: true schema: type: string format: uuid responses: '200': description: Application form as HTML content: text/html: schema: type: string "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 ####### /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 ####### /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 ####### /comments/{id}: parameters: - name: id in: path required: true schema: type: string format: uuid put: summary: Update a comment operationId: updateComment tags: - comment requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CommentDto" responses: "200": description: Successfully updated 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" 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" /application-forms/{applicationFormId}/comments: parameters: - name: applicationFormId in: path required: true schema: type: string format: uuid get: summary: Get comments for specific application form operationId: getCommentsByApplicationFormId tags: - comment responses: "200": description: Get comments for application form ID 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" /application-forms/{applicationFormId}/form-elements/{formElementId}/comments: parameters: - name: applicationFormId in: path required: true schema: type: string format: uuid - name: formElementId in: path required: true schema: type: string format: uuid post: summary: Create a new comment for a form element 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" ####### Roles ####### /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 ####### /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: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: ####### ApplicationFormDto ####### ApplicationFormDto: type: object required: - id - name - formElements - isTemplate - organizationId - createdBy - lastModifiedBy - createdAt - modifiedAt properties: id: type: string format: uuid name: type: string formElements: type: array items: $ref: "#/components/schemas/FormElementDto" isTemplate: type: boolean organizationId: type: string createdBy: $ref: "#/components/schemas/UserDto" lastModifiedBy: $ref: "#/components/schemas/UserDto" createdAt: type: string format: date-time modifiedAt: type: string format: date-time CreateApplicationFormDto: required: - name - formElements - isTemplate type: object properties: name: type: string formElements: type: array items: $ref: "#/components/schemas/CreateFormElementDto" isTemplate: type: boolean default: false organizationId: type: string PagedApplicationFormDto: type: object allOf: - $ref: "#/components/schemas/Page" required: - content properties: content: type: array items: $ref: "#/components/schemas/ApplicationFormDto" ####### Form ####### FormElementDto: type: object required: - id - applicationFormId - options - type properties: id: type: string format: uuid applicationFormId: type: string format: uuid title: type: string description: type: string options: type: array items: $ref: "#/components/schemas/FormOptionDto" type: $ref: "#/components/schemas/FormElementType" CreateFormElementDto: type: object required: - options - type properties: title: type: string description: type: string 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: - SELECT - CHECKBOX - RADIOBUTTON - TEXTFIELD - SWITCH ####### UserDto ####### UserDto: type: object required: - id - name properties: id: type: string name: type: string ####### CommentDto ####### CommentDto: type: object required: - id - message - applicationFormId - formElementId - createdAt - modifiedAt - createdBy properties: id: type: string format: uuid message: type: string applicationFormId: type: string format: uuid formElementId: type: string format: uuid createdAt: type: string format: date-time modifiedAt: type: string format: date-time createdBy: $ref: "#/components/schemas/UserDto" CreateCommentDto: type: object required: - message - createdBy properties: message: type: string createdBy: $ref: "#/components/schemas/UserDto" 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 ####### 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