-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added json schemas for all models to improve dev experience
- Loading branch information
1 parent
80c2944
commit 624d9ca
Showing
11 changed files
with
417 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# yaml-language-server: $schema=../schema/alliances.schema.json | ||
|
||
- model: GrandAlliance | ||
rows: | ||
- id: order | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# yaml-language-server: $schema=../schema/cities.schema.json | ||
|
||
- model: City | ||
rows: | ||
- id: anvilgard | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema", | ||
"$id": "https://aos-api.com/schema/allegiances.schema.json", | ||
"title": "Allegiances", | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"model": { | ||
"type": "string" | ||
}, | ||
"rows": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": ["id", "name"], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"pattern": "^[a-z_]+$" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"description": { | ||
"type": "string" | ||
}, | ||
"grand_alliance": { | ||
"type": "string", | ||
"pattern": "^[a-z_]+$", | ||
"enum": ["order", "chaos", "destruction", "death"] | ||
}, | ||
"mortal_realm": { | ||
"type": "string", | ||
"pattern": "^[a-z_]+$", | ||
"enum": [ | ||
"aqshy", | ||
"azyr", | ||
"chamon", | ||
"ghur", | ||
"ghyran", | ||
"hysh", | ||
"shyish", | ||
"ulgu" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema", | ||
"$id": "https://aos-api.com/schema/alliances.schema.json", | ||
"title": "Alliances", | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"model": { | ||
"type": "string" | ||
}, | ||
"rows": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": ["id", "name"], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"pattern": "^[a-z_]+$" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the grand alliance." | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "A description of the grand alliance." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema", | ||
"$id": "https://aos-api.com/schema/cities.schema.json", | ||
"title": "Cities", | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"model": { | ||
"type": "string" | ||
}, | ||
"rows": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": ["id", "name"], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"pattern": "^[a-z_]+$" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the city." | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "A description of the city." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema", | ||
"$id": "https://aos-api.com/schema/strategies.schema.json", | ||
"title": "Strategies", | ||
"type": "array", | ||
"items": { | ||
"properties": { | ||
"model": { | ||
"type": "string" | ||
}, | ||
"rows": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": ["id", "name"], | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"pattern": "^[a-z_]+$" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "The name of the Grand Strategy." | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "A description of the Grand Strategy." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.