|
| 1 | +{ |
| 2 | + "$id": "http://json-schema.org/draft-7-wip/hyper-schema-output", |
| 3 | + "$schema": "http://json-schema.org/draft-07-wip/schema#", |
| 4 | + "type": "array", |
| 5 | + "items": { |
| 6 | + "allOf": [ |
| 7 | + {"$ref": "http://json-schema.org/draft-07/links#/definitions/noRequiredFields" } |
| 8 | + ], |
| 9 | + "type": "object", |
| 10 | + "required": [ |
| 11 | + "contextUri", |
| 12 | + "contextPointer", |
| 13 | + "rel", |
| 14 | + "attachmentPointer" |
| 15 | + ], |
| 16 | + "if": { "required": [ "hrefSchema" ] }, |
| 17 | + "then": { "required": [ "hrefInputTemplates", "hrefPrepopulatedInput" ] }, |
| 18 | + "else": { "required": [ "targetUri" ] }, |
| 19 | + "properties": { |
| 20 | + "contextUri": { |
| 21 | + "$comment": "The fully resolved URI of the link context, including a fragment if it is possible to construct one for the given media type and instance", |
| 22 | + "type": "string", |
| 23 | + "format": "uri" |
| 24 | + }, |
| 25 | + "contextPointer": { |
| 26 | + "$comment": "The absolute JSON Pointer to the ___location in the instance that is the context of the link. If the context resource supports JSON Pointer fragments, this will the string form of the identical JSON Pointer", |
| 27 | + "type": "string", |
| 28 | + "format": "json-pointer" |
| 29 | + }, |
| 30 | + "rel": { |
| 31 | + "type": "string" |
| 32 | + }, |
| 33 | + "targetUri": { |
| 34 | + "$comment": "The fully resolved target URI", |
| 35 | + "type": "string", |
| 36 | + "format": "uri" |
| 37 | + }, |
| 38 | + "hrefInputTemplates": { |
| 39 | + "$comment": "The list of partially resolved URI Templates, starting with \"href\", followed by applicable \"base\" values from nearest to furthest.", |
| 40 | + "type": "array", |
| 41 | + "items": { |
| 42 | + "type": "string", |
| 43 | + "format": "uri-template" |
| 44 | + } |
| 45 | + }, |
| 46 | + "hrefPrepopulatedInput": { |
| 47 | + "$comment": "The initial data set to be presented with the input form when URI Tempalte input is accepted.", |
| 48 | + "type": "object", |
| 49 | + "propertyNames": { |
| 50 | + "$comment": "These are all URI Template variable names, specifically the 'varname' production from RFC 6570, Section 2.3", |
| 51 | + "pattern": "^(?:\\w|(?:%[a-f\\d]{2}))+(?:\\.(?:\\w|(?:%[a-f\\d]{2})))*$" |
| 52 | + } |
| 53 | + }, |
| 54 | + "attachmentPointer": { |
| 55 | + "$comment": "The absolute JSON Pointer, in string form, of the position to which this resolved link applies", |
| 56 | + "type": "string", |
| 57 | + "format": "json-pointer" |
| 58 | + } |
| 59 | + } |
| 60 | + } |
| 61 | +} |
0 commit comments