hyf

Context-aware query service for Radroots
git clone https://radroots.dev/git/hyf.git
Log | Files | Refs | README | LICENSE

money.schema.json (1427B)


      1 {
      2   "$comment": "canonical domain Money/PriceCondition; unknown is distinct from zero",
      3   "type": "object",
      4   "properties": {
      5     "state": {
      6       "type": "string",
      7       "enum": [
      8         "known",
      9         "unknown"
     10       ]
     11     },
     12     "amount": {
     13       "type": [
     14         "string",
     15         "null"
     16       ],
     17       "maxLength": 19
     18     },
     19     "scale": {
     20       "type": [
     21         "integer",
     22         "null"
     23       ],
     24       "minimum": 0,
     25       "maximum": 9
     26     },
     27     "currency": {
     28       "type": [
     29         "string",
     30         "null"
     31       ]
     32     },
     33     "basis": {
     34       "type": [
     35         "string",
     36         "null"
     37       ],
     38       "enum": [
     39         "per_unit",
     40         "per_pack",
     41         "per_order",
     42         "unknown",
     43         null
     44       ]
     45     },
     46     "fees": {
     47       "type": [
     48         "array",
     49         "null"
     50       ],
     51       "items": {
     52         "type": "object",
     53         "properties": {
     54           "kind": {
     55             "type": "string"
     56           },
     57           "amount": {
     58             "type": "string",
     59             "maxLength": 19
     60           },
     61           "scale": {
     62             "type": "integer",
     63             "minimum": 0
     64           },
     65           "currency": {
     66             "type": "string"
     67           }
     68         },
     69         "required": [
     70           "kind",
     71           "amount",
     72           "scale",
     73           "currency"
     74         ],
     75         "additionalProperties": false
     76       }
     77     }
     78   },
     79   "required": [
     80     "state"
     81   ],
     82   "additionalProperties": false
     83 }