codecombat/app/schemas/models/thang_component.coffee

22 lines
874 B
CoffeeScript
Raw Normal View History

c = require './../schemas'
2014-04-12 04:35:56 -04:00
module.exports = ThangComponentSchema = c.object {
2014-06-30 22:16:26 -04:00
title: 'Component'
description: 'Configuration for a Component that this Thang uses.'
format: 'component-reference'
2014-04-12 04:35:56 -04:00
required: ['original', 'majorVersion']
'default':
majorVersion: 0
config: {}
2014-06-30 22:16:26 -04:00
links: [{rel: 'db', href: '/db/level.component/{(original)}/version/{(majorVersion)}'}]
2014-04-12 04:35:56 -04:00
},
2014-06-30 22:16:26 -04:00
original: c.objectId(title: 'Original', description: 'A reference to the original Component being configured.', format: 'hidden')
config: c.object {title: 'Configuration', description: 'Component-specific configuration properties.', additionalProperties: true, format: 'thang-component-configuration'}
2014-04-12 04:35:56 -04:00
majorVersion:
2014-06-30 22:16:26 -04:00
title: 'Major Version'
description: 'Which major version of the Component is being used.'
2014-04-12 04:35:56 -04:00
type: 'integer'
minimum: 0
default: 0
2014-06-30 22:16:26 -04:00
format: 'hidden'