From b3876824f79c628c755b4b81725d301b3e020ed4 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 2 Sep 2022 13:46:18 +0100 Subject: [PATCH] schemas/README: Document `$id` conventions 1. Get the designation of the version correct. 2. That empty `#` fragment is a SHOULD NOT, so just don't. 3. Append `_` to the "filename" where necessary. --- schemas/README-EDDN-schemas.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/schemas/README-EDDN-schemas.md b/schemas/README-EDDN-schemas.md index b903100..8423755 100644 --- a/schemas/README-EDDN-schemas.md +++ b/schemas/README-EDDN-schemas.md @@ -29,7 +29,16 @@ It is best to base any new Schema file on contents all Schemas specify a top-level JSON Object with the data: 1. `$schemaRef` - Which Schema (including version) this message is for. -2. `header` - Object containing mandatory information about the upload; +2. `$id` - The canonical URL for this schema once it is in live service. + 1. Remember to have the version as in `journal/1` not `journal-v1.0`. + 2. Do **NOT** end this with a `#` empty fragment. This is + [documented](https://json-schema.org/draft/2020-12/json-schema-core.html#section-8.2.1) + as unnecessary. + 3. Where there are two separate schemas for the same kind of data, but one + is for Journal-sourced, and the other for CAPI-sourced, you should have + the "filename" of the schema end with `_`, e.g. + `fcmaterials_journal/1` and `fcmaterials_capi/1`. +3. `header` - Object containing mandatory information about the upload; 1. `uploaderID` - a unique ID for the player uploading this data. Don't worry about privacy, the EDDN service will hash this with a key that is regularly changed so no-one knows who an uploader is in-game.