Skip to main content

Schema

The Schema component is a JSON schema definition for transition, flow, and master-data. Requests are validated on both the front-end and back-end, ensuring instance data consistency.

Schema source: vnext-schema/schema-definition.schema.json

Usage Types

TypeAttached AtPurpose
Master SchemaWorkflow root (attributes.schema)Main structure of instance data; consistency check on every change
Transition SchemaTransition definitionTransition request body validation
Flow SchemaWorkflow definitionWorkflow-level validation

Required Fields

FieldTypeDescription
keystringUnique schema identifier
versionstringSchema version (SemVer)
domainstringOwning domain
flowstringAssociated flow
flowVersionstringFlow version
tagsstring[]Tags
attributesobjectJSON Schema (Draft) definition

Validation

Schemas are validated with Ajv2019. The front-end can use annotations for form validation; the back-end validates transition/start requests automatically.

  • Frontend: form annotations, real-time validation
  • Backend: request body validation, instance data merge validation
  • CI/CD: the schema itself is centrally validated in the vnext-schema repo

Typical Use Cases

  • Master schema to keep instance data immutable and versionable
  • Transition schema for distinct request body validation per transition
  • Form schema for automatic form generation on the UI side