openapi: 3.0.0 info: title: API version: 1.0.0 paths: /messages: get: summary: Get all messages tags: - messages responses: '200': description: A list of messages content: application/json: schema: type: array items: $ref: '#/components/schemas/Message' post: summary: Create a new message tags: - messages requestBody: description: The message to create required: true content: application/json: schema: $ref: '#/components/schemas/Message' responses: '201': description: The created message content: application/json: schema: $ref: '#/components/schemas/Message' patch: summary: Update a message tags: - messages requestBody: description: The message to update required: true content: application/json: schema: $ref: '#/components/schemas/Message' responses: '200': description: The updated message content: application/json: schema: $ref: '#/components/schemas/Message' delete: summary: Delete a message tags: - messages requestBody: description: The message to delete required: true content: application/json: schema: $ref: '#/components/schemas/Message' responses: '200': description: The deleted message content: application/json: schema: $ref: '#/components/schemas/Message' /users: get: summary: Get all users tags: - users responses: '200': description: A list of users content: application/json: schema: type: array items: $ref: '#/components/schemas/User' post: summary: Create a new user tags: - users requestBody: description: The user to create required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '201': description: The created user content: application/json: schema: $ref: '#/components/schemas/User' patch: summary: Update a user tags: - users requestBody: description: The user to update required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '200': description: The updated user content: application/json: schema: $ref: '#/components/schemas/User' delete: summary: Delete a user tags: - users requestBody: description: The user to update required: true content: application/json: schema: $ref: '#/components/schemas/User' responses: '200': description: The deleted user content: application/json: schema: $ref: '#/components/schemas/User' components: schemas: Message: type: object properties: id: type: integer format: uint # так как в БД айди это только положительные числа. message: type: string User: type: object properties: id: type: integer format: uint # так как в БД айди это только положительные числа. email: type: string password: type: string