Editions Mappers Use Cases Documentation Community Download Get Started →
Format · Stable

YAML Format

Build-time YAML definition reader and runtime document binding via SnakeYAML.

The YAML format module reads TwinMapper-native YAML DSL definitions into the internal meta-model at build time. At runtime, it parses YAML documents into YamlNodeCursor for format-neutral binding. SnakeYAML is used with mandatory SafeConstructor for security.

Documentation → All Formats →
YAML
Capabilities

Production-ready by default

  • TwinMapper-native YAML DSL for type, field, constraint, mapping, and profile definitions
  • Build-time parsing into canonical DefinitionSet meta-model
  • Runtime YamlNodeCursor with alias-aware field reading
  • Mandatory SafeConstructor with LoaderOptions — default constructor prohibited
  • spring.config.import support for Spring Boot 2.4+ definition loading
Example

See it in action

# TwinMapper YAML Definition
definitionSet:
  name: order-model
  version: "1.0"
  basePackage: com.example.orders

types:
  - name: OrderRequest
    fields:
      - name: orderId
        type: string
        required: true
Related

Explore more