Run the example service
Example, not a course exerciseThe example schema
- category: billing, bug or question
- urgency: a whole number from 1 to 5
- summary: text, not empty
- business rule: urgency 5 only for bugs
Attempt 1Passed all three checks
Reply
{"category":"billing","urgency":2,"summary":"Refund for a double charge"}
Accepted after 1 attempt
The rule: the whole reply must parse as one JSON object. If it does, the schema check lists all the wrong fields, and only a reply that passes the schema meets the business rule. A reply that passes all three is accepted. Any other reply goes back with its error list until the allowed attempts are used up, and then the request is escalated.
Accepted after 1 attempt. Passed all three checks.
