codecombat/server/articles/article_schema.coffee

12 lines
383 B
CoffeeScript
Raw Normal View History

c = require '../commons/schemas'
2014-01-03 13:32:13 -05:00
ArticleSchema = c.object()
c.extendNamedProperties ArticleSchema # name first
ArticleSchema.properties.body = { type: 'string', title: 'Content', format: 'markdown' }
c.extendBasicProperties(ArticleSchema, 'article')
c.extendSearchableProperties(ArticleSchema)
c.extendVersionedProperties(ArticleSchema, 'article')
module.exports = ArticleSchema