openapi: 3.0.3 info: title: Accounting Service API description: API для управления бюджетными операциями. version: 1.0.0 servers: - url: http://accounting-host:8081/api/v1 description: Accounting Service API v1 paths: /accounting/allocation: post: summary: Выделение бюджета operationId: allocateBudget tags: - Accounting requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AllocationRequestDto' responses: '201': description: Бюджет успешно выделен content: application/json: schema: $ref: '#/components/schemas/AllocationResponseDto' '400': $ref: './common-models.yaml#/components/responses/BadRequest' '401': $ref: './common-models.yaml#/components/responses/Unauthorized' '403': $ref: './common-models.yaml#/components/responses/Forbidden' '404': $ref: './common-models.yaml#/components/responses/NotFound' '500': $ref: './common-models.yaml#/components/responses/InternalServerError' components: schemas: AllocationRequestDto: type: object required: - requestId - type - budget properties: requestId: type: integer format: int64 description: ИД исходного запроса (например, onboarding-request). minimum: 1 example: 1 type: type: string description: Тип запроса на выделение бюджета minLength: 1 maxLength: 50 example: onboarding budget: type: number description: Сумма бюджета для выделения minimum: 0 multipleOf: 0.01 example: 10000.00 AllocationResponseDto: type: object required: - id - requestId - allocated properties: id: type: integer format: int64 description: ИД созданной записи о выделении на стороне account-service. example: 10 requestId: type: integer format: int64 description: ИД исходного запроса. example: 1 allocated: type: boolean description: Признак успешного выделения бюджета. example: true