This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
codecombat/server/articles/article_schema.coffee

15 lines
530 B
CoffeeScript
Raw Normal View History

c = require '../commons/schemas'
2014-01-03 10:32:13 -08:00
ArticleSchema = c.object()
c.extendNamedProperties ArticleSchema # name first
ArticleSchema.properties.body = { type: 'string', title: 'Content', format: 'markdown' }
2014-04-07 21:44:47 +04:00
ArticleSchema.properties.i18n = { type: 'object', title: 'i18n', format: 'i18n', props: ['name', 'body'] }
2014-01-03 10:32:13 -08:00
c.extendBasicProperties ArticleSchema, 'article'
c.extendSearchableProperties ArticleSchema
c.extendVersionedProperties ArticleSchema, 'article'
c.extendPatchableProperties ArticleSchema
2014-01-03 10:32:13 -08:00
module.exports = ArticleSchema