Skip to content

Commit

Permalink
🔄 re-generate JSON Schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
hf-kklein committed Feb 12, 2024
1 parent 462110c commit 6ebdcac
Show file tree
Hide file tree
Showing 29 changed files with 8,188 additions and 1,771 deletions.
3 changes: 2 additions & 1 deletion BO4ETestProject/TestJsonSchemaGeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ public void NegativeTest()
}


private const int LastDataRowOffset = 40;
private const int LastDataRowOffset = 50;
private const int MaxSchemasPerHour = 10;
[TestMethod]
[DataRow(0)]
[DataRow(10)]
[DataRow(20)]
[DataRow(30)]
[DataRow(40)]
[DataRow(LastDataRowOffset)] // using these different data rows you to workaround the 10schema per hour limitation (MaxSchemasPerHour)

public void TestJSchemaFileGenerationBo(int offset)
Expand Down
123 changes: 98 additions & 25 deletions json-schema-files/BO4E.BO.Anfrage.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,49 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ExterneReferenz": {
"type": ["object", "null"],
"type": [
"object",
"null"
],
"properties": {
"exRefName": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"exRefWert": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"timestamp": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time"
},
"guid": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
}
}
},
"Zeitraum": {
"type": ["object", "null"],
"type": [
"object",
"null"
],
"properties": {
"einheit": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"enum": [
null,
"SEKUNDE",
Expand All @@ -39,65 +60,110 @@
]
},
"dauer": {
"type": ["number", "null"]
"type": [
"number",
"null"
]
},
"startdatum": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time"
},
"enddatum": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time"
},
"startzeitpunkt": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time"
},
"endzeitpunkt": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time"
},
"timestamp": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time"
},
"guid": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
}
},
"required": ["startzeitpunkt", "endzeitpunkt"]
"required": [
"startzeitpunkt",
"endzeitpunkt"
]
}
},
"type": "object",
"properties": {
"boTyp": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"versionStruktur": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"timestamp": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"format": "date-time"
},
"externeReferenzen": {
"type": ["array", "null"],
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/ExterneReferenz"
}
},
"guid": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"lokationsId": {
"type": "string"
},
"lokationsTyp": {
"type": "string",
"enum": ["MALO", "MELO"]
"enum": [
"MALO",
"MELO"
]
},
"obiskennzahl": {
"type": ["string", "null"]
"type": [
"string",
"null"
]
},
"ZeitraumMesswertanfrage": {
"$ref": "#/definitions/Zeitraum"
Expand All @@ -123,7 +189,10 @@
]
},
"anfragetyp": {
"type": ["string", "null"],
"type": [
"string",
"null"
],
"enum": [
null,
"START_ABO",
Expand All @@ -142,5 +211,9 @@
]
}
},
"required": ["lokationsId", "lokationsTyp", "anfragekategorie"]
}
"required": [
"lokationsId",
"lokationsTyp",
"anfragekategorie"
]
}
Loading

0 comments on commit 6ebdcac

Please sign in to comment.