Dl/DataType: Difference between revisions
From stonehomewiki
Jump to navigationJump to search
Stonezhong (talk | contribs) |
Stonezhong (talk | contribs) |
||
| Line 98: | Line 98: | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
Those contains can help us to validate the data in a content ignostic way uniformly. | Those contains can help us to validate the data in a content ignostic way uniformly. | ||
For example: | |||
<pre><nowiki> | |||
# This represent a structure which has 2 number member fields for "x" and "y". | |||
{ | |||
id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | |||
type: "object", | |||
properties: { | |||
"x": { | |||
type: {"$ref": "#/$defs/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}, | |||
description: "The x coordinate value, measured in miles", | |||
minimum: 0.0 | |||
}, | |||
"y": { | |||
type: {"$ref": "#/$defs/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}, | |||
description: "The y coordinate value, measured in miles", | |||
minimum: 0.0 | |||
} | |||
}, | |||
description: "Represent a point on a two dimensional canvas" | |||
} | |||
</nowiki></pre> | |||
</div> | </div> | ||
</div> | </div> | ||
<p></p> | <p></p> | ||