1
0
mirror of synced 2025-12-25 02:17:36 -05:00

add feature versions schema and tests

This commit is contained in:
Sarah Schneider
2021-06-17 14:41:31 -04:00
parent 139f9e0aac
commit 7f0737b162
2 changed files with 79 additions and 3 deletions

View File

@@ -0,0 +1,13 @@
const { schema } = require('../../../lib/frontmatter')
// Copy the properties from the frontmatter schema.
const featureVersions = Object.assign({}, schema.properties.versions)
// Remove the feature versions properties.
// We don't want to allow features within features! We just want pure versioning.
delete featureVersions.properties.feature
// Call it invalid if any properties other than version properties are found.
featureVersions.additionalProperties = false
module.exports = featureVersions