codecombat/server/articles/article_schema.coffee

13 lines
482 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' }
2014-03-07 20:05:35 -05:00
ArticleSchema.properties.i18n = { type: 'object', title: 'i18n', format: 'i18n', props: ['body'] }
2014-01-03 13:32:13 -05:00
c.extendBasicProperties(ArticleSchema, 'article')
c.extendSearchableProperties(ArticleSchema)
c.extendVersionedProperties(ArticleSchema, 'article')
module.exports = ArticleSchema