Skip to content

Commit b6424f8

Browse files
🤖 Sync Liquid Docs Schema (#926)
Co-authored-by: shopify-dev-bot[bot] <95105344+shopify-dev-bot[bot]@users.noreply.github.com>
1 parent 1964298 commit b6424f8

File tree

2 files changed

+79
-5
lines changed

2 files changed

+79
-5
lines changed

‎data/filters.json

+78-4
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,28 @@
22502250
"array_value": ""
22512251
}
22522252
],
2253-
"examples": [],
2253+
"examples": [
2254+
{
2255+
"name": "",
2256+
"description": "",
2257+
"syntax": "",
2258+
"path": "/collections/all",
2259+
"raw_liquid": "{% assign product = collection.products | find: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ product.title }}",
2260+
"parameter": false,
2261+
"display_type": "text",
2262+
"show_data_tab": true
2263+
},
2264+
{
2265+
"name": "Returns `nil` when no items match the specified property value.",
2266+
"description": "",
2267+
"syntax": "",
2268+
"path": "/collections/all",
2269+
"raw_liquid": "{% assign product = collection.products | find: 'vendor', \"Polina's Potions\" %}\n\n{{ product.title | default: \"No product found\" }}",
2270+
"parameter": false,
2271+
"display_type": "text",
2272+
"show_data_tab": true
2273+
}
2274+
],
22542275
"summary": "Returns the first item in an array with a specific property value.",
22552276
"syntax": "array | find: string, string",
22562277
"name": "find"
@@ -2269,7 +2290,28 @@
22692290
"array_value": ""
22702291
}
22712292
],
2272-
"examples": [],
2293+
"examples": [
2294+
{
2295+
"name": "",
2296+
"description": "",
2297+
"syntax": "",
2298+
"path": "/collections/all",
2299+
"raw_liquid": "{% assign index = collection.products | find_index: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ index }}",
2300+
"parameter": false,
2301+
"display_type": "text",
2302+
"show_data_tab": true
2303+
},
2304+
{
2305+
"name": "Returns `nil` when no items match the specified property value.",
2306+
"description": "",
2307+
"syntax": "",
2308+
"path": "/collections/all",
2309+
"raw_liquid": "{% assign index = collection.products | find_index: 'vendor', \"Polina's Potions\" %}\n\n{{ index | default: \"No index found\" }}",
2310+
"parameter": false,
2311+
"display_type": "text",
2312+
"show_data_tab": true
2313+
}
2314+
],
22732315
"summary": "Returns the index of the first item in an array with a specific property value.",
22742316
"syntax": "array | find_index: string, string",
22752317
"name": "find_index"
@@ -2358,7 +2400,28 @@
23582400
"array_value": ""
23592401
}
23602402
],
2361-
"examples": [],
2403+
"examples": [
2404+
{
2405+
"name": "",
2406+
"description": "",
2407+
"syntax": "",
2408+
"path": "/collections/all",
2409+
"raw_liquid": "{% assign has_potent_potions = collection.products | has: 'vendor', \"Polina's Potent Potions\" %}\n\n{{ has_potent_potions }}",
2410+
"parameter": false,
2411+
"display_type": "text",
2412+
"show_data_tab": true
2413+
},
2414+
{
2415+
"name": "Returns `false` when no items match the specified property value.",
2416+
"description": "",
2417+
"syntax": "",
2418+
"path": "/collections/all",
2419+
"raw_liquid": "{% assign has_potent_potions = collection.products | has: 'vendor', \"Polina's Potions\" %}\n\n{{ has_potent_potions }}",
2420+
"parameter": false,
2421+
"display_type": "text",
2422+
"show_data_tab": true
2423+
}
2424+
],
23622425
"summary": "Tests if any item in an array has a specific property value.",
23632426
"syntax": "array | has: string, string",
23642427
"name": "has"
@@ -2667,7 +2730,18 @@
26672730
"array_value": "untyped"
26682731
}
26692732
],
2670-
"examples": [],
2733+
"examples": [
2734+
{
2735+
"name": "",
2736+
"description": "",
2737+
"syntax": "",
2738+
"path": "/collections/all",
2739+
"raw_liquid": "{% assign polina_products = collection.products | reject: 'vendor', \"Polina's Potent Potions\" %}\n\nProducts from other vendors than Polina's Potent Potions:\n\n{% for product in polina_products -%}\n - {{ product.title }}\n{%- endfor %}",
2740+
"parameter": false,
2741+
"display_type": "text",
2742+
"show_data_tab": true
2743+
}
2744+
],
26712745
"summary": "Filters an array to exclude items with a specific property value.",
26722746
"syntax": "array | reject: string, string",
26732747
"name": "reject"

‎data/objects.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8989,7 +8989,7 @@
89898989
"examples": [
89908990
{
89918991
"name": "Access metafields",
8992-
"description": "The access path for metafields consists of two layers:\n\n- namespace - A grouping of metafields to prevent conflicts.\n- key - The metafield name.\n\nGiven this, you can access the metafield object with the following syntax:\n\n```liquid\n{{ resource.metafields.namespace.key }}\n```\n\n&gt; Note:\n&gt; The namespace and key values will always be `snake_case`, regardless of the casing used in the metafield definition.\n",
8992+
"description": "The access path for metafields consists of two layers:\n\n- namespace - A grouping of metafields to prevent conflicts.\n- key - The metafield name.\n\nGiven this, you can access the metafield object with the following syntax:\n\n```liquid\n{{ resource.metafields.namespace.key }}\n```\n",
89938993
"syntax": "",
89948994
"path": "/products/health-potion",
89958995
"raw_liquid": "Type: {{ product.metafields.information.directions.type }}\nValue: {{ product.metafields.information.directions.value }}",

0 commit comments

Comments
 (0)