Skip to content

Commit aea1670

Browse files
Merge pull request #478 from TogetherCrew/mediawiki-changes
Mediawiki changes
2 parents c2dd333 + 6bab3c3 commit aea1670

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/docs/module.doc.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,13 @@ paths:
241241
description: Metadata for the hivemind module on Notion.
242242
- type: object
243243
properties:
244-
pageIds:
244+
namespaces:
245245
type: array
246246
items:
247-
type: string
247+
type: number
248+
default: [0]
249+
activated:
250+
type: boolean
248251
description: Metadata for the hivemind module on MediaWiki.
249252
- type: object
250253
description: Metadata for the hivemind module on website.

src/docs/platform.doc.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,17 @@ paths:
165165
type: string
166166
description: Metadata for Notion.
167167
- type: object
168-
required: [baseURL, path, namespaces]
168+
required: [baseURL, path]
169169
properties:
170170
baseURL:
171171
type: string
172172
path:
173173
type: string
174174
namespaces:
175-
type: array
175+
type: array
176176
items:
177177
type: number
178+
default: [0]
178179
description: Metadata for MediaWiki.
179180
- type: object
180181
required: [id, period, analyzerStartedAt, resources]

src/validations/module.validation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const hivemindNotionMetadata = () => {
7979

8080
const hivemindMediaWikiMetadata = () => {
8181
return Joi.object().keys({
82+
namespaces: Joi.array().items(Joi.number()).default([0]),
8283
activated: Joi.boolean(),
8384
});
8485
};

src/validations/platform.validation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const mediaWikiUpdateMetadata = () => {
3939
return Joi.object().keys({
4040
baseURL: Joi.string().required(),
4141
path: Joi.string().required(),
42-
namespaces: Joi.array().items(Joi.number()).required(),
42+
namespaces: Joi.array().items(Joi.number()).default([0]),
4343
});
4444
};
4545

@@ -94,7 +94,7 @@ const mediaWikiMetadata = () => {
9494
return Joi.object().keys({
9595
baseURL: Joi.string().required(),
9696
path: Joi.string().required(),
97-
namespaces: Joi.array().items(Joi.number()).required(),
97+
namespaces: Joi.array().items(Joi.number()).default([0]),
9898
});
9999
};
100100

0 commit comments

Comments
 (0)