From 7b64129cc1104808c54ffbb976fd16d71a1b57c4 Mon Sep 17 00:00:00 2001 From: Toastie Date: Fri, 27 Dec 2024 17:29:06 +1300 Subject: [PATCH] Updated descriptions in schema --- Interviews/interview_template.schema.json | 88 ++++++++++++++--------- 1 file changed, 55 insertions(+), 33 deletions(-) diff --git a/Interviews/interview_template.schema.json b/Interviews/interview_template.schema.json index fa81913..4789787 100644 --- a/Interviews/interview_template.schema.json +++ b/Interviews/interview_template.schema.json @@ -2,30 +2,37 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "id": "https://toastielab.dev/Emotions-stuff/SupportChild/raw/branch/main/Interviews/interview_template.schema.json", "title": "Interview Template", - "description": "An interview dialog tree template for SupportChild", - "definitions": { - "step": { + "description": "An interview dialog tree template for SupportBoi", + "definitions": + { + "step": + { "type": "object", "title": "Interview Step", "description": "Contains a question, error message or end of an interview.", - "properties": { - "heading": { + "properties": + { + "heading": + { "type": "string", "title": "Heading", "description": "The title of the message.", "minLength": 1 }, - "message": { + "message": + { "type": "string", "title": "Message", - "description": "The message text.", + "description": "The text in the embed message that will be sent to the user when they reach this step.", "minLength": 1 }, - "message-type": { + "message-type": + { "type": "string", "title": "Message Type", "description": "The type of message, decides what the bot will do when the user gets to this step.", - "enum": [ + "enum": + [ "ERROR", "END_WITH_SUMMARY", "END_WITHOUT_SUMMARY", @@ -38,11 +45,13 @@ "TEXT_INPUT" ] }, - "color": { + "color": + { "type": "string", "title": "Color", - "description": "Colour of the embed message.", - "examples": [ + "description": "Colour of the message embed. You can either enter a colour name or a hexadecimal RGB value.", + "examples": + [ "BLACK", "WHITE", "GRAY", @@ -88,55 +97,65 @@ ], "minLength": 1 }, - "steps": { + "steps": + { "type": "object", "title": "Steps", - "description": "The possible next steps, the name of the step is matched against the user input using regex, use \".*\" to match anything.", - "patternProperties": { - ".*": { + "description": "One or more interview steps. The name of the step is used as a regex match against the user's answer, except for selection boxes and buttons where each step becomes a button or selection option.", + "patternProperties": + { + ".*": + { "$ref": "#/definitions/step" } } }, - "summary-field": { + "summary-field": + { "type": "string", "title": "Summary Field", - "description": "If this interview ends with a summary this will be the name of the answer the user used in this field.", + "description": "When an interview ends all previous answers with this property will be put in a summary. If this property is not specified the answer will not be shown in the summary. The value of this property is the name which will be displayed next to the answer in the summary.", "minLength": 1 }, - "button-style": { + "button-style": + { "type": "string", "title": "Button Style", - "description": "The style of the button that leads to this step, the step before this one must be a button step for this to work.", - "enum": [ + "description": "The style of the button that leads to this step. Requires that the parent step is a 'BUTTONS' step.", + "enum": + [ "PRIMARY", "SECONDARY", "SUCCESS", "DANGER" ] }, - "selector-description": { + "selector-description": + { "type": "string", "title": "Selector Description", - "description": "The description of the selector.", + "description": "Description for this option in the parent step's selection box. Requires that the parent step is a 'TEXT_SELECTOR'.", "minLength": 1 }, - "selector-placeholder": { + "selector-placeholder": + { "type": "string", "title": "Selector Placeholder", - "description": "The placeholder shown before an option is selected.", + "description": "The placeholder text shown before a value is selected in the selection box. Requires that this step is a TEXT_SELECTOR.", "minLength": 1 }, - "max-length": { + "max-length": + { "type": "number", "title": "Max Length", - "description": "The maximum length of the text input.", + "description": "The maximum length of the user's response message. Requires that this step is a 'TEXT_INPUT'.", "maximum": 1024 }, - "min-length": { + "min-length": + { "type": "number", "title": "Min Length", - "description": "The minimum length of the text input.", + "description": "The minimum length of the user's response message. Requires that this step is a 'TEXT_INPUT'.", "minimum": 0 } }, @@ -145,13 +164,16 @@ } }, "type": "object", - "properties": { - "category-id": { + "properties": + { + "category-id": + { "type": "string", "title": "Category ID", - "description": "The category the template applies to. Change this to apply the template to a different category." + "description": "The id of the category this template applies to. You can change this and re-upload the template to apply it to a different category." }, - "interview": { + "interview": + { "$ref": "#/definitions/step" } },