For AI agents: the complete documentation index is available at /hclapi/llms.txt, the full documentation bundle is available at /hclapi/llms-full.txt, and this page is available as Markdown at /hclapi/docs/manifest/schema.md.

schema

The schema block defines reusable data models used for validating incoming request bodies and masking outbound responses.

schema "User" {
  description = "Application user profile"

  field "id" {
    type     = integer
    required = true
  }

  field "email" {
    type     = string
    format   = "email"
    required = true
  }

  field "tags" {
    type = list(string)
  }

  field "role" {
    type    = string
    default = "member"
    enum    = ["admin", "member", "viewer"]
  }

  field "age" {
    type = integer
    min  = 18
    max  = 120
  }
}

Field constraints

AttributeTypeApplicable typesDescription
typeidentifierallstring, integer, number, boolean, object, list(T)
formatstringstringBuilt-in semantic format constraint check
requiredboolallReturns HTTP 422 if missing or null
defaultanyallFallback value injected if key is absent
descriptionstringallField summary exported to OpenAPI documentation
minnumberinteger, numberMinimum numeric value, inclusive
maxnumberinteger, numberMaximum numeric value, inclusive
min_lengthintstring, arrayMinimum string character length or array item count
max_lengthintstring, arrayMaximum string character length or array item count
enumliststringWhitelist of permitted string values