codecombat/server/schemas/article.coffee

12 lines
373 B
CoffeeScript
Raw Normal View History

2014-01-03 13:32:13 -05:00
c = require './common'
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