MCPcopy Create free account
hub / github.com/codecombat/codecombat / versionedProps

Function versionedProps

app/schemas/schemas.js:119–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117// VERSIONED
118
119const versionedProps = linkFragment => ({
120 version: {
121 default: { minor: 0, major: 0, isLatestMajor: true, isLatestMinor: true },
122 format: 'version',
123 title: 'Version',
124 type: 'object',
125 readOnly: true,
126 additionalProperties: false,
127 properties: {
128 major: { type: 'number', minimum: 0 },
129 minor: { type: 'number', minimum: 0 },
130 isLatestMajor: { type: 'boolean' },
131 isLatestMinor: { type: 'boolean' },
132 },
133 },
134
135 // TODO: figure out useful 'rel' values here
136 original: me.objectId({ links: [{ rel: 'extra', href: `/db/${linkFragment}/{($)}` }], format: 'hidden' }),
137
138 parent: me.objectId({ links: [{ rel: 'extra', href: `/db/${linkFragment}/{($)}` }], format: 'hidden' }),
139 creator: me.objectId({ links: [{ rel: 'extra', href: '/db/user/{($)}' }], format: 'hidden' }),
140 created: me.date({ title: 'Created', readOnly: true }),
141 commitMessage: { type: 'string', maxLength: 500, title: 'Commit Message', readOnly: true },
142})
143
144me.extendVersionedProperties = function (schema, linkFragment) {
145 if (schema.properties == null) { schema.properties = {} }

Callers 1

schemas.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected