Open timyates opened 1 week ago
This is the backend and simple readonly front-end required for #1656
the front end was done in https://github.com/objectcomputing/check-ins/pull/2522 and merged in to here
erDiagram DOCUMENT { UUID document_id PK string name "unique" string URL "unique" string description "optional" } ROLE_DOCUMENT { UUID role_id PK UUID document_id PK int display_order "the order for documents assigned to a role" }
{ "name": "string", "url": "string", "description": "string" }
[!NOTE] name and url must be unique across all documents, and description is optional
name
url
description
{ "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "url": "string", "description": "string" }
[!NOTE] description may be null
null
GET /services/document
DocumentResponseDTO
GET /services/document/{role_id}
POST /services/document
CAN_ADMINISTER_DOCUMENTATION
DocumentCreateDTO
PUT /services/document/{documentId}
DELETE /services/document/{documentId}
POST /services/document/{role_id}
UUID
This is the backend and simple readonly front-end required for #1656
the front end was done in https://github.com/objectcomputing/check-ins/pull/2522 and merged in to here
Schema
DTO format
DocumentCreateDTO
DocumentResponseDTO
Endpoints
GET /services/document
-- List all documents.DocumentResponseDTO
ordered by nameGET /services/document/{role_id}
-- List documents assigned to a roleDocumentResponseDTO
assigned to the given role_id, ordered by the display_order in the databasePOST /services/document
-- Create a documentCAN_ADMINISTER_DOCUMENTATION
requiredDocumentCreateDTO
as the bodyPUT /services/document/{documentId}
-- Update a documentCAN_ADMINISTER_DOCUMENTATION
requiredDocumentCreateDTO
as the bodyDELETE /services/document/{documentId}
-- Delete a documentCAN_ADMINISTER_DOCUMENTATION
requiredPOST /services/document/{role_id}
-- Set the list of documents for a roleCAN_ADMINISTER_DOCUMENTATION
requiredUUID
strings as the body (these are document ids)DocumentResponseDTO
assigned to the given role_id, ordered by the display_order in the database