Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6787975

Browse files
dlaxDenis Laxalde
authored and
Denis Laxalde
committed
Move "readOnly" from Hyper-Schema to Validation
We move the description and schema definition of "readOnly" verbatim from the Hyper-Schema specification (and meta-schema) to the validation one, in the "Metadata keywords" section (along with "default", in particular). This addresses part of #363, which states that some keywords historically in the Hyper-Schema specification would be better in the Validation document. The main argument for moving keywords such as "readOnly" is that the Hyper-Schema document could then only focus on describing the hypermedia linking model.
1 parent ce3403c commit 6787975

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

‎hyper-schema.json‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,6 @@
127127
"type": "string"
128128
}
129129
}
130-
},
131-
"readOnly": {
132-
"description": "If true, indicates that the value of this property is controlled by the server.",
133-
"type": "boolean",
134-
"default": "false"
135130
}
136131
},
137132
"links": [

‎jsonschema-hyperschema.xml‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -425,23 +425,6 @@
425425
</figure>
426426
</section>
427427
</section>
428-
429-
<section title="readOnly">
430-
<t>
431-
If it has a value of boolean true, this keyword indicates that the value of the
432-
instance is managed exclusively by the server or the owning authority, and
433-
attempts by a user agent to modify the value of this property are expected to be
434-
ignored or rejected by a server.
435-
</t>
436-
<t>
437-
For example, this property would be used to mark a server-generated serial
438-
number as read-only.
439-
</t>
440-
<t>
441-
The value of this keyword MUST be a boolean.
442-
The default value is false.
443-
</t>
444-
</section>
445428
</section>
446429

447430
<section title="Link Description Object">

‎jsonschema-validation.xml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,23 @@
740740
</t>
741741
</section>
742742

743+
<section title='"readOnly"'>
744+
<t>
745+
If it has a value of boolean true, this keyword indicates that the value of the
746+
instance is managed exclusively by the server or the owning authority, and
747+
attempts by a user agent to modify the value of this property are expected to be
748+
ignored or rejected by a server.
749+
</t>
750+
<t>
751+
For example, this property would be used to mark a server-generated serial
752+
number as read-only.
753+
</t>
754+
<t>
755+
The value of this keyword MUST be a boolean.
756+
The default value is false.
757+
</t>
758+
</section>
759+
743760
<section title='"examples"'>
744761
<t>
745762
The value of this keyword MUST be an array.

‎schema.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
"type": "string"
6161
},
6262
"default": {},
63+
"readOnly": {
64+
"description": "If true, indicates that the value of this property is controlled by the server.",
65+
"type": "boolean",
66+
"default": "false"
67+
},
6368
"examples": {
6469
"type": "array",
6570
"items": {}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /