Skip to content

Commit

Permalink
review: make intent type free, rename intent+context to action
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick-Malins committed Aug 5, 2022
1 parent 56479cc commit 75141ff
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/context/schemas.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"Action": ["https://fdc3.finos.org/schemas/next/action.schema.json"],
"Context": ["https://fdc3.finos.org/schemas/next/context.schema.json"],
"Chart": ["https://fdc3.finos.org/schemas/next/chart.schema.json"],
"ChatInitSettings": ["https://fdc3.finos.org/schemas/next/chatInitSettings.schema.json"],
Expand All @@ -9,7 +10,6 @@
"Email": ["https://fdc3.finos.org/schemas/next/email.schema.json"],
"Instrument": ["https://fdc3.finos.org/schemas/next/instrument.schema.json"],
"InstrumentList": ["https://fdc3.finos.org/schemas/next/instrumentList.schema.json"],
"Intent": ["https://fdc3.finos.org/schemas/next/intent.schema.json"],
"Message": ["https://fdc3.finos.org/schemas/next/message.schema.json"],
"Nothing": ["https://fdc3.finos.org/schemas/next/nothing.schema.json"],
"Organization": ["https://fdc3.finos.org/schemas/next/organization.schema.json"],
Expand Down
25 changes: 25 additions & 0 deletions src/context/schemas/action.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/action.schema.json",
"type": "object",
"title": "Action",
"properties": {
"title": {
"type": "string"
},
"intent": {
"type": "string",
"$comment": "Should reference one of the intent types listed in 'standard intents'"
},
"context": {
"type": "object",
"$ref": "context.schema.json#"
},
"customConfig": {
"type": "object"
}
},
"required": [
"title", "context"
]
}
40 changes: 0 additions & 40 deletions src/context/schemas/intent.schema.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/context/schemas/message.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"type": "object",
"allOf": [
{
"$ref": "intent.schema.json#"
"$ref": "action.schema.json#"
}
],
"properties": {
"type": {
"const": "fdc3.entity.intent"
"const": "fdc3.entity.action"
}
},
"required": ["type"]
Expand Down

0 comments on commit 75141ff

Please sign in to comment.