spec: unify income payment cards and drop period comparisons (WealthLedger/main#33)
47 lines
1.5 KiB
JSON
47 lines
1.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://wealthledger.local/contracts/unify-income-payment-cards/income-analytics-response.schema.json",
|
|
"title": "Целевое изменение ответа income-analytics",
|
|
"description": "Ограничения поверх неизменённых свойств текущего backend-generated OpenAPI: точный контракт остальных полей остаётся у опубликованного OpenAPI. Применяется к 200 application/json обоих маршрутов income-analytics.",
|
|
"type": "object",
|
|
"required": ["data", "meta"],
|
|
"properties": {
|
|
"data": {
|
|
"anyOf": [
|
|
{ "type": "null" },
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"accountId",
|
|
"period",
|
|
"totalsByCurrency",
|
|
"calculatedAt",
|
|
"bucketGranularity",
|
|
"buckets",
|
|
"instruments",
|
|
"entries"
|
|
],
|
|
"properties": {
|
|
"previous": false,
|
|
"yearComparison": false
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"meta": {
|
|
"type": "object",
|
|
"required": ["dependencies"],
|
|
"properties": {
|
|
"dependencies": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["role"],
|
|
"properties": { "role": { "const": "selected" } }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|