Skip to content

Add JSON and YAML syntax overview to /specification/syntax/ page #145

@david-waltermire

Description

@david-waltermire

Summary

The syntax overview page at /specification/syntax/ currently only shows the Metaschema module syntax in XML format. Since Metaschema modules can also be written in JSON and YAML formats, this page should be updated to show all three formats using the tabs shortcode.

Current State

  • The page shows an interactive XML syntax tree with hyperlinks to specification sections
  • Uses custom CSS (element-map.css) for indentation styling
  • Text was recently updated to clarify: "The following is an approximate outline of the Metaschema module syntax in XML. YAML and JSON are also supported, but not illustrated here."

Proposed Changes

  1. Add JSON and YAML syntax overviews using the {{< tabs JSON YAML XML >}} shortcode pattern
  2. Create equivalent visual structures for JSON and YAML with:
    • Appropriate syntax highlighting
    • Cross-links to specification sections (same as XML version)
    • Proper indentation to show nesting
  3. May require new/updated CSS classes for JSON/YAML property highlighting

Reference

  • Metaschema JSON schema: metaschema-java/metaschema-cli/target/generated-resources/metaschema/schema/json/metaschema-model_schema.json
  • Current page: website/content/specification/syntax/_index.md
  • CSS file: website/static/css/element-map.css

Related

This follows the pattern established in other specification pages where examples are shown in JSON, YAML, and XML formats (e.g., constraints.md, metapath.md).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions