-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating docs to schemas for another 10 context types + adjusting in…
…strument's format
- Loading branch information
Showing
11 changed files
with
456 additions
and
202 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
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
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 |
---|---|---|
@@ -1,35 +1,67 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://fdc3.finos.org/schemas/next/action.schema.json", | ||
"type": "object", | ||
"title": "Action", | ||
"allOf": [{ "$ref": "context.schema.json#" }], | ||
"properties": { | ||
"type": { "const": "fdc3.action" }, | ||
"title": { | ||
"type": "string" | ||
}, | ||
"intent": { | ||
"type": "string", | ||
"$comment": "Should reference an intent type name, such as those defined in the FDC3 Standard'" | ||
}, | ||
"context": { | ||
"type": "object", | ||
"$ref": "context.schema.json#" | ||
}, | ||
"app": { | ||
"description": "A representation of an FDC3 Action (specified via a Context or Context & Intent) that can be inserted inside another object, for example a chat message.\n\nThe action may be completed by calling `fdc3.raiseIntent()` with the specified Intent and Context, or, if only a context is specified, by calling `fdc3.raiseIntentForContext()` (which the Desktop Agent will resolve by presenting the user with a list of available Intents for the Context).\n\nAccepts an optional `app` parameter in order to specify a specific app.", | ||
"allOf": [{ | ||
"type": "object", | ||
"properties": { | ||
"appId": { "type": "string" }, | ||
"instanceId": { "type": "string" } | ||
"type": { "const": "fdc3.action" }, | ||
"title": { | ||
"title": "Title", | ||
"description": "A human readable display name for the action", | ||
"type": "string" | ||
}, | ||
"intent": { | ||
"title": "Action Intent", | ||
"description": "Optional Intent to raise to perform the actions. Should reference an intent type name, such as those defined in the FDC3 Standard. If intent is not set then `fdc3.raiseIntentForContext` should be used to perform the action as this will usually allow the user to choose the intent to raise.", | ||
"type": "string" | ||
}, | ||
"context": { | ||
"title": "Action Context", | ||
"description": "A context object with which the action will be performed", | ||
"$ref": "context.schema.json#" | ||
}, | ||
"app": { | ||
"title": "Target App", | ||
"description": "An optional target application identifier that should perform the action", | ||
"allOf": [ | ||
{ "$ref": "../api/AppIdentifier.schema.json" } | ||
] | ||
} | ||
}, | ||
"required": ["appId"] | ||
"required": [ | ||
"title", "context" | ||
] | ||
}, | ||
"customConfig": { | ||
"type": "object" | ||
{ "$ref": "context.schema.json#" } | ||
], | ||
"examples": [ | ||
{ | ||
"type": "fdc3.action", | ||
"title": "Click to view Chart", | ||
"intent": "ViewChart", | ||
"context" { | ||
"type": "fdc3.chart", | ||
"instruments": [ | ||
{ | ||
"type": "fdc3.instrument", | ||
"id": { | ||
"ticker": "EURUSD" | ||
} | ||
} | ||
], | ||
"range": { | ||
"type": "fdc3.dateRange", | ||
"starttime": "2020-09-01T08:00:00.000Z", | ||
"endtime": "2020-10-31T08:00:00.000Z" | ||
}, | ||
"style": "candle" | ||
}, | ||
"app" { | ||
"appId": "MyChartViewingApp", | ||
"instanceId": "instance1" | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"title", "context" | ||
] | ||
} |
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 |
---|---|---|
@@ -1,30 +1,87 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://fdc3.finos.org/schemas/next/chart.schema.json", | ||
"type": "object", | ||
"title": "Chart", | ||
"allOf": [{ "$ref": "context.schema.json#" }], | ||
"properties": { | ||
"type": { "const": "fdc3.chart" }, | ||
"instruments": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "instrument.schema.json#" | ||
} | ||
"description": "A context type representing details of a Chart, which may be used to request plotting of a particular chart or to otherwise share details of its composition, such as:\n\n- A list of instruments for comparison\n- The time period to plot the chart over\n- The style of chart (line, bar, mountain, candle etc.)\n- Other settings such as indicators to calculate, or data representing drawings and annotations.\n\nIn addition to handling requests to plot charts, a charting application may use this type to output a representation of what it is currently displaying so that it can be recorded by another application.", | ||
"allOf": [{ | ||
"type": "object", | ||
"properties": { | ||
"type": { "const": "fdc3.chart" }, | ||
"instruments": { | ||
"title": "Instruments to plot", | ||
"description": "An array of instrument contexts whose data should be plotted.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "instrument.schema.json#" | ||
} | ||
}, | ||
"range": { | ||
"title": "Time Range", | ||
"description": "The time range that should be plotted", | ||
"allOf": [{ | ||
"$ref": "timerange.schema.json#" | ||
}] | ||
}, | ||
"style": { | ||
"title": "Chart style", | ||
"description": "The type of chart that should be plotted", | ||
"type": "string", | ||
"enum": [ "line", "bar", "stacked-bar", "mountain", "candle", "pie", "scatter", "histogram", "heatmap", "custom"] | ||
}, | ||
"otherConfig": { | ||
"title": "Other configuration", | ||
"description": "It is common for charts to support other configuration, such as indicators, annotations etc., which do not have standardized formats, but may be included in the `otherConfig` array as context objects.", | ||
"type": "array", | ||
"items": { | ||
"$ref": "context.schema.json#" | ||
} | ||
} | ||
}, | ||
"required": ["instruments"] | ||
}, | ||
"range": { | ||
"$ref": "timerange.schema.json#" | ||
}, | ||
"style": { | ||
"type": "string", | ||
"enum": [ "line", "bar", "stacked-bar", "mountain", "candle", "pie", "scatter", "histogram", "heatmap", "custom"] | ||
}, | ||
"otherConfig": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "context.schema.json#" | ||
} | ||
{ "$ref": "context.schema.json#" } | ||
], | ||
"examples": [ | ||
{ | ||
"type": "fdc3.chart", | ||
"instruments": [ | ||
{ | ||
"type": "fdc3.instrument", | ||
"id": { | ||
"ticker": "AAPL" | ||
} | ||
}, | ||
{ | ||
"type": "fdc3.instrument", | ||
"id": { | ||
"ticker": "GOOG" | ||
} | ||
} | ||
], | ||
"range": { | ||
"type": "fdc3.timeRange", | ||
"startTime": "2020-09-01T08:00:00.000Z", | ||
"endTime": "2020-10-31T08:00:00.000Z" | ||
}, | ||
"style": "line", | ||
"otherConfig": [ | ||
{ | ||
"type": "somevendor.someproduct.indicator", | ||
"name": "stddev", | ||
"parameters": { | ||
"period": 10, | ||
"matype": "exponential" | ||
} | ||
}, | ||
{ | ||
"type": "someothervendor.someotherproduct.formula", | ||
"formula": "standard-deviation", | ||
"fields": { | ||
"lookback": 10, | ||
"type": "ema" | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"required": ["instruments"] | ||
] | ||
} |
Oops, something went wrong.