forked from adobe/xdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
541 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
docs/reference/common/descriptors/itemselector.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"meta:license": [ | ||
"Copyright 2018 Adobe Systems Incorporated. All rights reserved.", | ||
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license", | ||
"you may not use this file except in compliance with the License. You may obtain a copy", | ||
"of the License at https://creativecommons.org/licenses/by/4.0/" | ||
], | ||
"$id": "https://ns.adobe.com/xdm/common/descriptors/itemselector", | ||
"$schema": "http://json-schema.org/draft-06/schema#", | ||
"title": "Item Selector", | ||
"meta:extensible": false, | ||
"meta:abstract": false, | ||
"type": "object", | ||
"description": "Describes how to select or match to a specific item from an array of values described by an XDM schema.\n\nMatching may be done based on array index, `@id`, `@type`, or schema URI.\n", | ||
"definitions": { | ||
"selector": { | ||
"oneOf": [ | ||
{ | ||
"properties": { | ||
"xdm:index": { | ||
"title": "Index", | ||
"type": "integer", | ||
"description": "When present, indicates the item at this array index should be selected.", | ||
"minimum": 0 | ||
} | ||
}, | ||
"required": [ | ||
"xdm:index" | ||
] | ||
}, | ||
{ | ||
"properties": { | ||
"xdm:id": { | ||
"title": "ID", | ||
"type": "string", | ||
"format": "uri", | ||
"description": "When present, indicates the item with this @id value should be selected." | ||
} | ||
}, | ||
"required": [ | ||
"xdm:id" | ||
] | ||
}, | ||
{ | ||
"properties": { | ||
"xdm:type": { | ||
"title": "Type", | ||
"type": "string", | ||
"format": "uri", | ||
"description": "When present, indicates the item with this @type value should be selected." | ||
} | ||
}, | ||
"required": [ | ||
"xdm:type" | ||
] | ||
}, | ||
{ | ||
"properties": { | ||
"xdm:schema": { | ||
"title": "Schema", | ||
"type": "string", | ||
"format": "uri", | ||
"description": "When present, indicates the item which conforms to this schema URI should be selected." | ||
} | ||
}, | ||
"required": [ | ||
"xdm:schema" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/selector" | ||
} | ||
], | ||
"examples": [ | ||
{ | ||
"xdm:type": "https://ns.adobe.com/experience/mcid" | ||
}, | ||
{ | ||
"xdm:id": "https://example.com/objects/12345" | ||
}, | ||
{ | ||
"xdm:index": 0 | ||
}, | ||
{ | ||
"xdm:schema": "https://ns.adobe.com/xdm/context/identity" | ||
} | ||
] | ||
} |
Oops, something went wrong.