Fix client-server event schemas: remove age
, dedupe fields
This commit adds support for event schema examples to have references to help reduce the chance of fields being forgotten. This also helps reduce duplication of fields, allowing for a more consistent spec that uses the same values everywhere. This also removes both `unsigned` and `age` from the examples as per: * https://github.com/matrix-org/matrix-doc/issues/1524 * https://github.com/matrix-org/matrix-doc/issues/630 Finally, this replaces "localhost" in the examples with an example domain. This is really just a nitpick thing on my part where seeing a "real world" domain is preferred. Fixes https://github.com/matrix-org/matrix-doc/issues/1524 Fixes https://github.com/matrix-org/matrix-doc/issues/630 Step towards https://github.com/matrix-org/matrix-doc/issues/1530
This commit is contained in:
parent
5f06694b6f
commit
0f28f83270
45 changed files with 175 additions and 279 deletions
|
@ -792,7 +792,7 @@ class MatrixUnits(Units):
|
|||
logger.info("Reading event example: %s" % filepath)
|
||||
try:
|
||||
with open(filepath, "r") as f:
|
||||
example = json.load(f)
|
||||
example = resolve_references(filepath, json.load(f))
|
||||
examples[filename] = examples.get(filename, [])
|
||||
examples[filename].append(example)
|
||||
if filename != event_name:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue