Контракт dev/api-contract-goodwill.md/.openapi.yaml — по факту arm-core #222 после доводки: пары по вложениям 58.01, «Нет вложений», nullable суммы, warnings, groups и УК в итогах, пакетный PUT …/goodwill, доля до двух знаков, sign в экспорте; OpenAPI выгружен из app.openapi(). §8 «Гудвилл» — выжимка DOC-259025 (03.11); OQ-10/OQ-37 — что принято в реализации. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
428 lines
11 KiB
YAML
428 lines
11 KiB
YAML
openapi: 3.1.0
|
||
info:
|
||
title: АРМ КА — таблица гудвилла (AURORA-1543/1544)
|
||
version: '1.0'
|
||
paths:
|
||
/api/v1/consolidations/versions/{version_id}/goodwill:
|
||
get:
|
||
tags:
|
||
- consolidations
|
||
summary: Table
|
||
operationId: table_api_v1_consolidations_versions__version_id__goodwill_get
|
||
security:
|
||
- bearerAuth: []
|
||
parameters:
|
||
- name: version_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Version Id
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/GoodwillTableOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
put:
|
||
tags:
|
||
- consolidations
|
||
summary: Save
|
||
description: Пакет строк одной транзакцией; ошибка любой строки — 404/422 с её ключом, ничего не сохраняется.
|
||
operationId: save_api_v1_consolidations_versions__version_id__goodwill_put
|
||
security:
|
||
- bearerAuth: []
|
||
parameters:
|
||
- name: version_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Version Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/GoodwillBatchIn'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/GoodwillTableOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
/api/v1/consolidations/versions/{version_id}/goodwill-settings:
|
||
put:
|
||
tags:
|
||
- consolidations
|
||
summary: Settings
|
||
operationId: settings_api_v1_consolidations_versions__version_id__goodwill_settings_put
|
||
security:
|
||
- bearerAuth: []
|
||
parameters:
|
||
- name: version_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Version Id
|
||
requestBody:
|
||
required: true
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/GoodwillSettingsIn'
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/GoodwillTableOut'
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
/api/v1/consolidations/versions/{version_id}/goodwill/export:
|
||
get:
|
||
tags:
|
||
- consolidations
|
||
summary: Export
|
||
operationId: export_api_v1_consolidations_versions__version_id__goodwill_export_get
|
||
security:
|
||
- bearerAuth: []
|
||
parameters:
|
||
- name: version_id
|
||
in: path
|
||
required: true
|
||
schema:
|
||
type: string
|
||
format: uuid
|
||
title: Version Id
|
||
- name: sign
|
||
in: query
|
||
required: false
|
||
schema:
|
||
enum:
|
||
- all
|
||
- positive
|
||
- negative
|
||
- zero
|
||
type: string
|
||
default: all
|
||
title: Sign
|
||
responses:
|
||
'200':
|
||
description: Successful Response
|
||
content:
|
||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
|
||
schema:
|
||
type: string
|
||
format: binary
|
||
'422':
|
||
description: Validation Error
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/HTTPValidationError'
|
||
components:
|
||
schemas:
|
||
GoodwillBatchIn:
|
||
properties:
|
||
rows:
|
||
items:
|
||
$ref: '#/components/schemas/GoodwillRowKeyIn'
|
||
type: array
|
||
minItems: 1
|
||
title: Rows
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- rows
|
||
title: GoodwillBatchIn
|
||
description: Пакет строк таблицы гудвилла; сохраняется целиком или не сохраняется.
|
||
GoodwillGroupOut:
|
||
properties:
|
||
head_legal_entity:
|
||
$ref: '#/components/schemas/RefOut'
|
||
totals:
|
||
$ref: '#/components/schemas/GoodwillTotalsOut'
|
||
type: object
|
||
required:
|
||
- head_legal_entity
|
||
- totals
|
||
title: GoodwillGroupOut
|
||
description: Итог «Всего» блока одной ГО.
|
||
GoodwillRowKeyIn:
|
||
properties:
|
||
ownership_share:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Ownership Share
|
||
include_in_kfo:
|
||
type: boolean
|
||
title: Include In Kfo
|
||
comment:
|
||
anyOf:
|
||
- type: string
|
||
maxLength: 1000
|
||
- type: 'null'
|
||
title: Comment
|
||
head_legal_entity_id:
|
||
type: string
|
||
format: uuid
|
||
title: Head Legal Entity Id
|
||
subsidiary_legal_entity_id:
|
||
type: string
|
||
format: uuid
|
||
title: Subsidiary Legal Entity Id
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- ownership_share
|
||
- include_in_kfo
|
||
- head_legal_entity_id
|
||
- subsidiary_legal_entity_id
|
||
title: GoodwillRowKeyIn
|
||
description: 'Строка пакетного сохранения: пара ГО → ДО и ручной ввод.'
|
||
GoodwillRowOut:
|
||
properties:
|
||
head_legal_entity:
|
||
$ref: '#/components/schemas/RefOut'
|
||
subsidiary_legal_entity:
|
||
$ref: '#/components/schemas/RefOut'
|
||
ownership_share:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Ownership Share
|
||
financial_investment_amount:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Financial Investment Amount
|
||
charter_capital_amount:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Charter Capital Amount
|
||
additional_capital_amount:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Additional Capital Amount
|
||
participation_amount:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Participation Amount
|
||
goodwill_amount:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Goodwill Amount
|
||
include_in_kfo:
|
||
type: boolean
|
||
title: Include In Kfo
|
||
comment:
|
||
anyOf:
|
||
- type: string
|
||
- type: 'null'
|
||
title: Comment
|
||
has_investments:
|
||
type: boolean
|
||
title: Has Investments
|
||
warnings:
|
||
items:
|
||
$ref: '#/components/schemas/WarningOut'
|
||
type: array
|
||
title: Warnings
|
||
updated_by:
|
||
anyOf:
|
||
- $ref: '#/components/schemas/RefOut'
|
||
- type: 'null'
|
||
updated_at:
|
||
anyOf:
|
||
- type: string
|
||
format: date-time
|
||
- type: 'null'
|
||
title: Updated At
|
||
type: object
|
||
required:
|
||
- head_legal_entity
|
||
- subsidiary_legal_entity
|
||
- ownership_share
|
||
- financial_investment_amount
|
||
- charter_capital_amount
|
||
- additional_capital_amount
|
||
- participation_amount
|
||
- goodwill_amount
|
||
- include_in_kfo
|
||
- comment
|
||
- has_investments
|
||
- warnings
|
||
- updated_by
|
||
- updated_at
|
||
title: GoodwillRowOut
|
||
GoodwillSettingsIn:
|
||
properties:
|
||
goodwill_enabled:
|
||
type: boolean
|
||
title: Goodwill Enabled
|
||
additionalProperties: false
|
||
type: object
|
||
required:
|
||
- goodwill_enabled
|
||
title: GoodwillSettingsIn
|
||
GoodwillTableOut:
|
||
properties:
|
||
version_id:
|
||
type: string
|
||
format: uuid
|
||
title: Version Id
|
||
goodwill_enabled:
|
||
type: boolean
|
||
title: Goodwill Enabled
|
||
editable:
|
||
type: boolean
|
||
title: Editable
|
||
read_only_reason:
|
||
anyOf:
|
||
- type: string
|
||
enum:
|
||
- VERSION_NOT_EDITABLE
|
||
- LOCK_REQUIRED
|
||
- LOCKED_BY_OTHER
|
||
- type: 'null'
|
||
title: Read Only Reason
|
||
rows:
|
||
items:
|
||
$ref: '#/components/schemas/GoodwillRowOut'
|
||
type: array
|
||
title: Rows
|
||
groups:
|
||
items:
|
||
$ref: '#/components/schemas/GoodwillGroupOut'
|
||
type: array
|
||
title: Groups
|
||
totals:
|
||
$ref: '#/components/schemas/GoodwillTotalsOut'
|
||
type: object
|
||
required:
|
||
- version_id
|
||
- goodwill_enabled
|
||
- editable
|
||
- read_only_reason
|
||
- rows
|
||
- groups
|
||
- totals
|
||
title: GoodwillTableOut
|
||
GoodwillTotalsOut:
|
||
properties:
|
||
financial_investment_amount:
|
||
type: string
|
||
title: Financial Investment Amount
|
||
charter_capital_amount:
|
||
type: string
|
||
title: Charter Capital Amount
|
||
participation_amount:
|
||
type: string
|
||
title: Participation Amount
|
||
goodwill_amount:
|
||
type: string
|
||
title: Goodwill Amount
|
||
goodwill_in_kfo_amount:
|
||
type: string
|
||
title: Goodwill In Kfo Amount
|
||
type: object
|
||
required:
|
||
- financial_investment_amount
|
||
- charter_capital_amount
|
||
- participation_amount
|
||
- goodwill_amount
|
||
- goodwill_in_kfo_amount
|
||
title: GoodwillTotalsOut
|
||
HTTPValidationError:
|
||
properties:
|
||
detail:
|
||
items:
|
||
$ref: '#/components/schemas/ValidationError'
|
||
type: array
|
||
title: Detail
|
||
type: object
|
||
title: HTTPValidationError
|
||
RefOut:
|
||
properties:
|
||
id:
|
||
type: string
|
||
format: uuid
|
||
title: Id
|
||
name:
|
||
type: string
|
||
title: Name
|
||
type: object
|
||
required:
|
||
- id
|
||
- name
|
||
title: RefOut
|
||
description: 'Ссылка на объект справочника: идентификатор и название (ГК, филиал, ГСК/ГСЗ).'
|
||
ValidationError:
|
||
properties:
|
||
loc:
|
||
items:
|
||
anyOf:
|
||
- type: string
|
||
- type: integer
|
||
type: array
|
||
title: Location
|
||
msg:
|
||
type: string
|
||
title: Message
|
||
type:
|
||
type: string
|
||
title: Error Type
|
||
input:
|
||
title: Input
|
||
ctx:
|
||
type: object
|
||
title: Context
|
||
type: object
|
||
required:
|
||
- loc
|
||
- msg
|
||
- type
|
||
title: ValidationError
|
||
WarningOut:
|
||
properties:
|
||
code:
|
||
type: string
|
||
title: Code
|
||
message:
|
||
type: string
|
||
title: Message
|
||
type: object
|
||
required:
|
||
- code
|
||
- message
|
||
title: WarningOut
|