mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-17 15:51:01 +03:00
schemas/template: Define how to tag a key as having been renamed
This commit is contained in:
parent
3b8845d31a
commit
e6d0240c36
@ -23,8 +23,8 @@
|
||||
version of this Schema's Journal event name.
|
||||
4. For new Journal-based schemas no key renames should be necessary.
|
||||
|
||||
If there are no renames of key names for this Schema, then edit the
|
||||
`Key Renames` section to contain only the text `None.`.
|
||||
If there are no renames of key names for this Schema, then remove the
|
||||
`Key Renames` section.
|
||||
|
||||
Where such renames *are* required do **NOT** attempt to list them all here.
|
||||
That would just require updating them both here and in the actual Schema.
|
||||
@ -32,17 +32,11 @@
|
||||
If there are any, call them out in the `description` of the affected
|
||||
property in the Schema.
|
||||
|
||||
5. In the `Elisions` section clearly document any keys (and thus their values)
|
||||
that are in the source data, but that should not be in the resulting EDDN
|
||||
message.
|
||||
|
||||
**You do not need to list keys with a `_Localised` suffix.**
|
||||
|
||||
6. Do **NOT** remove the `horizons and odyssey flags` section. It is
|
||||
7. Do **NOT** remove the `horizons and odyssey flags` section. It is
|
||||
mandatory that they are allowed (but are optional) in any Journal-based
|
||||
EDDN Schema.
|
||||
|
||||
7. If:
|
||||
8. If both:
|
||||
1. either the source Journal event contains information that includes the
|
||||
System name (possibly as `StarSystem` or `SystemName`), **OR** the source
|
||||
data contains a `SystemAddress` value,
|
||||
@ -83,11 +77,9 @@ discrepancy.**
|
||||
The data source for this schema is the ED Journal event `NewJournalEvent`.
|
||||
|
||||
### Key Renames
|
||||
Many of the key names have a different case defined in this schema, make
|
||||
sure you are renaming them as appropriate.
|
||||
|
||||
### Elisions
|
||||
None
|
||||
Some key names in this Schema are different from how they appear in the source
|
||||
Journal data. Look for keys where the object contains a `renamed` key - the
|
||||
value is what the name would have been in the source Journal data.
|
||||
|
||||
### Augmentations
|
||||
#### horizons and odyssey flags
|
||||
@ -99,5 +91,5 @@ You MUST add a `StarPos` array containing the system co-ordinates from the
|
||||
last `FSDJump`, `CarrierJump`, or `Location` event.
|
||||
|
||||
## Listeners
|
||||
The advice above for [Senders](#senders), combined with the actual Schema file *should*
|
||||
provide all the information you need to process these events.
|
||||
The advice above for [Senders](#senders), combined with the actual Schema file
|
||||
*should* provide all the information you need to process these events.
|
||||
|
@ -25,7 +25,7 @@
|
||||
# event is not guaranteed to contain either, depending on which client
|
||||
# (base, horizons, odyssey) the player is running.
|
||||
# 7. 'some_disallowed_key' demonstrates how to specify that a key (and thus its
|
||||
# value) is not allowed in this schema.
|
||||
# value) is not allowed in this schema. Note the **MANDATORY** description.
|
||||
# 8. Note the trailing comma after the 'some_disallowed_key' entry in
|
||||
# 'messages'. If all you did was remove these comments you would NOT have
|
||||
# a valid JSON file. You should be adding **at least** one additional
|
||||
@ -96,7 +96,14 @@
|
||||
"maxItems" : 3,
|
||||
"description" : "Must be added by the sender"
|
||||
},
|
||||
"some_disallowed_key" { "$ref" : "#/definitions/disallowed" },
|
||||
"ExampleRenamedKey" : {
|
||||
"type" : "string",
|
||||
"renamed" : "SomeOtherKey"
|
||||
}
|
||||
"some_disallowed_key" {
|
||||
"$ref" : "#/definitions/disallowed",
|
||||
"description" : "MANDATORY brief description of why this key must be removed from source data"
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user