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

#14 include description

parent f3933e84
No related branches found
No related tags found
No related merge requests found
...@@ -5,4 +5,8 @@ foo: bar ...@@ -5,4 +5,8 @@ foo: bar
--- ---
# Abstract # Abstract
```
https://example.com/schemas/abstract
```
This is an abstract schema. It has `definitions`, but does not declare any properties
--- ---
\ No newline at end of file
...@@ -5,4 +5,9 @@ foo: bar ...@@ -5,4 +5,9 @@ foo: bar
--- ---
# Definitions # Definitions
```
https://example.com/schemas/definitions
```
This is an example of using a `definitions` object within a schema.
It is imported using `allOf` and `$ref`.
--- ---
\ No newline at end of file
...@@ -5,4 +5,8 @@ foo: bar ...@@ -5,4 +5,8 @@ foo: bar
--- ---
# Example # Example
```
https://example.com/schemas/example
```
This is an example schema with examples. Too many examples? There can never be too many examples!
--- ---
\ No newline at end of file
...@@ -5,4 +5,8 @@ foo: bar ...@@ -5,4 +5,8 @@ foo: bar
--- ---
# Simple # Simple
```
https://example.com/schemas/simple
```
This is a *very* simple example of a JSON schema. There is only one property.
--- ---
\ No newline at end of file
...@@ -5,4 +5,8 @@ foo: bar ...@@ -5,4 +5,8 @@ foo: bar
--- ---
# Subdir # Subdir
```
https://example.com/schemas/subdir/subdir
```
A schema in a sub directory
--- ---
\ No newline at end of file
...@@ -44,7 +44,7 @@ const generateMarkdown = function(filename, schema, schemaPath, outDir, dependen ...@@ -44,7 +44,7 @@ const generateMarkdown = function(filename, schema, schemaPath, outDir, dependen
// one huge template, each block can be built individually // one huge template, each block can be built individually
const multi = [ const multi = [
[ 'frontmatter.ejs', { meta: schema.metaElements } ], [ 'frontmatter.ejs', { meta: schema.metaElements } ],
[ 'header.ejs', { title: schema.title } ], [ 'header.ejs', { schema: schema } ],
//[ 'divider.ejs', null ], //[ 'divider.ejs', null ],
//[ 'topSchema.ejs', ctx ], //[ 'topSchema.ejs', ctx ],
[ 'divider.ejs', null ] [ 'divider.ejs', null ]
......
...@@ -4,4 +4,9 @@ ...@@ -4,4 +4,9 @@
* you may not use this file except in compliance with the License. You may obtain a copy * 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 * of the License at http://www.apache.org/licenses/LICENSE-2.0
*/ %> */ %>
# <%=title %> # <%=schema.title %>
\ No newline at end of file ```
<%= schema.$id %>
```
<%= schema.description %>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment