Skip to content

Commit

Permalink
add intent
Browse files Browse the repository at this point in the history
  • Loading branch information
Urkem committed Oct 9, 2023
1 parent f685d8e commit 01372e6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
17 changes: 17 additions & 0 deletions rasa/shared/core/flows/flows_yaml_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,23 @@
"type": "string"
}
}
},
{
"required": [
"intent"
],
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
},
"intent": {
"type": "string"
},
"next": {
"$ref": "#$defs/next"
}
}
}
]
}
Expand Down
14 changes: 12 additions & 2 deletions tests/shared/utils/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ def validate() -> None:
action: utter_payment_failed
- action: utter_failed_payment_handover
- action: utter_failed_handoff""",
"""
"""
flows:
foo_flow:
steps:
Expand All @@ -502,7 +502,17 @@ def validate() -> None:
- id: "2"
action: action_listen
next: "1"
"""
""",
"""
flows:
test_flow:
description: Test flow
steps:
- id: "1"
intent: transfer_money
next: "2"
- id: "2"
action: utter_ask_name""",
],
)
def test_flow_validation_pass(flow_yaml: str) -> None:
Expand Down

0 comments on commit 01372e6

Please sign in to comment.