diff --git a/docs/catalyst/admin/types.md b/docs/catalyst/admin/types.md index 070e502..4e6e1fb 100644 --- a/docs/catalyst/admin/types.md +++ b/docs/catalyst/admin/types.md @@ -12,10 +12,48 @@ There are two default ticket types: `Alert` and `Incident`, but you can add more ## Fields -- **singular**: The singular name of the ticket type. -- **plural**: The plural name of the ticket type. -- **icon**: The icon of the ticket type. You can use [Lucide icons](https://lucide.dev/icons/), - but need to convert the icon name to camelCase, e.g. `flask-conical` becomes `FlaskConical` -- **schema**: The schema of the ticket type. The schema is used to generate the details form for the ticket type. - You need use the [JSON Schema](https://json-schema.org/) format to define the schema, - but currently only string properties are supported. \ No newline at end of file +### `singular` and `plural` Fields + +The `singular` and `plural` fields are used to define the name of the ticket type. + +### `icon` Field + +The `icon` field is used to define the icon of the ticket type. +You can use [Lucide icons](https://lucide.dev/icons/), +but need to convert the icon name to camelCase, e.g. `flask-conical` becomes `FlaskConical` + +### `schema` Field + +The `schema` field is used to define the custom fields for details of the ticket type. +It uses a subset of the [JSON Schema](https://json-schema.org/) format to define the schema, +currently enum, boolean, string, and integer properties are supported without any additional constraints. + +The following example shows a schema with the four different property types: + +```json +{ + "type": "object", + "properties": { + "severity": { + "type": "string", + "enum": [ + "Low", + "Medium", + "High" + ] + }, + "false_positive": { + "type": "boolean", + "title": "False Positive" + }, + "source": { + "type": "string", + "title": "Source" + }, + "affected_user_count": { + "type": "integer", + "title": "Affected User Count" + } + } +} +``` \ No newline at end of file