Skip to content

Commit 60fe878

Browse files
committed
fixed schemas for category to properly allow behavior categories and validate them
1 parent 590c059 commit 60fe878

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

build/schemas.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -228,18 +228,22 @@ const configSchema = Joi.object({
228228
hasDomside: Joi.boolean().required(),
229229
category: Joi.string()
230230
.required()
231-
.valid(
232-
"general",
233-
"3d",
234-
"data-and-storage",
235-
"form-controls",
236-
"input",
237-
"media",
238-
"monetisation",
239-
"platform-specific",
240-
"web",
241-
"other"
242-
),
231+
.when("addonType", {
232+
is: "behavior",
233+
then: Joi.string().valid("attributes", "general", "movements", "other"),
234+
otherwise: Joi.string().valid(
235+
"3d",
236+
"data-and-storage",
237+
"form-controls",
238+
"general",
239+
"input",
240+
"media",
241+
"monetisation",
242+
"platform-specific",
243+
"web",
244+
"other"
245+
),
246+
}),
243247
files: Joi.object({
244248
extensionScript: Joi.object({
245249
enabled: Joi.boolean().required(),

0 commit comments

Comments
 (0)