---
title: AppBlockMissingSchema
description: >-
  Makes sure schema definition is present for app blocks in theme app
  extensions.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-missing-schema
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/app-block-missing-schema.md
---

# AppBlockMissingSchema

Makes sure schema definition is present for app blocks in theme app extensions.

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

```liquid
<footer className="footer">
{% for block in section.blocks %}
  {% case block.type %}
    {% when 'link' %}
      <div className="link" {{ block.shopify_attributes }}>
        {{ block.settings.linktext | link_to: block.settings.linkurl }}
      </div>
    {% when 'custom-text' %}
      <div className="text" {{ block.shopify_attributes }}>
        {{ block.settings.custom-text-field }}
      </div>
  {% endcase %}
{% endfor %}
</footer>
```

### ✓ Pass

```liquid
<footer className="footer">
{% for block in section.blocks %}
  {% case block.type %}
    {% when 'link' %}
      <div className="link" {{ block.shopify_attributes }}>
        {{ block.settings.linktext | link_to: block.settings.linkurl }}
      </div>
    {% when 'custom-text' %}
      <div className="text" {{ block.shopify_attributes }}>
        {{ block.settings.custom-text-field }}
      </div>
  {% endcase %}
{% endfor %}
</footer>


{% schema %}
{
"name": "Footer",
"max_blocks": 8,
"blocks": [
  {
    "type": "link",
    "name": "Link", 
    "settings": [
      {
        "id": "linkurl",
        "type": "url",
        "label": "URL link"
      },
      {
        "id": "linktext",
        "type": "text",
        "label": "Link text"
      }
    ]
  },
  {
    "type": "custom-text",
    "name": "Custom Text",
    "settings": [
      {
        "id": "custom-text-field",
        "type": "textarea",
        "label": "Text"
      }
    ]
  }
]
}
{% endschema %}
```

***

## Options

```yaml
AppBlockMissingSchema:
enabled: true
severity: error
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended.

***
