opentide

Metaschema keywords

OpenTide extends JSON Schema generation with `tide.*` keywords in its metaschema. At generation time the implementation walks the metaschema depth-first and resolves each keyword into standard JSON Schema constructs; the `tide.*` keywords are then stripped from the emitted client-facing schemas.

Requirements

  • Implementations MUST resolve all tide.* keywords before emitting JSON Schema artifacts.
  • Vocabulary keywords MUST resolve against canonical vocabularies/ data.
  • Configuration keywords MUST resolve against merged TOML configuration at generation time.
  • Emitted JSON Schema MUST NOT contain unresolved tide.* keys.
  • Object schemas MUST pin metadata.schema as a const for IDE router discrimination.

Definition

tide.meta.*

KeywordValueEffect
tide.meta.definitiontrue or model nameInline a definition model schema (e.g. metadata, references)
tide.meta.deprecationstring messageMark field deprecated in generated schema title/description

tide.vocab.*

KeywordValueEffect
tide.vocabstring, bool, or listResolve vocabulary contract(s) to enum + markdownEnumDescriptions
tide.vocab.scopedbooleanEnable stage-scoped vocabulary filtering
tide.vocab.stagesstring | listFilter vocabulary entries to matching stages
tide.vocab.hints.no-wrapbooleanDisable enum value wrapping in descriptions

tide.vocab resolution

tide.vocab valueBehavior
"severity" (legacy unversioned)Implementations SHOULD warn; resolve via schema pin for the field path
"severity::1.0"Explicit vocabulary contract pin
trueInfer field name from property path → lookup schema pin
["att&ck::1.0", "custom"]Union of contracts (existing list semantics + versions)

When tide.vocab is true, the leaf field name is used as the vocabulary field identifier for pin lookup.

Schema pin resolution

Each object schema revision (metadata.schema, e.g. threat::1.0) maintains a vocabulary pin table in schemas/pins/{threat,objective,rule}.toml. Keys are dot-paths to vocab-constrained fields; values are versioned contract identifiers (field::M.m).

During JSON Schema generation and validation for schema S:

  1. If tide.vocab is an explicit field::M.m string (or list of such), use it directly.
  2. If tide.vocab is a bare field name or true, look up the pin for path P under section [S] in the family pin file.
  3. Resolve the contract via per-key lifecycle rules in vocabularies/format.md (cumulative minor filter + removed).

Implementations MUST NOT resolve pins against the latest unversioned vocabulary when a schema revision is known. If a pinned contract is unavailable, generation and strict validation MUST fail with an explicit error.

tide.config.*

KeywordValueEffect
tide.config.visibility.logsourcestruthyInject logsources enum from visibility config
tide.config.visibility.detectorstruthyInject detectors enum from visibility config
tide.config.parameter-liststring pathFetch enum values from configuration parameter list
tide.config.systems::enabledtruthyInject enabled platform identifiers
tide.config.system.tenantsplatform idInject tenant list for a platform
tide.config.statusestruthyInject deployment status names and descriptions

tide.template.*

KeywordValueEffect
tide.template.force-requiredlist[string]Fields always required in YAML templates
tide.template.hidebooleanOmit field from generated template
tide.template.spacerbooleanAdd blank line before field in template
tide.template.multilinebooleanUse multiline YAML style
tide.template.requiredbooleanOverride required state in template
tide.template.no-spacebooleanCompact spacing in template
tide.template.config.defaultconfig pathDefault value from merged configuration
tide.template.config.default.enabledbooleanGate default value injection
tide.template.config.requiredconfig pathConditionally require field from config

tide.mdr.parameter

KeywordValueEffect
tide.mdr.parameterstringMaps schema field to platform deployment parameter name (Splunk, etc.)

tide.placeholders

KeywordValueEffect
tide.placeholdersmap[string, string]Template placeholder substitutions (e.g. SCHEMA_VERSION)

tide.object.*

KeywordValueEffect
tide.object.parentUUIDParent object reference for indexing

recomposition

KeywordValueEffect
recompositionidentifierExpand platform rule block from registered platform schema

Resolution order

  1. tide.meta.definition — expand nested models first
  2. recomposition — platform-specific property injection
  3. tide.config.* — configuration-driven enums
  4. tide.vocab — vocabulary enums
  5. Recurse into nested objects
  6. Strip remaining tide.* keys for output schema

Relationships

Defaults & overrides

Configuration keywords reflect merged TOML at opentide generate schemas time. Client overrides affect generated enums. See configuration.md.

Examples

Rule metaschema binds detection_model to objective vocabulary:

"detection_model": {"tide.vocab": "objective"}

Threat schema threat::1.0 pins threat.killchain to killchain::1.0 via schemas/pins/threat.toml. A later threat::2.1 revision may pin killchain::1.1 while other pins remain at ::1.0.

History

VersionDateNotes
1.12026-06-26Versioned tide.vocab and schema pin resolution (RFC 0003)
1.02026-06-25Initial spec from opentide generation/schema_pipeline.py and pydantic_metaschema.py

On this page