logo
Documentation
Schema
Type to start searching
    mgrsskls/miyagi
    mgrsskls/miyagi
    • Home
    • Installation
      • Default configuration
      • Available options
      • Via config file
      • Via CLI
      • Extending a template engine
      • Starting miyagi
      • Creating a component
      • Creating mock data
      • Linting mock data
      • Creating a build
      • Introduction
      • Assets
      • Documentation
      • Info
      • Mocks
      • Schema
      • Template
    • The UI
    • Supported template engines
    • JavaScript API
      • Adding JS files
      • Adding custom CSS and JS per component
      • Extending a template engine
      • Using dark and light mode
      • Theming the UI
      • Changing the text direction
      • Changing the HTML language attribute
      • Configuring the JSON Schema validator
      • Organizing components
      • Writing mock data
      • Linting mock data
      • Changing miyagi's port
      • Adding documentation
      • Creating a design token overview
      • Navigating through miyagi
    • VS Code extension

    Schema

    File: schema.json or schema.yaml

    You can use this file to define a JSON schema for your component.

    When creating a new component via miyagi new <component>, the schema file is created with this content:

    {
      "$schema": "http://json-schema.org/draft-07/schema",
      "required": [],
      "properties": {}
    }
    

    Your mock data will be validated against your schema. The result will be rendered on the component view and logged in the console (if the validation failed).

    Previous Mocks
    Next Template
    Made with Material for MkDocs