correct use of required annotation in json-schema

https://tools.ietf.org/html/draft-handrews-json-schema-validation-02#section-6.5.3
pull/977/head
Gnuxie 5 years ago committed by GitHub
parent 0d2924841b
commit 6b8b31ce63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,7 +20,6 @@ properties:
server_name: server_name:
type: string type: string
description: DNS name of the homeserver. description: DNS name of the homeserver.
required: true
example: "example.org" example: "example.org"
verify_keys: verify_keys:
type: object type: object
@ -31,7 +30,6 @@ properties:
algorithm and ``abc123`` being the version in the example below). Together, algorithm and ``abc123`` being the version in the example below). Together,
this forms the Key ID. The version must have characters matching the regular this forms the Key ID. The version must have characters matching the regular
expression ``[a-zA-Z0-9_]``. expression ``[a-zA-Z0-9_]``.
required: true
additionalProperties: additionalProperties:
type: object type: object
title: Verify Key title: Verify Key
@ -44,8 +42,8 @@ properties:
key: key:
type: string type: string
description: The `Unpadded Base64`_ encoded key. description: The `Unpadded Base64`_ encoded key.
required: true
example: "VGhpcyBzaG91bGQgYmUgYSByZWFsIGVkMjU1MTkgcGF5bG9hZA" example: "VGhpcyBzaG91bGQgYmUgYSByZWFsIGVkMjU1MTkgcGF5bG9hZA"
required: ["key"]
old_verify_keys: old_verify_keys:
type: object type: object
description: |- description: |-
@ -69,13 +67,12 @@ properties:
type: integer type: integer
format: int64 format: int64
description: POSIX timestamp in milliseconds for when this key expired. description: POSIX timestamp in milliseconds for when this key expired.
required: true
example: 1532645052628 example: 1532645052628
key: key:
type: string type: string
description: The `Unpadded Base64`_ encoded key. description: The `Unpadded Base64`_ encoded key.
required: true
example: "VGhpcyBzaG91bGQgYmUgeW91ciBvbGQga2V5J3MgZWQyNTUxOSBwYXlsb2FkLg" example: "VGhpcyBzaG91bGQgYmUgeW91ciBvbGQga2V5J3MgZWQyNTUxOSBwYXlsb2FkLg"
required: ["expired_ts", "key"]
signatures: signatures:
type: object type: object
description: Digital signatures for this object signed using the ``verify_keys``. description: Digital signatures for this object signed using the ``verify_keys``.
@ -103,3 +100,4 @@ properties:
publishes a key which is valid for a significant amount of time without a way publishes a key which is valid for a significant amount of time without a way
for the homeserver owner to revoke it. for the homeserver owner to revoke it.
example: 1052262000000 example: 1052262000000
required: ["server_name", "verify_keys"]

Loading…
Cancel
Save