Skip to content
Snippets Groups Projects
Commit c97e8393 authored by Andy Steed's avatar Andy Steed
Browse files

Add support for meta:status property + add to table of properties in output md

parent 8da259d3
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
"title": "Abstract",
"description": "This is an abstract schema. It has `definitions`, but does not declare any properties",
"type": "object",
"meta:status": "stabilizing",
"definitions": {
"first": {
"type": "object",
......
......@@ -45,6 +45,7 @@ function schemaProps(schema, schemaPath, filename) {
// if there are definitions, but no properties
abstract: (schema.definitions !== undefined && _.keys(schema.properties).length === 0) ? 'Cannot be instantiated' : 'Can be instantiated',
extensible: (schema.definitions !== undefined || schema['meta:extensible'] === true) ? 'Yes' : 'No',
status: schema['meta:status'] !== undefined ? (schema['meta:status'].charAt(0).toUpperCase() + schema['meta:status'].slice(1)) : 'Experimental',
custom: custom(schema) ? 'Allowed' : 'Forbidden',
original: filename.substr(schemaPath.length).substr(1),
};
......
......@@ -16,9 +16,9 @@
| Abstract | Extensible | Custom Properties | Additional Properties | Defined In |
|----------|------------|-------------------|-----------------------|------------|
| <%=props.abstract %> | <%=props.extensible %> | <%=props.custom %> | <%= schema.additionalProperties===false ? "Forbidden" : "Permitted" %> | [<%=props.original %>](<%=props.original %>) |
| Abstract | Extensible | Status | Custom Properties | Additional Properties | Defined In |
|----------|------------|--------|-------------------|-----------------------|------------|
| <%=props.abstract %> | <%=props.extensible %> | <%=props.status %> | <%=props.custom %> | <%= schema.additionalProperties===false ? "Forbidden" : "Permitted" %> | [<%=props.original %>](<%=props.original %>) |
<% if (dependencies.length > 0) { %>
## Schema Hierarchy
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment