Skip to content

Commit 4f9bcb0

Browse files
authored
Merge pull request #378 from dlax/readOnly-in-validation
Move "readOnly" from Hyper-Schema to Validation
2 parents d9ee9e9 + 369648b commit 4f9bcb0

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

hyper-schema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,6 @@
122122
"type": "string"
123123
}
124124
}
125-
},
126-
"readOnly": {
127-
"description": "If true, indicates that the value of this property is controlled by the server.",
128-
"type": "boolean",
129-
"default": "false"
130125
}
131126
},
132127
"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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,28 @@
812812
</t>
813813
</section>
814814

815+
<section title='"readOnly"'>
816+
<t>
817+
The value of this keyword MUST be a boolean.
818+
</t>
819+
<t>
820+
If it has a value of boolean true, this keyword indicates that the value of the
821+
instance is managed exclusively by the owning authority, and attempts by an
822+
application to modify the value of this property are expected to be ignored or
823+
rejected by that owning authority.
824+
</t>
825+
<t>
826+
For example, this property would be used to mark a database-generated serial
827+
number as read-only.
828+
</t>
829+
<t>
830+
This keyword can be used to assist in user interface instance generation.
831+
</t>
832+
<t>
833+
Omitting this keyword has the same behavior as a value of false.
834+
</t>
835+
</section>
836+
815837
<section title='"examples"'>
816838
<t>
817839
The value of this keyword MUST be an array.

schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
"type": "string"
6161
},
6262
"default": {},
63+
"readOnly": {
64+
"type": "boolean",
65+
"default": false
66+
},
6367
"examples": {
6468
"type": "array",
6569
"items": {}

0 commit comments

Comments
 (0)