Skip to content

okf/extension-key

warningOKF specification

Under OKF 0.3, frontmatter keys OKF doesn’t define start with x-, such as x-owner (OKF §4.1).

OKF lets a bundle add any frontmatter keys it likes (§4.1), and consumers keep the ones they don’t know. OKF 0.3 also promises never to define a key that starts with x-, so a key named that way, such as x-owner, can’t collide with one a later OKF version defines and gives another meaning, as superseded_by was added in 0.3. The spec also suggests a producer’s name after the x- (x-<producer>-<name>), which keeps apart the keys of tools that write to the same files. This rule doesn’t ask for one: a bundle’s own fields belong to its knowledge, not to a tool, and a company’s name in every key would have to change with a rebrand or a merger. A type’s own fields, in its schema, are extension keys too. Under OKF 0.2, which didn’t ask, nothing is reported.

This file breaks the rule:

churn.md
---
type: Metric
title: Monthly churn
description: The share of customers who cancel in a month.
owner: /people/roles/cfo
---
Churn is the customers who cancel in a month, divided by the customers at its start.

okforest validate reports:

churn.md
5:1 warning `owner` isn't a key OKF defines: start your own keys with `x-`, such as `x-owner`, so a later OKF version can't give `owner` another meaning. okf/extension-key

Fixed:

churn.md
---
type: Metric
title: Monthly churn
description: The share of customers who cancel in a month.
x-owner: /people/roles/cfo
---
Churn is the customers who cancel in a month, divided by the customers at its start.