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

56 lines
1.1 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/v1.specs.schema.json",
"variables": {
"cap": "10",
"fee": "10%"
},
"testCases": [
{
"it": "it sends 10% of the fee when lower than cap",
"variables": {
"amt": "10"
},
"expect.postings": [
{
"source": "world",
"destination": "fees",
"amount": 1,
"asset": "USD"
},
{
"source": "world",
"destination": "dest",
"amount": 9,
"asset": "USD"
}
]
},
{
"it": "it caps the fee to the $cap",
"variables": {
"amt": "500"
},
"expect.postings": [
{
"source": "world",
"destination": "fees",
"amount": 10,
"asset": "USD"
},
{
"source": "world",
"destination": "dest",
"amount": 40,
"asset": "USD"
},
{
"source": "world",
"destination": "dest",
"amount": 450,
"asset": "USD"
}
]
}
]
}