BillingData: Implement WG Master parsing

This commit is contained in:
2024-01-08 19:31:13 +01:00
parent f894c3b212
commit 09e55264bb
3 changed files with 90 additions and 79 deletions

View File

@ -8,25 +8,45 @@
"properties": {
"mode": {"enum": ["elwig"]},
"version": {"enum": [1]},
"payment": {
"type": ["number", "string", "object"],
"pattern": "^curve:[0-9]+$",
"additionalProperties": false,
"properties": {
"default": {
"type": ["number", "string"],
"pattern": "^curve:[0-9]+$"
}
},
"patternProperties": {
"^([A-Z]{2})?(\/[A-Z]*)?$": {
"type": ["number", "string"],
"pattern": "^curve:[0-9]+$"
}
"payment": {"$ref": "#/definitions/payment_1"},
"quality": {"$ref": "#/definitions/quality_1"},
"curves": {
"type": "array",
"items": {"$ref": "#/definitions/curve"}
}
}
}, {
"required": ["AuszahlungSorten", "Kurven"],
"properties": {
"mode": {"enum": ["wgmaster"]},
"AuszahlungSorten": {"$ref": "#/definitions/payment_1"},
"AuszahlungSortenQualitätsstufe": {"$ref": "#/definitions/quality_1"},
"Kurven": {
"type": "array",
"items": {"$ref": "#/definitions/curve"}
}
}
}],
"definitions": {
"payment_1": {
"type": ["number", "string", "object"],
"pattern": "^curve:[0-9]+$",
"additionalProperties": false,
"properties": {
"default": {
"type": ["number", "string"],
"pattern": "^curve:[0-9]+$"
}
},
"quality": {
"type": "object",
"patternProperties": {
"^([A-Z]{2})?(\/[A-Z]*)?$": {
"type": ["number", "string"],
"pattern": "^curve:[0-9]+$"
}
}
},
"quality_1": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Z]{3}$": {
@ -47,58 +67,7 @@
}
}
}
},
"curves": {
"type": "array",
"items": {"$ref": "#/definitions/curve"}
}
}
}, {
"properties": {
"mode": {"enum": ["wgmaster"]},
"AuszahlungSorten": {
"type": "object",
"additionalProperties": false,
"required": ["Kurven"],
"properties": {
"Kurven": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"patternProperties": {
"^[0-9]+(\\.[0-9]+)?oe$": {"type": "number"}
}
}
}
},
"patternProperties": {
"^[A-Z]{2}$": {
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^[A-Z]*$": {
"type": "object",
"additionalProperties": false,
"properties": {
"Gebunden": {
"type": "integer",
"minimum": 0
},
"NichtGebunden": {
"type": "integer",
"minimum": 0
}
}
}
}
}
}
}
}
}],
"definitions": {
},
"curve": {
"type": "object",
"required": ["id", "mode", "data"],
@ -111,15 +80,15 @@
"mode": {"enum": ["oe", "kmw"]},
"data": {
"anyOf": [
{"type": "number" },
{"type": "number"},
{"$ref": "#/definitions/curve_data"}
]
]
},
"geb": {
"anyOf": [
{"type": "number"},
{"$ref": "#/definitions/curve_data"}
]
]
}
}
},