КФО: процент расхождения от базы без ограничения разрядов (ревью #208 C-2) (#206)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andrey Epifancev 2026-11-06 23:13:52 +04:00
parent b6384a5ad3
commit ce0434f8b1
2 changed files with 2 additions and 2 deletions

View File

@ -2235,7 +2235,7 @@ components:
type: type:
- string - string
- 'null' - 'null'
pattern: ^-?\d{1,5}\.\d{2}$ pattern: ^-?\d+\.\d{2}$
description: deviation_total / base_amount × 100; null при нулевой базе description: deviation_total / base_amount × 100; null при нулевой базе
exceeded: exceeded:
type: boolean type: boolean

View File

@ -15,7 +15,7 @@ import kfo_example as ex # noqa: E402
MONEY = {"type": "string", "pattern": r"^-?\d{1,16}\.\d{2}$", "examples": ["588500.00"]} MONEY = {"type": "string", "pattern": r"^-?\d{1,16}\.\d{2}$", "examples": ["588500.00"]}
MONEY_N = {"type": ["string", "null"], "pattern": r"^-?\d{1,16}\.\d{2}$"} MONEY_N = {"type": ["string", "null"], "pattern": r"^-?\d{1,16}\.\d{2}$"}
PCT_N = {"type": ["string", "null"], "pattern": r"^-?\d{1,5}\.\d{2}$"} PCT_N = {"type": ["string", "null"], "pattern": r"^-?\d+\.\d{2}$"} # процент к базе не ограничен (база бывает мала)
SHARE_N = {"type": ["string", "null"], "pattern": r"^-?\d{1,3}\.\d{2}$"} SHARE_N = {"type": ["string", "null"], "pattern": r"^-?\d{1,3}\.\d{2}$"}
STYPE = {"type": "string", "enum": ["balance", "income"]} STYPE = {"type": "string", "enum": ["balance", "income"]}
ROR = {"type": ["string", "null"], "enum": ["VERSION_NOT_EDITABLE", "LOCK_REQUIRED", "LOCKED_BY_OTHER", None]} ROR = {"type": ["string", "null"], "enum": ["VERSION_NOT_EDITABLE", "LOCK_REQUIRED", "LOCKED_BY_OTHER", None]}