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

100 lines
2.0 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/v1.specs.schema.json",
"featureFlags": [
"experimental-asset-scaling"
],
"testCases": [
{
"it": "allow solution with spare money",
"balances": [
{
"account": "src",
"asset": "EUR",
"amount": 100
}
],
"expect.postings": [
{
"source": "src",
"destination": "swap",
"amount": 1,
"asset": "EUR"
},
{
"source": "swap",
"destination": "src",
"amount": 100,
"asset": "EUR/2"
},
{
"source": "src",
"destination": "dest",
"amount": 2,
"asset": "EUR/2"
}
]
},
{
"it": "allow solution with spare money (2)",
"balances": [
{
"account": "src",
"asset": "EUR",
"amount": 100
},
{
"account": "src",
"asset": "EUR/1",
"amount": 100
}
],
"expect.postings": [
{
"source": "src",
"destination": "swap",
"amount": 1,
"asset": "EUR/1"
},
{
"source": "swap",
"destination": "src",
"amount": 10,
"asset": "EUR/2"
},
{
"source": "src",
"destination": "dest",
"amount": 2,
"asset": "EUR/2"
}
]
},
{
"it": "no solution",
"balances": [
{
"account": "src",
"asset": "EUR",
"amount": 0
},
{
"account": "src",
"asset": "EUR/2",
"amount": 1
},
{
"account": "src",
"asset": "EUR/3",
"amount": 1
},
{
"account": "src",
"asset": "EUR/4",
"amount": 10
}
],
"expect.error.missingFunds": true
}
]
}