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

Add missing id, name fields to json schema docs #1233

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion s2tQuicktypeUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ while (dirIndex < inputs.length) {
//const quicktypeExec = "node " + ["..","quicktype","dist","index.js"].join(path.sep);
const quicktypeExec = ['.', 'node_modules', '.bin', 'quicktype'].join(path.sep);

const command = `${quicktypeExec} --prefer-const-values --prefer-unions -s schema -o ${outputFile} ${sources}`;
const command = `${quicktypeExec} --prefer-const-values --prefer-unions --no-combine-classes -s schema -o ${outputFile} ${sources}`;
console.log('command to run: ' + command);

exec(command, function(error, stdout, stderr) {
Expand Down
40 changes: 24 additions & 16 deletions schemas/context/chatSearchCriteria.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,7 @@
"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": {
"anyOf": [
{
"$ref": "instrument.schema.json#"
},
{
"$ref": "organization.schema.json#"
},
{
"$ref": "contact.schema.json#"
},
{
"type": "string",
"title": "Free text",
"description": "Free text to be used for a keyword search"
}
]
"$ref": "#/$defs/SearchCriteria"
}
}
},
Expand All @@ -41,6 +26,29 @@
},
{ "$ref": "context.schema.json#/definitions/BaseContext" }
],
"$defs": {
"SearchCriteria": {
"type": "object",
"title": "Search Criteria",
"description": "An individual criteria against which to match chat messages, based on an FDC3 context or free-text string.",
"oneOf": [
{
"$ref": "instrument.schema.json#"
},
{
"$ref": "contact.schema.json#"
},
{
"$ref": "organization.schema.json#"
},
{
"type": "string",
"title": "Free text",
"description": "Free text to be used for a keyword search"
}
]
}
},
"examples": [
{
"type": "fdc3.chat.searchCriteria",
Expand Down
4 changes: 4 additions & 0 deletions schemas/context/contact.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"description": "FactSet Permanent Identifier representing the contact"
}
}
},
"name": {
"type": "string",
"description": "An optional human-readable name for the contact"
}
},
"required": [
Expand Down
14 changes: 13 additions & 1 deletion schemas/context/contactList.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
"type": {
"const": "fdc3.contactList"
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Contact List Identifiers",
"description": "One or more identifiers that refer to the contact list in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"description": "An optional human-readable summary of the contact list"
},
"contacts": {
"type": "array",
"title": "List of Contacts",
Expand Down Expand Up @@ -47,4 +59,4 @@
]
}
]
}
}
6 changes: 5 additions & 1 deletion schemas/context/country.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
"deprecated": true
}
}
},
"name": {
"type": "string",
"description": "An optional human-readable name for the country"
}
},
"required": [
Expand All @@ -54,4 +58,4 @@
}
}
]
}
}
5 changes: 5 additions & 0 deletions schemas/context/instrument.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
}
}
},
"name": {
"type": "string",
"title": "Name",
"description": "An optional human-readable name for the instrument"
},
"market": {
"description": "The `market` map can be used to further specify the instrument and help achieve interoperability between disparate data sources. This is especially useful when using an `id` field that is not globally unique.",
"type": "object",
Expand Down
14 changes: 13 additions & 1 deletion schemas/context/instrumentList.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
"type": {
"const": "fdc3.instrumentList"
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Instrument List Identifiers",
"description": "One or more identifiers that refer to the instrument list in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"description": "An optional human-readable summary of the instrument list"
},
"instruments": {
"type": "array",
"title": "List of instruments",
Expand Down Expand Up @@ -48,4 +60,4 @@
]
}
]
}
}
14 changes: 13 additions & 1 deletion schemas/context/orderList.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@
"type": {
"const": "fdc3.orderList"
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Order List Identifiers",
"description": "One or more identifiers that refer to the order list in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"description": "An optional human-readable summary of the order list"
},
"orders": {
"type": "array",
"items": {
Expand Down Expand Up @@ -46,4 +58,4 @@
]
}
]
}
}
4 changes: 4 additions & 0 deletions schemas/context/organization.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"description": "FactSet Permanent Identifier representing the organization"
}
}
},
"name": {
"type": "string",
"description": "An optional human-readable name for the organization"
}
},
"required": [
Expand Down
14 changes: 13 additions & 1 deletion schemas/context/portfolio.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
},
"title": "Portfolio positions",
"description": "The List of Positions which make up the Portfolio"
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Portfolio Identifiers",
"description": "One or more identifiers that refer to the portfolio in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"description": "An optional human-readable name for the portfolio"
}
},
"required": [
Expand Down Expand Up @@ -63,4 +75,4 @@
]
}
]
}
}
14 changes: 13 additions & 1 deletion schemas/context/position.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
"type": "number",
"title": "The size of the holding represented by this position",
"description": "The amount of the holding, e.g. a number of shares"
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Position Identifiers",
"description": "One or more identifiers that refer to the position in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"description": "An optional human-readable name for the position"
}
},
"required": [
Expand All @@ -41,4 +53,4 @@
"holding": 2000000
}
]
}
}
15 changes: 14 additions & 1 deletion schemas/context/tradeList.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@
},
"title": "List of Trades",
"description": "An array of trade contexts that forms the list."
},
"id": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"title": "Trade List Identifiers",
"description": "One or more identifiers that refer to the trade list in an OMS, EMS or related system. Specific key names for systems are expected to be standardized in future."
},
"name": {
"type": "string",
"description": "An optional human-readable name for the trade list"
}

},
"required": [
"type",
Expand Down Expand Up @@ -71,4 +84,4 @@
]
}
]
}
}
Loading
Loading