Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying markdown docs for contexts into schema files #1020

Merged
merged 18 commits into from
Sep 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Final batch of docs migrated into schemas
kriswest committed Aug 14, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 83d98d3056037e85b33d86995c138ceac059af63
2 changes: 1 addition & 1 deletion docs/context/ref/Product.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ hide_title: true

Notes:

- The 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.
- The 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.

## Type

40 changes: 28 additions & 12 deletions schemas/context/chatSearchCriteria.schema.json
Original file line number Diff line number Diff line change
@@ -3,27 +3,43 @@
"$id": "https://fdc3.finos.org/schemas/next/context/chatSearchCriteria.schema.json",
"type": "object",
"title": "Chat Search Criteria",
"allOf": [{
"description": "A context type that represents a simple search criterion, based on a list of other context objects, that can be used to search or filter messages in a chat application.",
"allOf": [
{
"type": "object",
"properties": {
"type": { "const": "fdc3.chat.searchCriteria" },
"type": {
"const": "fdc3.chat.searchCriteria"
},
"criteria": {
"title": "Criteria",
"description": "An array of criteria that should match chats returned from by a search",
"description": "An array of criteria that should match chats returned from by a search.\n\n⚠️ Operators (and/or/not) are not defined in `fdc3.chat.searchCriteria`. It is up to the application that processes the FDC3 Intent to choose and apply the operators between the criteria.\n\nEmpty search criteria can be supported to allow resetting of filters.",
"type": "array",
"items": {
"items": {
"anyOf": [
{ "$ref": "instrument.schema.json#" },
{ "$ref": "organization.schema.json#" },
{ "$ref": "contact.schema.json#" },
{ "type": "string" }
{
"$ref": "instrument.schema.json#"
},
{
"$ref": "organization.schema.json#"
},
{
"$ref": "contact.schema.json#"
},
{
"type": "string"
}
]
}
}
},
"required": ["criteria"]
"required": [
"criteria"
]
},
{ "$ref": "context.schema.json#" }
{
"$ref": "context.schema.json#"
}
],
"examples": [
{
@@ -33,7 +49,7 @@
"type": "fdc3.contact",
"name": "Jane Doe",
"id": {
"email": "jane.doe@mail.com"
"email": "jane.doe@mail.com"
}
},
{
@@ -47,4 +63,4 @@
]
}
]
}
}
1 change: 1 addition & 0 deletions schemas/context/contactList.schema.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
"description": "A collection of contacts, e.g. for chatting to or calling multiple contacts.\n\nThe contact list 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.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.contactList"
1 change: 1 addition & 0 deletions schemas/context/email.schema.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
"description": "A collection of information to be used to initiate an email with a Contact or ContactList.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.email"
1 change: 1 addition & 0 deletions schemas/context/instrumentList.schema.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
"description": "A collection of instruments. Use this type for use cases that require not just a single instrument, but multiple (e.g. to populate a watchlist). However, when holding information for each instrument is required, it is recommended to use the [Portfolio](Portfolio) type.\n\nThe instrument list 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.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.instrumentList"
1 change: 1 addition & 0 deletions schemas/context/interaction.schema.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
"description": "An `Interaction` is a significant direct exchange of ideas or information between a number of participants, e.g. a Sell Side party and one or more Buy Side parties. An `Interaction` might be a call, a meeting (physical or virtual), an IM or the preparation of some specialist data, such as financial data for a given company or sector.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.interaction"
1 change: 1 addition & 0 deletions schemas/context/message.schema.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
"description": "A chat message to be sent through an instant messaging application. Can contain one or several text bodies (organized by mime-type, plaintext or markdown), as well as attached entities (either arbitrary file attachments or FDC3 actions to be embedded in the message). To be put inside a ChatInitSettings object.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.message"
1 change: 1 addition & 0 deletions schemas/context/nothing.schema.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
"description": "A type that explicitly represents a lack of context.\n\nNotes:\n\n- Intended to be used in situations where no context is desired.\n- For example:\n - Raising an intent without context (e.g. opening a blank order form, or chat interface without a contact selected).\n - Resetting context on a channel (e.g. when context is used to set a filter in other applications a null context might release the filter).\n- An explicit representation of a Null or empty context allows apps to declare support for a lack of context, for example in their intent metadata in an app directory.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.nothing"
151 changes: 76 additions & 75 deletions schemas/context/order.schema.json
Original file line number Diff line number Diff line change
@@ -1,77 +1,78 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/context/order.schema.json",
"type": "object",
"title": "Order",
"description": "@experimental context type representing an order. To be used with OMS and EMS systems.\n\nThis type currently only defines a required `id` field, which should provide a reference to the order in one or more systems, an optional human readable `name` field to be used to summarize the order and an optional `details` field that may be used to provide additional detail about the order, including a context representing a `product`, which may be extended with arbitrary properties. The `details.product` field is currently typed as a unspecified Context type, but both `details` and `details.product` are expected to be standardized in future.",
"allOf": [
{
"properties": {
"type": {
"const": "fdc3.order"
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Order Identifiers",
"description": "One or more identifiers that refer to the order in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"title": "Name",
"description": "An optional human-readable summary of the order."
},
"details": {
"type": "object",
"title": "Order Details",
"description": "Optional additional details about the order, which may include a product element that is an, as yet undefined but extensible, Context",
"properties": {
"product": {
"$ref": "product.schema.json"
}
},
"additionalProperties": true
}
},
"required": [
"type",
"id"
],
"additionalProperties": true
},
{
"$ref": "context.schema.json#"
}
],
"examples": [
{
"type": "fdc3.order",
"name": "...",
"id": {
"myOMS": "12345"
},
"details": {
"product": {
"type": "fdc3.product",
"id": {
"productId": "ABC123"
},
"instrument": {
"type": "fdc3.instrument",
"id": {
"ticker": "MSFT"
}
}
}
}
},
{
"type": "fdc3.order",
"id": {
"myOMS": "ABC123"
}
}
]
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/context/order.schema.json",
"type": "object",
"title": "Order",
"description": "@experimental context type representing an order. To be used with OMS and EMS systems.\n\nThis type currently only defines a required `id` field, which should provide a reference to the order in one or more systems, an optional human readable `name` field to be used to summarize the order and an optional `details` field that may be used to provide additional detail about the order, including a context representing a `product`, which may be extended with arbitrary properties. The `details.product` field is currently typed as a unspecified Context type, but both `details` and `details.product` are expected to be standardized in future.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.order"
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Order Identifiers",
"description": "One or more identifiers that refer to the order in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"title": "Name",
"description": "An optional human-readable summary of the order."
},
"details": {
"type": "object",
"title": "Order Details",
"description": "Optional additional details about the order, which may include a product element that is an, as yet undefined but extensible, Context",
"properties": {
"product": {
"$ref": "product.schema.json"
}
},
"additionalProperties": true
}
},
"required": [
"type",
"id"
],
"additionalProperties": true
},
{
"$ref": "context.schema.json#"
}
],
"examples": [
{
"type": "fdc3.order",
"name": "...",
"id": {
"myOMS": "12345"
},
"details": {
"product": {
"type": "fdc3.product",
"id": {
"productId": "ABC123"
},
"instrument": {
"type": "fdc3.instrument",
"id": {
"ticker": "MSFT"
}
}
}
}
},
{
"type": "fdc3.order",
"id": {
"myOMS": "ABC123"
}
}
]
}
1 change: 1 addition & 0 deletions schemas/context/orderList.schema.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
"description": "@experimental A list of orders. Use this type for use cases that require not just a single order, but multiple.\n\nThe OrderList 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.",
"allOf": [
{
"type": "object",
"properties": {
"type": {
"const": "fdc3.orderList"
57 changes: 47 additions & 10 deletions schemas/context/organization.schema.json
Original file line number Diff line number Diff line change
@@ -3,17 +3,54 @@
"$id": "https://fdc3.finos.org/schemas/next/context/organization.schema.json",
"type": "object",
"title": "Organization",
"allOf": [{ "$ref": "context.schema.json#" }],
"properties": {
"type": { "const": "fdc3.organization" },
"id": {
"description": "An entity that can be used when referencing private companies and other organizations where a specific instrument is not available or desired e.g. CRM and News workflows.\n\nIt is valid to include extra properties and metadata as part of the organization payload, but the minimum requirement is for at least one specified identifier to be provided.",
"allOf": [
{
"type": "object",
"properties": {
"LEI": { "type": "string" },
"PERMID": { "type": "string" },
"FDS_ID": { "type": "string" }
"type": {
"const": "fdc3.organization"
},
"id": {
"type": "object",
"title": "Organization Identifiers",
"description": "Identifiers for the organization, at least one must be provided.",
"minProperties": 1,
"properties": {
"LEI": {
"type": "string",
"title": "Legal Entity Identifier",
"description": "The Legal Entity Identifier (LEI) is a 20-character, alpha-numeric code based on the ISO 17442 standard developed by the International Organization for Standardization (ISO). It connects to key reference information that enables clear and unique identification of legal entities participating in financial transactions."
},
"PERMID": {
"type": "string",
"title": "Organization",
"description": "Refinitiv Permanent Identifiers, or PermID for the organization"
},
"FDS_ID": {
"type": "string",
"title": "Organization",
"description": "FDS ID for the organization"
}
}
}
},
"required": [
"id"
]
},
{
"$ref": "context.schema.json#"
}
],
"examples": [
{
"type": "fdc3.organization",
"name": "Cargill, Incorporated",
"id": {
"LEI": "QXZYQNMR4JZ5RIRN4T31",
"FDS_ID": "00161G-E"
}
}
},
"required": ["id"]
}
]
}
Loading