| 1 | { |
| 2 | "$title": "Pricing", |
| 3 | "$description": "Price validation with discount and tax", |
| 4 | "$oky": { |
| 5 | "price|@ (>0)|Base price": "100.00", |
| 6 | "discount|@ (>=0)|Discount amount": "20.00", |
| 7 | "taxRate|@ (0, 0.1, 0.20)|Tax rate (0.20 = 20%)": "0.20", |
| 8 | "finalPrice|@ (%CheckPricing)|Final price after discount and tax": "96.00" |
| 9 | }, |
| 10 | "$compute": { |
| 11 | "CheckPricing": "finalPrice == (price - discount) * (1 + taxRate)" |
| 12 | } |
| 13 | } |