Skip to content

Commit

Permalink
feat(markdown): show id and status in header
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Dec 4, 2019
1 parent 08e1923 commit b6fcf53
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/formatInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,21 @@ function formatInfo({ extension }) {
}
}

function iscustom(schema) {
return [...(schema.allOf || [])]
.filter(e => typeof e === 'object')
.filter(e => typeof e.$ref === 'string')
.filter(({ $ref }) => $ref === 'https://ns.adobe.com/xdm/common/extensible.schema.json#/definitions/@context')
.length > 0;
}

function formatmeta(schema) {
return {
abstract: isabstract(schema.schema),
extensible: isextensible(schema.schema),
status: schema.schema['meta:status'] || undefined,
identifiable: isidentifiable(schema.schema),
custom: undefined,
custom: iscustom(schema.schema),
additional: undefined,
definedin: undefined
};
Expand Down

0 comments on commit b6fcf53

Please sign in to comment.