Skip to content

Commit fe4b795

Browse files
author
Juned Kazi
committed
feat(theme): add csrf protection to the list of valid features
1 parent cfcbb0c commit fe4b795

File tree

1 file changed

+221
-150
lines changed

1 file changed

+221
-150
lines changed

lib/themeConfig.schema.json

Lines changed: 221 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -1,152 +1,223 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"id": "http://themes.bigcommerce.com/theme_packages/config",
4-
"type": "object",
5-
"properties": {
6-
"name": {
7-
"type": "string"
8-
},
9-
"version": {
10-
"type": "string"
11-
},
12-
"meta": {
13-
"type": "object",
14-
"properties": {
15-
"price": {
16-
"type": "integer"
17-
},
18-
"author_name": {
19-
"type": "string"
20-
},
21-
"author_email": {
22-
"type": "string"
23-
},
24-
"author_support_url": {
25-
"type": "string"
26-
},
27-
"documentation_url": {
28-
"type": "string"
29-
},
30-
"composed_image": {
31-
"type": "string"
32-
},
33-
"features": {
34-
"type": "array",
35-
"items": {
36-
"type": "string",
37-
"enum": ["fully_responsive", "mega_navigation", "multi_tiered_sidebar_menu", "masonry_design", "frontpage_slideshow", "quick_add_to_cart", "switchable_product_view", "product_comparison_table", "complex_search_filtering", "customizable_product_selector", "cart_suggested_products", "free_customer_support", "free_theme_upgrades", "high_res_product_images", "product_filtering", "advanced_quick_view", "product_showcase", "persistent_cart", "one_page_check_out", "customized_checkout", "product_videos", "google_amp", "pixel_pop", "account_payment_methods", "enhanced_ecommerce"]
38-
},
39-
"uniqueItems": true,
40-
"minItems": 1
41-
}
42-
},
43-
"required": [
44-
"price",
45-
"documentation_url",
46-
"author_name",
47-
"author_email",
48-
"author_support_url",
49-
"composed_image",
50-
"features"
51-
]
52-
},
53-
"settings": {
54-
"type": "object",
55-
"properties": {
56-
"_images": {
57-
"type": "object",
58-
"patternProperties": {
59-
".+": {
60-
"type": "object",
61-
"properties": {
62-
"width": {
63-
"type": "integer",
64-
"minimum": 0
65-
},
66-
"height": {
67-
"type": "integer",
68-
"minimum": 0
69-
}
70-
}
71-
}
72-
}
73-
}
74-
},
75-
"additionalProperties": true
76-
},
77-
"read_only_files": {
78-
"type": "array"
79-
},
80-
"variations": {
81-
"type": "array",
82-
"items": {
83-
"type": "object",
84-
"properties": {
85-
"name": {
86-
"type": "string"
87-
},
88-
"id": {
89-
"type": "string"
90-
},
91-
"meta": {
92-
"type": "object",
93-
"properties": {
94-
"desktop_screenshot": {
95-
"type": "string"
96-
},
97-
"mobile_screenshot": {
98-
"type": "string"
99-
},
100-
"description": {
101-
"type": "string"
102-
},
103-
"demo_url": {
104-
"type": "string"
105-
},
106-
"optimized_for": {
107-
"type": "array",
108-
"items": {
109-
"type": "string",
110-
"enum": ["arts_crafts", "animals_pets", "automotive_industrial", "electronics_computers", "fashion_jewelry", "food_beverage", "gifts_specialty", "health_beauty", "home_garden", "books_entertainment", "sports_recreation", "toys_games", "multi_purpose", "chrome_firefox_safari_ie_10", "mobile_tablet_desktop", "sales_discounts", "wholesale", "single_product", "large_catalog", "mobile", "clothing", "cosmetics", "home_appliances", "home_furnishings", "movies", "music", "digital_downloads", "outdoor_sports", "hunting_fishing", "video_games"]
111-
},
112-
"uniqueItems": true,
113-
"minItems": 1
114-
},
115-
"industries": {
116-
"type": "array",
117-
"items": {
118-
"type": "string",
119-
"enum": ["arts_crafts", "animals_pets", "automotive_industrial", "electronics_computers", "fashion_jewelry", "food_beverage", "gifts_specialty", "health_beauty", "home_garden", "books_entertainment", "sports_recreation", "toys_games"]
120-
},
121-
"uniqueItems": true,
122-
"minItems": 0
123-
}
124-
},
125-
"required": [
126-
"desktop_screenshot",
127-
"mobile_screenshot",
128-
"description",
129-
"demo_url",
130-
"optimized_for"
131-
]
132-
}
133-
},
134-
"required": [
135-
"name",
136-
"id",
137-
"meta"
138-
]
139-
},
140-
"minItems": 1,
141-
"maxItems": 4
142-
}
143-
},
144-
"required": [
145-
"name",
146-
"version",
147-
"meta",
148-
"settings",
149-
"variations"
150-
],
151-
"additionalProperties": true
2+
"$schema": "http://json-schema.org/draft-04/schema#",
3+
"id": "http://themes.bigcommerce.com/theme_packages/config",
4+
"type": "object",
5+
"properties": {
6+
"name": {
7+
"type": "string"
8+
},
9+
"version": {
10+
"type": "string"
11+
},
12+
"meta": {
13+
"type": "object",
14+
"properties": {
15+
"price": {
16+
"type": "integer"
17+
},
18+
"author_name": {
19+
"type": "string"
20+
},
21+
"author_email": {
22+
"type": "string"
23+
},
24+
"author_support_url": {
25+
"type": "string"
26+
},
27+
"documentation_url": {
28+
"type": "string"
29+
},
30+
"composed_image": {
31+
"type": "string"
32+
},
33+
"features": {
34+
"type": "array",
35+
"items": {
36+
"type": "string",
37+
"enum": [
38+
"fully_responsive",
39+
"mega_navigation",
40+
"multi_tiered_sidebar_menu",
41+
"masonry_design",
42+
"frontpage_slideshow",
43+
"quick_add_to_cart",
44+
"switchable_product_view",
45+
"product_comparison_table",
46+
"complex_search_filtering",
47+
"customizable_product_selector",
48+
"cart_suggested_products",
49+
"free_customer_support",
50+
"free_theme_upgrades",
51+
"high_res_product_images",
52+
"product_filtering",
53+
"advanced_quick_view",
54+
"product_showcase",
55+
"persistent_cart",
56+
"one_page_check_out",
57+
"customized_checkout",
58+
"product_videos",
59+
"google_amp",
60+
"pixel_pop",
61+
"account_payment_methods",
62+
"enhanced_ecommerce",
63+
"csrf_protection"
64+
]
65+
},
66+
"uniqueItems": true,
67+
"minItems": 1
68+
}
69+
},
70+
"required": [
71+
"price",
72+
"documentation_url",
73+
"author_name",
74+
"author_email",
75+
"author_support_url",
76+
"composed_image",
77+
"features"
78+
]
79+
},
80+
"settings": {
81+
"type": "object",
82+
"properties": {
83+
"_images": {
84+
"type": "object",
85+
"patternProperties": {
86+
".+": {
87+
"type": "object",
88+
"properties": {
89+
"width": {
90+
"type": "integer",
91+
"minimum": 0
92+
},
93+
"height": {
94+
"type": "integer",
95+
"minimum": 0
96+
}
97+
}
98+
}
99+
}
100+
}
101+
},
102+
"additionalProperties": true
103+
},
104+
"read_only_files": {
105+
"type": "array"
106+
},
107+
"variations": {
108+
"type": "array",
109+
"items": {
110+
"type": "object",
111+
"properties": {
112+
"name": {
113+
"type": "string"
114+
},
115+
"id": {
116+
"type": "string"
117+
},
118+
"meta": {
119+
"type": "object",
120+
"properties": {
121+
"desktop_screenshot": {
122+
"type": "string"
123+
},
124+
"mobile_screenshot": {
125+
"type": "string"
126+
},
127+
"description": {
128+
"type": "string"
129+
},
130+
"demo_url": {
131+
"type": "string"
132+
},
133+
"optimized_for": {
134+
"type": "array",
135+
"items": {
136+
"type": "string",
137+
"enum": [
138+
"arts_crafts",
139+
"animals_pets",
140+
"automotive_industrial",
141+
"electronics_computers",
142+
"fashion_jewelry",
143+
"food_beverage",
144+
"gifts_specialty",
145+
"health_beauty",
146+
"home_garden",
147+
"books_entertainment",
148+
"sports_recreation",
149+
"toys_games",
150+
"multi_purpose",
151+
"chrome_firefox_safari_ie_10",
152+
"mobile_tablet_desktop",
153+
"sales_discounts",
154+
"wholesale",
155+
"single_product",
156+
"large_catalog",
157+
"mobile",
158+
"clothing",
159+
"cosmetics",
160+
"home_appliances",
161+
"home_furnishings",
162+
"movies",
163+
"music",
164+
"digital_downloads",
165+
"outdoor_sports",
166+
"hunting_fishing",
167+
"video_games"
168+
]
169+
},
170+
"uniqueItems": true,
171+
"minItems": 1
172+
},
173+
"industries": {
174+
"type": "array",
175+
"items": {
176+
"type": "string",
177+
"enum": [
178+
"arts_crafts",
179+
"animals_pets",
180+
"automotive_industrial",
181+
"electronics_computers",
182+
"fashion_jewelry",
183+
"food_beverage",
184+
"gifts_specialty",
185+
"health_beauty",
186+
"home_garden",
187+
"books_entertainment",
188+
"sports_recreation",
189+
"toys_games"
190+
]
191+
},
192+
"uniqueItems": true,
193+
"minItems": 0
194+
}
195+
},
196+
"required": [
197+
"desktop_screenshot",
198+
"mobile_screenshot",
199+
"description",
200+
"demo_url",
201+
"optimized_for"
202+
]
203+
}
204+
},
205+
"required": [
206+
"name",
207+
"id",
208+
"meta"
209+
]
210+
},
211+
"minItems": 1,
212+
"maxItems": 4
213+
}
214+
},
215+
"required": [
216+
"name",
217+
"version",
218+
"meta",
219+
"settings",
220+
"variations"
221+
],
222+
"additionalProperties": true
152223
}

0 commit comments

Comments
 (0)