Skip to content

Commit a8f3fa5

Browse files
committed
Adding notes field to order, product, trade
resolves #1373
1 parent aa11f4f commit a8f3fa5

7 files changed

Lines changed: 190 additions & 112 deletions

File tree

packages/fdc3-context/generated/context/ContextTypes.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,10 @@ export interface Order {
15871587
* An optional human-readable summary of the order.
15881588
*/
15891589
name?: string;
1590+
/**
1591+
* A description or set of notes.
1592+
*/
1593+
notes?: string;
15901594
type: 'fdc3.order';
15911595
[property: string]: any;
15921596
}
@@ -1627,6 +1631,10 @@ export interface ProductObject {
16271631
* A human-readable summary of the product.
16281632
*/
16291633
name?: string;
1634+
/**
1635+
* A description or set of notes.
1636+
*/
1637+
notes?: string;
16301638
type: 'fdc3.product';
16311639
[property: string]: any;
16321640
}
@@ -1697,6 +1705,10 @@ export interface OrderElement {
16971705
* An optional human-readable summary of the order.
16981706
*/
16991707
name?: string;
1708+
/**
1709+
* A description or set of notes.
1710+
*/
1711+
notes?: string;
17001712
type: 'fdc3.order';
17011713
[property: string]: any;
17021714
}
@@ -1904,6 +1916,10 @@ export interface Product {
19041916
* A human-readable summary of the product.
19051917
*/
19061918
name?: string;
1919+
/**
1920+
* A description or set of notes.
1921+
*/
1922+
notes?: string;
19071923
type: 'fdc3.product';
19081924
[property: string]: any;
19091925
}
@@ -1980,6 +1996,10 @@ export interface Trade {
19801996
* A human-readable summary of the trade.
19811997
*/
19821998
name?: string;
1999+
/**
2000+
* A description or set of notes.
2001+
*/
2002+
notes?: string;
19832003
/**
19842004
* A product that is the subject of the trade.
19852005
*/
@@ -2044,6 +2064,10 @@ export interface TradeElement {
20442064
* A human-readable summary of the trade.
20452065
*/
20462066
name?: string;
2067+
/**
2068+
* A description or set of notes.
2069+
*/
2070+
notes?: string;
20472071
/**
20482072
* A product that is the subject of the trade.
20492073
*/
@@ -2966,6 +2990,7 @@ const typeMap: any = {
29662990
{ json: 'details', js: 'details', typ: u(undefined, r('PurpleOrderDetails')) },
29672991
{ json: 'id', js: 'id', typ: m('') },
29682992
{ json: 'name', js: 'name', typ: u(undefined, '') },
2993+
{ json: 'notes', js: 'notes', typ: u(undefined, '') },
29692994
{ json: 'type', js: 'type', typ: r('OrderType') },
29702995
],
29712996
'any'
@@ -2976,6 +3001,7 @@ const typeMap: any = {
29763001
{ json: 'id', js: 'id', typ: m('') },
29773002
{ json: 'instrument', js: 'instrument', typ: u(undefined, r('InstrumentElement')) },
29783003
{ json: 'name', js: 'name', typ: u(undefined, '') },
3004+
{ json: 'notes', js: 'notes', typ: u(undefined, '') },
29793005
{ json: 'type', js: 'type', typ: r('ProductType') },
29803006
],
29813007
'any'
@@ -2994,6 +3020,7 @@ const typeMap: any = {
29943020
{ json: 'details', js: 'details', typ: u(undefined, r('FluffyOrderDetails')) },
29953021
{ json: 'id', js: 'id', typ: m('') },
29963022
{ json: 'name', js: 'name', typ: u(undefined, '') },
3023+
{ json: 'notes', js: 'notes', typ: u(undefined, '') },
29973024
{ json: 'type', js: 'type', typ: r('OrderType') },
29983025
],
29993026
'any'
@@ -3049,6 +3076,7 @@ const typeMap: any = {
30493076
{ json: 'id', js: 'id', typ: m('') },
30503077
{ json: 'instrument', js: 'instrument', typ: u(undefined, r('InstrumentElement')) },
30513078
{ json: 'name', js: 'name', typ: u(undefined, '') },
3079+
{ json: 'notes', js: 'notes', typ: u(undefined, '') },
30523080
{ json: 'type', js: 'type', typ: r('ProductType') },
30533081
],
30543082
'any'
@@ -3067,6 +3095,7 @@ const typeMap: any = {
30673095
[
30683096
{ json: 'id', js: 'id', typ: m('') },
30693097
{ json: 'name', js: 'name', typ: u(undefined, '') },
3098+
{ json: 'notes', js: 'notes', typ: u(undefined, '') },
30703099
{ json: 'product', js: 'product', typ: r('ProductObject') },
30713100
{ json: 'type', js: 'type', typ: r('TradeType') },
30723101
],
@@ -3085,6 +3114,7 @@ const typeMap: any = {
30853114
[
30863115
{ json: 'id', js: 'id', typ: m('') },
30873116
{ json: 'name', js: 'name', typ: u(undefined, '') },
3117+
{ json: 'notes', js: 'notes', typ: u(undefined, '') },
30883118
{ json: 'product', js: 'product', typ: r('ProductObject') },
30893119
{ json: 'type', js: 'type', typ: r('TradeType') },
30903120
],

packages/fdc3-context/schemas/context/order.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
"title": "Name",
2525
"description": "An optional human-readable summary of the order."
2626
},
27+
"notes": {
28+
"type": "string",
29+
"title": "Notes",
30+
"description": "A description or set of notes."
31+
},
2732
"details": {
2833
"type": "object",
2934
"title": "Order Details",
@@ -48,6 +53,7 @@
4853
{
4954
"type": "fdc3.order",
5055
"name": "...",
56+
"notes": "Some notes attached to this order",
5157
"id": {
5258
"myOMS": "12345"
5359
},
Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,61 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://fdc3.finos.org/schemas/next/context/product.schema.json",
4-
"type": "object",
5-
"title": "Product",
6-
"description": "@experimental context type representing a tradable product. To be used with OMS and EMS systems.\n\nThis type is currently only loosely defined as an extensible context object, with an optional instrument field.\n\nThe Product schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.",
7-
"allOf": [
8-
{
9-
"type": "object",
10-
"properties": {
11-
"type": {
12-
"const": "fdc3.product"
13-
},
14-
"id": {
15-
"type": "object",
16-
"additionalProperties": {
17-
"type": "string"
18-
},
19-
"title": "Product Identifiers",
20-
"description": "One or more identifiers that refer to the product. Specific key names for systems are expected to be standardized in future."
21-
},
22-
"name": {
23-
"type": "string",
24-
"title": "Product Name",
25-
"description": "A human-readable summary of the product."
26-
},
27-
"instrument": {
28-
"$ref": "instrument.schema.json",
29-
"title": "Product Instrument",
30-
"description": "A financial instrument that relates to the definition of this product"
31-
}
32-
},
33-
"required": [
34-
"type",
35-
"id"
36-
],
37-
"additionalProperties": true
38-
},
39-
{ "$ref": "context.schema.json#/definitions/BaseContext" }
40-
],
41-
"examples": [
42-
{
43-
"type": "fdc3.product",
44-
"id": {
45-
"productId": "ABC123"
46-
},
47-
"instrument": {
48-
"type": "fdc3.instrument",
49-
"id": {
50-
"ticker": "MSFT"
51-
}
52-
}
53-
}
54-
]
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/context/product.schema.json",
4+
"type": "object",
5+
"title": "Product",
6+
"description": "@experimental context type representing a tradable product. To be used with OMS and EMS systems.\n\nThis type is currently only loosely defined as an extensible context object, with an optional instrument field.\n\nThe Product schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.",
7+
"allOf": [
8+
{
9+
"type": "object",
10+
"properties": {
11+
"type": {
12+
"const": "fdc3.product"
13+
},
14+
"id": {
15+
"type": "object",
16+
"additionalProperties": {
17+
"type": "string"
18+
},
19+
"title": "Product Identifiers",
20+
"description": "One or more identifiers that refer to the product. Specific key names for systems are expected to be standardized in future."
21+
},
22+
"name": {
23+
"type": "string",
24+
"title": "Product Name",
25+
"description": "A human-readable summary of the product."
26+
},
27+
"notes": {
28+
"type": "string",
29+
"title": "Notes",
30+
"description": "A description or set of notes."
31+
},
32+
"instrument": {
33+
"$ref": "instrument.schema.json",
34+
"title": "Product Instrument",
35+
"description": "A financial instrument that relates to the definition of this product"
36+
}
37+
},
38+
"required": [
39+
"type",
40+
"id"
41+
],
42+
"additionalProperties": true
43+
},
44+
{ "$ref": "context.schema.json#/definitions/BaseContext" }
45+
],
46+
"examples": [
47+
{
48+
"type": "fdc3.product",
49+
"id": {
50+
"productId": "ABC123"
51+
},
52+
"notes": "Some notes attached to this product",
53+
"instrument": {
54+
"type": "fdc3.instrument",
55+
"id": {
56+
"ticker": "MSFT"
57+
}
58+
}
59+
}
60+
]
5561
}
Lines changed: 65 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,67 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
3-
"$id": "https://fdc3.finos.org/schemas/next/context/trade.schema.json",
4-
"type": "object",
5-
"title": "Trade",
6-
"description": "@experimental context type representing a trade. To be used with execution systems.\n\nThis type currently only defines a required `id` field, which should provide a reference to the trade in one or more systems, an optional human readable `name` field to be used to summarize the trade and a required `product` field that may be used to provide additional detail about the trade, which is currently typed as a unspecified Context type, but `product` is expected to be standardized in future.\n\n The Trade schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.",
7-
"allOf": [
8-
{
9-
"type": "object",
10-
"properties": {
11-
"type": {
12-
"const": "fdc3.trade"
13-
},
14-
"id": {
15-
"type": "object",
16-
"additionalProperties": {
17-
"type": "string"
18-
},
19-
"title": "Trade Identifiers",
20-
"description": "One or more identifiers that refer to the trade in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
21-
},
22-
"name": {
23-
"type": "string",
24-
"title": "Trade Name",
25-
"description": "A human-readable summary of the trade."
26-
},
27-
"product": {
28-
"$ref": "product.schema.json",
29-
"title": "Traded product",
30-
"description": "A product that is the subject of the trade."
31-
}
32-
},
33-
"required": [
34-
"type", "id", "product"
35-
],
36-
"additionalProperties": true
37-
},
38-
{ "$ref": "context.schema.json#/definitions/BaseContext" }
39-
],
40-
"examples": [
41-
{
42-
"type": "fdc3.trade",
43-
"name": "...",
44-
"id": {
45-
"myEMS": "12345"
46-
},
47-
"product": {
48-
"type": "fdc3.product",
49-
"id": {
50-
"productId": "ABC123"
51-
},
52-
"instrument": {
53-
"type": "fdc3.instrument",
54-
"id": {
55-
"ticker": "MSFT"
56-
}
57-
}
58-
}
59-
}
60-
]
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "https://fdc3.finos.org/schemas/next/context/trade.schema.json",
4+
"type": "object",
5+
"title": "Trade",
6+
"description": "@experimental context type representing a trade. To be used with execution systems.\n\nThis type currently only defines a required `id` field, which should provide a reference to the trade in one or more systems, an optional human readable `name` field to be used to summarize the trade and a required `product` field that may be used to provide additional detail about the trade, which is currently typed as a unspecified Context type, but `product` is expected to be standardized in future.\n\n The Trade schema does not explicitly include identifiers in the id section, as there is not a common standard for such identifiers. Applications can, however, populate this part of the contract with custom identifiers if so desired.",
7+
"allOf": [
8+
{
9+
"type": "object",
10+
"properties": {
11+
"type": {
12+
"const": "fdc3.trade"
13+
},
14+
"id": {
15+
"type": "object",
16+
"additionalProperties": {
17+
"type": "string"
18+
},
19+
"title": "Trade Identifiers",
20+
"description": "One or more identifiers that refer to the trade in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
21+
},
22+
"name": {
23+
"type": "string",
24+
"title": "Trade Name",
25+
"description": "A human-readable summary of the trade."
26+
},
27+
"notes": {
28+
"type": "string",
29+
"title": "Notes",
30+
"description": "A description or set of notes."
31+
},
32+
"product": {
33+
"$ref": "product.schema.json",
34+
"title": "Traded product",
35+
"description": "A product that is the subject of the trade."
36+
}
37+
},
38+
"required": [
39+
"type", "id", "product"
40+
],
41+
"additionalProperties": true
42+
},
43+
{ "$ref": "context.schema.json#/definitions/BaseContext" }
44+
],
45+
"examples": [
46+
{
47+
"type": "fdc3.trade",
48+
"name": "...",
49+
"notes": "Some notes attached to this trade",
50+
"id": {
51+
"myEMS": "12345"
52+
},
53+
"product": {
54+
"type": "fdc3.product",
55+
"id": {
56+
"productId": "ABC123"
57+
},
58+
"instrument": {
59+
"type": "fdc3.instrument",
60+
"id": {
61+
"ticker": "MSFT"
62+
}
63+
}
64+
}
65+
}
66+
]
6167
}

0 commit comments

Comments
 (0)