Skip to content

Commit a54ae60

Browse files
Rename contexts in criteria
1 parent 6ab7ece commit a54ae60

5 files changed

Lines changed: 14 additions & 12 deletions

File tree

docs/context/ref/SearchCriteria.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ https://fdc3.finos.org/schemas/next/searchCriteria.schema.json
2121
| Property | Type | Required | Example Value |
2222
|------------------|-----------------|----------|----------------------|
2323
| `type` | string | Yes | `'fdc3.searchCriteria'` |
24-
| `contexts` | (Instrument&#124;<br>Contact&#124;<br>Organization&#124;<br>string)[] | Yes | <pre>[<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"type": "fdc3.instrument",<br>&emsp;&emsp;&emsp;&emsp;"id": {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"ticker": "AAPL"<br>&emsp;&emsp;&emsp;&emsp;}<br>&emsp;&emsp;},<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"type": "fdc3.contact",<br>&emsp;&emsp;&emsp;&emsp;"name":"Jane Doe",<br>&emsp;&emsp;&emsp;&emsp;"id": {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"email": "jane.doe@mail.com"<br>&emsp;&emsp;&emsp;&emsp;}<br>&emsp;&emsp;},<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"type": "fdc3.organization",<br>&emsp;&emsp;&emsp;&emsp;"name":"Symphony",<br>&emsp;&emsp;},<br>&emsp;&emsp;"#OrderID45788422",<br>]</pre> |
24+
| `criteria` | (Instrument&#124;<br>Contact&#124;<br>Organization&#124;<br>string)[] | Yes | <pre>[<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"type": "fdc3.instrument",<br>&emsp;&emsp;&emsp;&emsp;"id": {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"ticker": "AAPL"<br>&emsp;&emsp;&emsp;&emsp;}<br>&emsp;&emsp;},<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"type": "fdc3.contact",<br>&emsp;&emsp;&emsp;&emsp;"name":"Jane Doe",<br>&emsp;&emsp;&emsp;&emsp;"id": {<br>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;"email": "jane.doe@mail.com"<br>&emsp;&emsp;&emsp;&emsp;}<br>&emsp;&emsp;},<br>&emsp;&emsp;{<br>&emsp;&emsp;&emsp;&emsp;"type": "fdc3.organization",<br>&emsp;&emsp;&emsp;&emsp;"name":"Symphony",<br>&emsp;&emsp;},<br>&emsp;&emsp;"#OrderID45788422",<br>]</pre> |
25+
26+
⚠️ Operators (and/or/not) are not defined in `fdc3.searchCriteria`. It is up to the application that processes the FDC3 Intent to choose and apply the operators between the criteria.
2527

2628
## Example
2729

2830
```js
2931
const searchCriteria = {
3032
type: "fdc3.searchCriteria",
31-
contexts: [
33+
criteria: [
3234
{
3335
type: "fdc3.instrument",
3436
id: {

docs/intents/ref/ViewMessages.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Request display of messages relating to a specific `fdc3.instrument` (representi
2626
```js
2727
const searchCriteria = {
2828
type: "fdc3.searchCriteria",
29-
contexts: [
29+
criteria: [
3030
{
3131
type: "fdc3.instrument",
3232
id: {
@@ -44,7 +44,7 @@ Request display of messages relating to a specific `fdc3.contact`:
4444
```js
4545
const searchCriteria = {
4646
type: "fdc3.searchCriteria",
47-
contexts: [
47+
criteria: [
4848
{
4949
type: "fdc3.contact",
5050
name: "Jane Doe",
@@ -63,7 +63,7 @@ Request display of messages relating to a specific `fdc3.organization`:
6363
```js
6464
const searchCriteria = {
6565
type: "fdc3.searchCriteria",
66-
contexts: [
66+
criteria: [
6767
{
6868
type: "fdc3.organization",
6969
name: "Symphony"
@@ -79,7 +79,7 @@ Request display of messages relating to a specific **phrase**:
7979
```js
8080
const searchCriteria = {
8181
type: "fdc3.searchCriteria",
82-
contexts: [
82+
criteria: [
8383
"#OrderID45788422"
8484
]
8585
}
@@ -91,7 +91,7 @@ Request display of messages matching _multiple_ criteria:
9191
```js
9292
const searchCriteria = {
9393
type: "fdc3.searchCriteria",
94-
contexts: [
94+
criteria: [
9595
{
9696
type: "fdc3.contact",
9797
name: "Jane Doe",

src/context/ContextTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export interface Position {
188188
}
189189

190190
export interface SearchCriteria {
191-
contexts: (Instrument | Organization | Contact | string)[];
191+
criteria: (Instrument | Organization | Contact | string)[];
192192
type: string;
193193
}
194194

src/context/schemas/searchCriteria.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"allOf": [{ "$ref": "context.schema.json#" }],
77
"properties": {
88
"type": { "const": "fdc3.searchCriteria" },
9-
"contexts": {
9+
"criteria": {
1010
"type": "array",
1111
"items": {
1212
"anyOf": [
@@ -18,5 +18,5 @@
1818
}
1919
}
2020
},
21-
"required": ["type", "contexts"]
21+
"required": ["type", "criteria"]
2222
}

website/static/schemas/next/searchCriteria.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"allOf": [{ "$ref": "context.schema.json#" }],
77
"properties": {
88
"type": { "const": "fdc3.searchCriteria" },
9-
"contexts": {
9+
"criteria": {
1010
"type": "array",
1111
"items": {
1212
"anyOf": [
@@ -18,5 +18,5 @@
1818
}
1919
}
2020
},
21-
"required": ["type", "contexts"]
21+
"required": ["type", "criteria"]
2222
}

0 commit comments

Comments
 (0)