Skip to content
Snippets Groups Projects
Commit 0357a8f6 authored by Lars Trieloff's avatar Lars Trieloff
Browse files

#14 use better name for frontmatter

parent 41f2da0f
No related branches found
No related tags found
No related merge requests found
......@@ -6,30 +6,4 @@ foo: bar
---
---
---
template : reference
foo : bar
---
# Abstract
* **Type:** object
This is an abstract schema. It has `definitions`, but does not declare any properties
## first
### Properties
### foo
* **Type:** string
A unique identifier given to every addressable thing.
## second
### Properties
### bar
* **Type:** string
A unique identifier given to every addressable thing.
---
\ No newline at end of file
......@@ -6,26 +6,4 @@ foo: bar
---
---
---
template : reference
foo : bar
---
# Definitions
* **Type:** object
This is an example of using a `definitions` object within a schema.
It is imported using `allOf` and `$ref`.
## Properties
### id
* **Required**
* **Type:** string
* **Format:** uri
A unique identifier given to every addressable thing.
---
\ No newline at end of file
......@@ -6,36 +6,4 @@ foo: bar
---
---
---
template : reference
foo : bar
---
# Example
* **Type:** object
This is an example schema with examples. Too many examples? There can never be too many examples!
**Examples:**
```json
{
"foo": "bar",
"bar": "baz"
}
```
## Properties
### foo
* **Type:** string
A simple string.
### bar
* **Type:** string
A simple string.
---
\ No newline at end of file
......@@ -6,24 +6,4 @@ foo: bar
---
---
---
template : reference
foo : bar
---
# Simple
* **Type:** object
This is a *very* simple example of a JSON schema. There is only one property.
## Properties
### id
* **Type:** string
* **Format:** uri
A unique identifier given to every addressable thing.
---
\ No newline at end of file
......@@ -6,25 +6,4 @@ foo: bar
---
---
---
template : reference
foo : bar
---
# Subdir
* **Type:** object
A schema in a sub directory
## content
### Properties
### id
* **Type:** string
* **Format:** uri
A unique identifier given to every addressable thing.
---
\ No newline at end of file
......@@ -40,10 +40,13 @@ const generateMarkdown = function(filename, schema, schemaPath, outDir, dependen
console.log(schema.metaElements);
// this structure allows us to have separate templates for each element. Instead of having
// one huge template, each block can be built individually
const multi = [
[ 'header.ejs', { meta: schema.metaElements } ],
[ 'divider.ejs', null ],
[ 'topSchema.ejs', ctx ]
[ 'frontmatter.ejs', { meta: schema.metaElements } ],
//[ 'divider.ejs', null ],
//[ 'topSchema.ejs', ctx ],
[ 'divider.ejs', null ]
].map(([ template, context ]) => {
return [
path.join(__dirname, '../templates/md/' + template),
......
......@@ -4,4 +4,4 @@
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*/ %>
---
\ No newline at end of file
---
\ No newline at end of file
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment