2014-04-12 13:51:02 -04:00
|
|
|
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.'
|
2014-08-07 21:49:39 -04:00
|
|
|
format: 'component-reference'
|
2014-04-12 04:35:56 -04:00
|
|
|
required: ['original', 'majorVersion']
|
2014-08-23 19:06:41 -04:00
|
|
|
default:
|
2014-04-12 04:35:56 -04:00
|
|
|
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
|
2014-06-30 22:16:26 -04:00
|
|
|
format: 'hidden'
|