Dl/DataType: Difference between revisions
From stonehomewiki
Jump to navigationJump to search
Stonezhong (talk | contribs) |
Stonezhong (talk | contribs) |
||
| Line 25: | Line 25: | ||
<b>Examples</b>: | <b>Examples</b>: | ||
<pre><nowiki> | <pre><nowiki> | ||
# This represent a " | # This represent a "number" type | ||
{ | { | ||
id: " | id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", | ||
type: " | type: "number", | ||
description: "Represent a float number" | |||
} | } | ||
# This represent a structure which has 2 number member fields for "x" and "y". | # This represent a structure which has 2 number member fields for "x" and "y". | ||
{ | { | ||
id: " | id: "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb", | ||
type: "object", | type: "object", | ||
properties: { | properties: { | ||
"x": { | "x": { | ||
type: " | type: {"$ref": "#/$defs/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}, | ||
description: "The x coordinate value, measured in miles" | |||
}, | }, | ||
"y": { | "y": { | ||
type: " | type: {"$ref": "#/$defs/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"}, | ||
description: "The y coordinate value, measured in miles" | |||
} | } | ||
} | }, | ||
description: "Represent a point on a two dimensional canvas" | |||
} | } | ||
# This represent an array of structure which has 2 number member fields for "x" and "y". | # This represent an array of structure which has 2 number member fields for "x" and "y". | ||
{ | { | ||
id: " | id: "11111111-1111-1111-1111-111111111111", | ||
type: "array", | type: "array", | ||
items: { | items: { | ||
"$ref": "#/$defs/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" | |||
} | } | ||
description: "Represent a series of points on a two dimensional canvas" | |||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
</div> | </div> | ||