Skip to content

Commit ec64727

Browse files
committed
Add defaults for LDO schemas
While it no longer makes sense to have a universal default schema value (see previous commit), the LDO schema keywords have specific implications which do match one or the other boolean schema. This commit adds the appropraite one. By default, a resource is assumed to provide or accept any structure as its representation, accept any structure for processing if it does processing at all, and to allow any header usage. So targetSchema, submissionSchema, and headerSchema all default to true. However, by default, URI templates may not be resolved from input, so headerSchema defaults to false.
1 parent fe19ca2 commit ec64727

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

links.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"format": "uri-template"
3030
},
3131
"hrefSchema": {
32-
"$ref": "http://json-schema.org/draft-08/hyper-schema#"
32+
"$ref": "http://json-schema.org/draft-08/hyper-schema#",
33+
"default": false
3334
},
3435
"templatePointers": {
3536
"type": "object",
@@ -55,21 +56,24 @@
5556
"type": "string"
5657
},
5758
"targetSchema": {
58-
"$ref": "http://json-schema.org/draft-08/hyper-schema#"
59+
"$ref": "http://json-schema.org/draft-08/hyper-schema#",
60+
"default": true
5961
},
6062
"targetMediaType": {
6163
"type": "string"
6264
},
6365
"targetHints": { },
6466
"headerSchema": {
65-
"$ref": "http://json-schema.org/draft-08/hyper-schema#"
67+
"$ref": "http://json-schema.org/draft-08/hyper-schema#",
68+
"default": true
6669
},
6770
"submissionMediaType": {
6871
"type": "string",
6972
"default": "application/json"
7073
},
7174
"submissionSchema": {
72-
"$ref": "http://json-schema.org/draft-08/hyper-schema#"
75+
"$ref": "http://json-schema.org/draft-08/hyper-schema#",
76+
"default": true
7377
},
7478
"$comment": {
7579
"type": "string"

0 commit comments

Comments
 (0)