codecombat/app/schemas/article_schema.coffee

15 lines
521 B
CoffeeScript
Raw Normal View History

2014-04-12 04:35:56 -04:00
c = require './schemas'
ArticleSchema = c.object()
c.extendNamedProperties ArticleSchema # name first
ArticleSchema.properties.body = { type: 'string', title: 'Content', format: 'markdown' }
ArticleSchema.properties.i18n = { type: 'object', title: 'i18n', format: 'i18n', props: ['name', 'body'] }
c.extendBasicProperties ArticleSchema, 'article'
c.extendSearchableProperties ArticleSchema
c.extendVersionedProperties ArticleSchema, 'article'
c.extendPatchableProperties ArticleSchema
2014-04-12 04:35:56 -04:00
module.exports = ArticleSchema