Files
Alessandro ScandoneandGitHub e58c2c09e8 fix: properly version json schemas (#171)
* fix: update schemas

* fix: update the schema of new specs file generator

* fix: update specs $schema field to the new one
2026-07-10 10:49:32 +02:00

85 lines
1.7 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/v1.specs.schema.json",
"featureFlags": [
"experimental-asset-scaling"
],
"testCases": [
{
"it": "sends all the available assets that can be cast",
"balances": [
{
"account": "src",
"asset": "EUR",
"amount": 2
},
{
"account": "src",
"asset": "EUR/2",
"amount": 1
},
{
"account": "src",
"asset": "EUR/3",
"amount": 30
}
],
"expect.postings": [
{
"source": "src",
"destination": "swap",
"amount": 30,
"asset": "EUR/3"
},
{
"source": "src",
"destination": "swap",
"amount": 2,
"asset": "EUR"
},
{
"source": "swap",
"destination": "src",
"amount": 203,
"asset": "EUR/2"
},
{
"source": "src",
"destination": "dest",
"amount": 204,
"asset": "EUR/2"
}
]
},
{
"it": "avoids casting the remainder",
"balances": [
{
"account": "src",
"asset": "EUR/3",
"amount": 21
}
],
"expect.postings": [
{
"source": "src",
"destination": "swap",
"amount": 20,
"asset": "EUR/3"
},
{
"source": "swap",
"destination": "src",
"amount": 2,
"asset": "EUR/2"
},
{
"source": "src",
"destination": "dest",
"amount": 2,
"asset": "EUR/2"
}
]
}
]
}