Skip to content

Move "readOnly" from Hyper-Schema to Validation #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 10, 2017
5 changes: 0 additions & 5 deletions hyper-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@
"type": "string"
}
}
},
"readOnly": {
"description": "If true, indicates that the value of this property is controlled by the server.",
"type": "boolean",
"default": "false"
}
},
"links": [
Expand Down
17 changes: 0 additions & 17 deletions jsonschema-hyperschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -425,23 +425,6 @@
</figure>
</section>
</section>

<section title="readOnly">
<t>
If it has a value of boolean true, this keyword indicates that the value of the
instance is managed exclusively by the server or the owning authority, and
attempts by a user agent to modify the value of this property are expected to be
ignored or rejected by a server.
</t>
<t>
For example, this property would be used to mark a server-generated serial
number as read-only.
</t>
<t>
The value of this keyword MUST be a boolean.
The default value is false.
</t>
</section>
</section>

<section title="Link Description Object">
Expand Down
22 changes: 22 additions & 0 deletions jsonschema-validation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,28 @@
</t>
</section>

<section title='"readOnly"'>
<t>
The value of this keyword MUST be a boolean.
</t>
<t>
If it has a value of boolean true, this keyword indicates that the value of the
instance is managed exclusively by the owning authority, and attempts by an
application to modify the value of this property are expected to be ignored or
rejected by that owning authority.
</t>
<t>
For example, this property would be used to mark a database-generated serial
number as read-only.
</t>
<t>
This keyword can be used to assist in user interface instance generation.
</t>
<t>
Omitting this keyword has the same behavior as a value of false.
</t>
</section>

<section title='"examples"'>
<t>
The value of this keyword MUST be an array.
Expand Down
4 changes: 4 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
"type": "string"
},
"default": {},
"readOnly": {
"type": "boolean",
"default": false
},
"examples": {
"type": "array",
"items": {}
Expand Down