-
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.
Merge pull request #3 from eseiker/amend-planet-schema
Amend schema to align with current planet registry
- Loading branch information
Showing
2 changed files
with
140 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"$id": "https://planetarium.github.io/json-schema/NineChronicles/2024-12/PlanetRegistry.schema.json", | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"title": "PlanetRegistry", | ||
"type": "array", | ||
"items": { | ||
"$ref": "PlanetSpec.schema.json" | ||
}, | ||
"additionalProperties": false | ||
} |
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,130 @@ | ||
{ | ||
"$id": "https://planetarium.github.io/json-schema/NineChronicles/2024-12/PlanetSpec.schema.json", | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"title": "PlanetSpec", | ||
"type": "object", | ||
"required": [ | ||
"id", | ||
"name", | ||
"rpcEndpoints" | ||
], | ||
"properties": { | ||
"id": { | ||
"description": "The unique identifier for the planet", | ||
"type": "string", | ||
"pattern": "^0x[a-fA-F0-9]{12}$" | ||
}, | ||
"name": { | ||
"description": "The human-readable name for the planet", | ||
"type": "string" | ||
}, | ||
"genesisHash": { | ||
"description": "The block hash of the genesis block for the planet", | ||
"type": "string", | ||
"pattern": "^[a-fA-F0-9]{64}$" | ||
}, | ||
"genesisUri": { | ||
"description": "The URI for fetching the genesis block content", | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"9cscanUrl": { | ||
"description": "The URI to 9cscan for the planet", | ||
"type": "string", | ||
"format": "uri" | ||
}, | ||
"rpcEndpoints": { | ||
"description": "The list of rpc endpoints for the planet", | ||
"type": "object", | ||
"required": [ | ||
"headless.gql", | ||
"headless.grpc" | ||
], | ||
"properties": { | ||
"headless.gql": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
}, | ||
"headless.grpc": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
}, | ||
"dp.gql": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
}, | ||
"world-boss.rest": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
}, | ||
"patrol-reward.gql": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
}, | ||
"market.rest": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
}, | ||
"9cscan.rest": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
}, | ||
"arena.gql": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"bridges": { | ||
"description": "The bridge addresses bound to other planets", | ||
"type": "object", | ||
"patternProperties": { | ||
"^0x[a-fA-F0-9]{12}$": { | ||
"type": "object", | ||
"required": [ | ||
"agent", | ||
"avatar" | ||
], | ||
"properties": { | ||
"agent": { | ||
"type": "string", | ||
"pattern": "^0x[a-fA-F0-9]{40}$" | ||
}, | ||
"avatar": { | ||
"type": "string", | ||
"pattern": "^0x[a-fA-F0-9]{40}$" | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"additionalProperties": false | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |