Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update schema validator templates #13

Merged
merged 10 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions definitions/13-Hiro-Incentives.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"incentives": {
"incentive1": {
"type": 1,
"name": "Incentive One",
"description": "Description of the first incentive",
"max_claims": 100,
"max_global_claims": 500,
"max_recipient_age_sec": 3600,
"max_concurrent": 10,
"expiry_duration_sec": 86400
}
}
}
60 changes: 60 additions & 0 deletions definitions/14-Hiro-Progressions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"progressions": {
"progression1": {
"name": "First Progression",
"description": "Description of the first progression",
"category": "category1",
"additional_properties": {
"propKey1": "propValue1",
"propKey2": "propValue2"
},
"preconditions": {
"direct": {
"counts": {
"countKey1": 5,
"countKey2": 10
},
"cost": {
"items": {
"item1": 2,
"item2": 3
},
"currencies": {
"currency1": 100,
"currency2": 200
}
},
"achievements": [
"achievement1",
"achievement2"
],
"items_min": {
"item1": 1,
"item2": 2
}
},
"operator": 1
}
},
"progression2": {
"name": "Second Progression",
"description": "Description of the second progression",
"category": "category2",
"additional_properties": {
"propKey3": "propValue3"
}
},
"progression3": {
"name": "Third Progression",
"description": "Description of the third progression",
"category": "category3",
"preconditions": {
"direct": {
"progressions": [
"progression2"
]
}
}
}
}
}
9 changes: 9 additions & 0 deletions definitions/15-Hiro-Stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"whitelist": [
"strength",
"constitution",
"dexterity",
"wisdom",
"intellect"
]
}
5 changes: 5 additions & 0 deletions schemas/08-Hiro-Energy.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
"title": "max_count",
"type": "number"
},
"max_overfill": {
"minimum": 0,
"title": "max_overfill",
"type": "number"
},
"refill_count": {
"minimum": 0,
"title": "refill_count",
Expand Down
8 changes: 7 additions & 1 deletion schemas/12-Hiro-Event-Leaderboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "name"
},
"rank_min": {
"type": "number",
"title": "rank_min",
Expand Down Expand Up @@ -150,6 +154,8 @@
}
}
},
"required": ["event_leaderboards"],
"required": [
"event_leaderboards"
],
"type": "object"
}
72 changes: 72 additions & 0 deletions schemas/13-Hiro-Incentives.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"incentives": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "object",
"properties": {
"type": {
"type": "integer",
"minimum": 0,
"title": "type"
},
"name": {
"type": "string",
"title": "name"
},
"description": {
"type": "string",
"title": "description"
},
"max_claims": {
"type": "integer",
"minimum": 0,
"title": "max_claims"
},
"max_global_claims": {
"type": "integer",
"minimum": 0,
"title": "max_global_claims"
},
"max_recipient_age_sec": {
"type": "integer",
"minimum": 0,
"title": "max_recipient_age_sec"
},
"recipient_reward": {
"$ref": "Hiro-Rewards",
"title": "recipient_reward"
},
"sender_reward": {
"$ref": "Hiro-Rewards",
"title": "sender_reward"
},
"max_concurrent": {
"type": "integer",
"minimum": 0,
"title": "max_concurrent"
},
"expiry_duration_sec": {
"type": "integer",
"minimum": 0,
"title": "expiry_duration_sec"
}
},
"required": [
"type",
"name",
"max_claims",
"max_global_claims",
"expiry_duration_sec"
]
}
},
"title": "incentives"
}
},
"required": [
"incentives"
]
}
163 changes: 163 additions & 0 deletions schemas/14-Hiro-Progressions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"progressions": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"category": {
"type": "string"
},
"additional_properties": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "string"
}
}
},
"preconditions": {
"$ref": "#/definitions/ProgressionPreconditionsBlock"
}
},
"required": []
}
}
}
},
"required": [
"progressions"
],
"definitions": {
"ProgressionPreconditionsBlock": {
"type": "object",
"properties": {
"direct": {
"type": "object",
"properties": {
"counts": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"cost": {
"type": "object",
"properties": {
"items": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"currencies": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
}
}
},
"progressions": {
"type": "array",
"items": {
"type": "string"
}
},
"achievements": {
"type": "array",
"items": {
"type": "string"
}
},
"items_min": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"items_max": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"stats_min": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"stats_max": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"energy_min": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"energy_max": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"currency_min": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
},
"currency_max": {
"type": "object",
"patternProperties": {
".{1,}": {
"type": "integer"
}
}
}
}
},
"operator": {
"type": "integer",
"minimum": 0
},
"nested": {
"$ref": "#/definitions/ProgressionPreconditionsBlock"
}
}
}
}
}
14 changes: 14 additions & 0 deletions schemas/15-Hiro-Stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"whitelist": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"whitelist"
]
}