spec: unify income payment cards and drop period comparisons (WealthLedger/main#33) (#37)
spec: unify income payment cards and drop period comparisons (WealthLedger/main#33)
This commit was merged in pull request #37.
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"$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" } }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user