YAML Schema Reference

    JSON schema validation for StructKit YAML configurations with IDE support.

    Schema Location

    https://raw.githubusercontent.com/httpdss/structkit/main/struct-schema.json

    IDE Configuration

    VS Code

    Install the YAML extension and add to .vscode/settings.json:

    .vscode/settings.jsonjson
    {
      "yaml.schemas": {
        "https://raw.githubusercontent.com/httpdss/structkit/main/struct-schema.json": ".structkit.yaml"
      }
    }

    JetBrains IDEs

    Go to Settings → Languages & Frameworks → Schemas and DTDs → JSON Schema Mappings, add the schema URL and set the file pattern to *.structkit.yaml.

    Schema Structure

    The schema validates these top-level properties:

    files

    files:
      - filename.txt:
          content: "File contents"
          permissions: "0644"
          skip: false
          skip_if_exists: false
          file: "https://example.com/template.txt"

    folders

    folders:
      - path/to/folder:
          struct: "structure-name"
          with:
            variable: "value"

    variables

    variables:
      - variable_name:
          description: "Variable description"
          type: "string"
          default: "default_value"

    pre_hooks / post_hooks

    pre_hooks:
      - "echo 'Starting generation...'"
    
    post_hooks:
      - "npm install"
      - "git init"

    Validation

    Terminalbash
    structkit validate my-config.yaml

    Common Validation Errors

    # ❌ Wrong - files should be array of objects
    files:
      README.md: "content"
    
    # ✅ Correct
    files:
      - README.md:
          content: "content"

    IDE Benefits

    • Real-time validation — errors highlighted as you type
    • Autocompletion — suggested properties and values
    • Documentation — hover tooltips with property descriptions
    • Structure guidance — valid structure names and paths