AppBlockMissingSchema
Makes sure schema definition is present for app blocks in theme app extensions.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
<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>
Anchor to ✓ Pass✓ Pass
<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 %}
Anchor to OptionsOptions
AppBlockMissingSchema
enabledtrue
severity error
Parameter | Description |
---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?