Skip to content

Commit

Permalink
Merge pull request #26 from dval-in/feat-better-schemas
Browse files Browse the repository at this point in the history
feat: improved schemas validation
  • Loading branch information
LudovicMalot authored Jan 20, 2024
2 parents 77b2b64 + e6f21db commit 36f93da
Show file tree
Hide file tree
Showing 26 changed files with 2,513 additions and 2,310 deletions.
110 changes: 55 additions & 55 deletions schemas/AchievementCategory.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"_id": {
"type": "number"
},
"achievements": {
"items": {
"properties": {
"desc": {
"type": "string"
},
"hidden": {
"type": "boolean"
},
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"order": {
"type": "number"
},
"reward": {
"type": "number"
}
},
"required": [
"desc",
"hidden",
"id",
"name",
"order",
"reward"
],
"type": "object"
},
"type": "array"
},
"id": {
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"_id": {
"type": "number"
},
"achievements": {
"items": {
"properties": {
"desc": {
"type": "string"
},
"name": {
},
"hidden": {
"type": "boolean"
},
"id": {
"type": "number"
},
"name": {
"type": "string"
},
"order": {
},
"order": {
"type": "number"
},
"reward": {
"type": "number"
}
}
},
"required": [
"desc",
"hidden",
"id",
"name",
"order",
"reward"
],
"type": "object"
},
"type": "array"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"required": [
"_id",
"achievements",
"id",
"name",
"order"
],
"type": "object"
}

"order": {
"type": "number"
}
},
"required": [
"_id",
"achievements",
"id",
"name",
"order"
],
"type": "object",
"additionalProperties": false
}
183 changes: 127 additions & 56 deletions schemas/Artifact.json
Original file line number Diff line number Diff line change
@@ -1,77 +1,148 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"ArtifactSet": {
"properties": {
"_id": {
"type": "number"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"_id",
"id",
"name"
],
"type": "object"
}
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"_id": {
"type": "number"
},
"properties": {
"circlet": {
"properties": {
"_id": {
"type": "number"
"type": "number"
},
"circlet": {
"$ref": "#/definitions/ArtifactSet"
"description": {
"type": "string"
},
"flower": {
"$ref": "#/definitions/ArtifactSet"
"id": {
"type": "string"
},
"fourPiece": {
"type": "string"
"name": {
"type": "string"
}
},
"required": [
"_id",
"id",
"name"
],
"type": "object"
},
"flower": {
"properties": {
"_id": {
"type": "number"
},
"goblet": {
"$ref": "#/definitions/ArtifactSet"
"description": {
"type": "string"
},
"id": {
"type": "string"
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"_id",
"id",
"name"
],
"type": "object"
},
"fourPiece": {
"type": "string"
},
"goblet": {
"properties": {
"_id": {
"type": "number"
},
"max_rarity": {
"type": "number"
"description": {
"type": "string"
},
"min_rarity": {
"type": "number"
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"onePiece": {
"type": "string"
"type": "string"
}
},
"required": [
"_id",
"id",
"name"
],
"type": "object"
},
"id": {
"type": "string"
},
"maxRarity": {
"type": "number"
},
"minRarity": {
"type": "number"
},
"name": {
"type": "string"
},
"onePiece": {
"type": "string"
},
"plume": {
"properties": {
"_id": {
"type": "number"
},
"plume": {
"$ref": "#/definitions/ArtifactSet"
"description": {
"type": "string"
},
"sands": {
"$ref": "#/definitions/ArtifactSet"
"id": {
"type": "string"
},
"twoPiece": {
"type": "string"
"name": {
"type": "string"
}
},
"required": [
"_id",
"id",
"name"
],
"type": "object"
},
"required": [
"sands": {
"properties": {
"_id": {
"type": "number"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"_id",
"id",
"max_rarity",
"min_rarity",
"name"
],
"type": "object"
}

],
"type": "object"
},
"twoPiece": {
"type": "string"
}
},
"required": [
"_id",
"id",
"maxRarity",
"minRarity",
"name"
],
"type": "object",
"additionalProperties": false
}
Loading

0 comments on commit 36f93da

Please sign in to comment.