Skip to content

Commit

Permalink
feat(theme): add csrf protection to the list of valid features
Browse files Browse the repository at this point in the history
  • Loading branch information
Juned Kazi committed Feb 25, 2019
1 parent cfcbb0c commit fe4b795
Showing 1 changed file with 221 additions and 150 deletions.
371 changes: 221 additions & 150 deletions lib/themeConfig.schema.json
Original file line number Diff line number Diff line change
@@ -1,152 +1,223 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://themes.bigcommerce.com/theme_packages/config",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"meta": {
"type": "object",
"properties": {
"price": {
"type": "integer"
},
"author_name": {
"type": "string"
},
"author_email": {
"type": "string"
},
"author_support_url": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"composed_image": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"type": "string",
"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"]
},
"uniqueItems": true,
"minItems": 1
}
},
"required": [
"price",
"documentation_url",
"author_name",
"author_email",
"author_support_url",
"composed_image",
"features"
]
},
"settings": {
"type": "object",
"properties": {
"_images": {
"type": "object",
"patternProperties": {
".+": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
}
}
}
}
}
},
"additionalProperties": true
},
"read_only_files": {
"type": "array"
},
"variations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
},
"meta": {
"type": "object",
"properties": {
"desktop_screenshot": {
"type": "string"
},
"mobile_screenshot": {
"type": "string"
},
"description": {
"type": "string"
},
"demo_url": {
"type": "string"
},
"optimized_for": {
"type": "array",
"items": {
"type": "string",
"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"]
},
"uniqueItems": true,
"minItems": 1
},
"industries": {
"type": "array",
"items": {
"type": "string",
"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"]
},
"uniqueItems": true,
"minItems": 0
}
},
"required": [
"desktop_screenshot",
"mobile_screenshot",
"description",
"demo_url",
"optimized_for"
]
}
},
"required": [
"name",
"id",
"meta"
]
},
"minItems": 1,
"maxItems": 4
}
},
"required": [
"name",
"version",
"meta",
"settings",
"variations"
],
"additionalProperties": true
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://themes.bigcommerce.com/theme_packages/config",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"meta": {
"type": "object",
"properties": {
"price": {
"type": "integer"
},
"author_name": {
"type": "string"
},
"author_email": {
"type": "string"
},
"author_support_url": {
"type": "string"
},
"documentation_url": {
"type": "string"
},
"composed_image": {
"type": "string"
},
"features": {
"type": "array",
"items": {
"type": "string",
"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",
"csrf_protection"
]
},
"uniqueItems": true,
"minItems": 1
}
},
"required": [
"price",
"documentation_url",
"author_name",
"author_email",
"author_support_url",
"composed_image",
"features"
]
},
"settings": {
"type": "object",
"properties": {
"_images": {
"type": "object",
"patternProperties": {
".+": {
"type": "object",
"properties": {
"width": {
"type": "integer",
"minimum": 0
},
"height": {
"type": "integer",
"minimum": 0
}
}
}
}
}
},
"additionalProperties": true
},
"read_only_files": {
"type": "array"
},
"variations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"id": {
"type": "string"
},
"meta": {
"type": "object",
"properties": {
"desktop_screenshot": {
"type": "string"
},
"mobile_screenshot": {
"type": "string"
},
"description": {
"type": "string"
},
"demo_url": {
"type": "string"
},
"optimized_for": {
"type": "array",
"items": {
"type": "string",
"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"
]
},
"uniqueItems": true,
"minItems": 1
},
"industries": {
"type": "array",
"items": {
"type": "string",
"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"
]
},
"uniqueItems": true,
"minItems": 0
}
},
"required": [
"desktop_screenshot",
"mobile_screenshot",
"description",
"demo_url",
"optimized_for"
]
}
},
"required": [
"name",
"id",
"meta"
]
},
"minItems": 1,
"maxItems": 4
}
},
"required": [
"name",
"version",
"meta",
"settings",
"variations"
],
"additionalProperties": true
}

0 comments on commit fe4b795

Please sign in to comment.