diff --git a/src/docs/module.doc.yml b/src/docs/module.doc.yml index f61e645..419be68 100644 --- a/src/docs/module.doc.yml +++ b/src/docs/module.doc.yml @@ -241,10 +241,13 @@ paths: description: Metadata for the hivemind module on Notion. - type: object properties: - pageIds: + namespaces: type: array items: - type: string + type: number + default: [0] + activated: + type: boolean description: Metadata for the hivemind module on MediaWiki. - type: object description: Metadata for the hivemind module on website. diff --git a/src/docs/platform.doc.yml b/src/docs/platform.doc.yml index 456d0a1..249c4dc 100644 --- a/src/docs/platform.doc.yml +++ b/src/docs/platform.doc.yml @@ -165,16 +165,17 @@ paths: type: string description: Metadata for Notion. - type: object - required: [baseURL, path, namespaces] + required: [baseURL, path] properties: baseURL: type: string path: type: string namespaces: - type: array + type: array items: type: number + default: [0] description: Metadata for MediaWiki. - type: object required: [id, period, analyzerStartedAt, resources] diff --git a/src/validations/module.validation.ts b/src/validations/module.validation.ts index f5d4f3d..8fc3539 100644 --- a/src/validations/module.validation.ts +++ b/src/validations/module.validation.ts @@ -79,6 +79,7 @@ const hivemindNotionMetadata = () => { const hivemindMediaWikiMetadata = () => { return Joi.object().keys({ + namespaces: Joi.array().items(Joi.number()).default([0]), activated: Joi.boolean(), }); }; diff --git a/src/validations/platform.validation.ts b/src/validations/platform.validation.ts index cb171ce..d1402be 100644 --- a/src/validations/platform.validation.ts +++ b/src/validations/platform.validation.ts @@ -39,7 +39,7 @@ const mediaWikiUpdateMetadata = () => { return Joi.object().keys({ baseURL: Joi.string().required(), path: Joi.string().required(), - namespaces: Joi.array().items(Joi.number()).required(), + namespaces: Joi.array().items(Joi.number()).default([0]), }); }; @@ -94,7 +94,7 @@ const mediaWikiMetadata = () => { return Joi.object().keys({ baseURL: Joi.string().required(), path: Joi.string().required(), - namespaces: Joi.array().items(Joi.number()).required(), + namespaces: Joi.array().items(Joi.number()).default([0]), }); };