Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions gh-pages/_includes/examples-table.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
| HTML documentation | JSON Schema |
| ----------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [Index of documents](/json-schema-static-docs/examples/examples-index.html) | n/a |
| [Person](/json-schema-static-docs/examples/person.html) | [person.yml](/json-schema-static-docs/yml/person.yml) |
| [Name](/json-schema-static-docs/examples/name.html) | [name.yml](/json-schema-static-docs/yml/name.yml) |
| [Enum Value Documentation](/json-schema-static-docs/examples/enums.html) | [enums.yml](/json-schema-static-docs/yml/enums.yml) |
| [One-of](/json-schema-static-docs/examples/oneof.html) | [oneof.yml](/json-schema-static-docs/yml/oneof.yml) |
| [Draft 2019-09 - Array](/json-schema-static-docs/examples/draft-2019-09/array.html) | [draft-2019-09/array.yml](/json-schema-static-docs/yml/draft-2019-09/array.yml) |
| [Draft 07 - User](/json-schema-static-docs/examples/draft-07/user.html) | [draft-07/user.yml](/json-schema-static-docs/yml/draft-07/user.yml) |
| [Draft 06 - Animal](/json-schema-static-docs/examples/draft-06/animal.html) | [draft-06/animal.yml](/json-schema-static-docs/yml/draft-06/animal.yml) |
| HTML documentation | JSON Schema |
| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [Index of documents](/json-schema-static-docs/examples/examples-index.html) | n/a |
| [Person](/json-schema-static-docs/examples/person.html) | [person.yml](/json-schema-static-docs/yml/person.yml) |
| [Name](/json-schema-static-docs/examples/name.html) | [name.yml](/json-schema-static-docs/yml/name.yml) |
| [Enum Value Documentation](/json-schema-static-docs/examples/enums.html) | [enums.yml](/json-schema-static-docs/yml/enums.yml) |
| [One-of](/json-schema-static-docs/examples/oneof.html) | [oneof.yml](/json-schema-static-docs/yml/oneof.yml) |
| [Draft 2019-09 - Array](/json-schema-static-docs/examples/draft-2019-09/array.html) | [draft-2019-09/array.yml](/json-schema-static-docs/yml/draft-2019-09/array.yml) |
| [Draft 2019-09 - Deprecated](/json-schema-static-docs/examples/draft-2019-09/deprecated.html) | [draft-2019-09/deprecated.yml](/json-schema-static-docs/yml/draft-2019-09/deprecated.yml) |
| [Draft 07 - User](/json-schema-static-docs/examples/draft-07/user.html) | [draft-07/user.yml](/json-schema-static-docs/yml/draft-07/user.yml) |
| [Draft 06 - Animal](/json-schema-static-docs/examples/draft-06/animal.html) | [draft-06/animal.yml](/json-schema-static-docs/yml/draft-06/animal.yml) |
8 changes: 8 additions & 0 deletions gh-pages/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,11 @@ h1 {
clear: both;
margin-top: 50px !important;
}


div.jssd-deprecated {
background: #d94c4c;
color: white;
width: 100%;
padding: 10px;
}
2 changes: 2 additions & 0 deletions gh-pages/examples/draft-06/animal.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Draft 06 - User Example
description: A schema demonstrating some draft 06 features

---


# Draft 06 - User Example

<p>A schema demonstrating some draft 06 features</p>
Expand Down
2 changes: 2 additions & 0 deletions gh-pages/examples/draft-07/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Draft 07 - User Example
description: A schema demonstrating some draft 07 features

---


# Draft 07 - User Example

<p>A schema demonstrating some draft 07 features</p>
Expand Down
2 changes: 2 additions & 0 deletions gh-pages/examples/draft-2019-09/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Draft 2019-09 - Array Example
description: A schema describing fruits and vegetables

---


# Draft 2019-09 - Array Example

<p>A schema describing fruits and vegetables</p>
Expand Down
132 changes: 132 additions & 0 deletions gh-pages/examples/draft-2019-09/deprecated.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
---
title: Draft 2019-09 - Deprecated Example
description: A schema demonstrating use of deprecated

---
<div class="jssd-deprecated">⚠️ This schema has been marked as deprecated.</div>

# Draft 2019-09 - Deprecated Example

<p>A schema demonstrating use of deprecated</p>

<table>
<tbody>
<tr><th>$id</th><td>https://example.com/deprecated.schema.json</td></tr>
<tr><th>$schema</th><td>https://json-schema.org/draft/2019-09/schema</td></tr>
</tbody>
</table>

## Properties

<table><thead><tr><th colspan="2">Name</th><th>Type</th></tr></thead><tbody><tr><td colspan="2"><a href="#firstname">firstName</a></td><td>String</td></tr><tr><td colspan="2"><a href="#lastname">lastName</a></td><td>String</td></tr></tbody></table>


## Example
```
{
"firstName": "Neil",
"lastName": "Williams"
}
```

<hr />



## firstName


<table>
<tbody>
<tr>
<th>Title</th>
<td colspan="2">First Name</td>
</tr>
<tr>
<th>Description</th>
<td colspan="2">A persons first name</td>
</tr>
<tr><th>Type</th><td colspan="2">String</td></tr>
<tr>
<th>Required</th>
<td colspan="2">No</td>
</tr>

</tbody>
</table>






## lastName


<table>
<tbody>
<tr>
<th>Deprecated</th>
<td colspan="2">true</td>
</tr>
<tr>
<th>Title</th>
<td colspan="2">Last Name</td>
</tr>
<tr>
<th>Description</th>
<td colspan="2">A persons last name</td>
</tr>
<tr><th>Type</th><td colspan="2">String</td></tr>
<tr>
<th>Required</th>
<td colspan="2">No</td>
</tr>

</tbody>
</table>










<hr />

## Schema
```
{
"$id": "https://example.com/deprecated.schema.json",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "Draft 2019-09 - Deprecated Example",
"description": "A schema demonstrating use of deprecated",
"examples": [
{
"firstName": "Neil",
"lastName": "Williams"
}
],
"deprecated": true,
"type": "object",
"properties": {
"firstName": {
"deprecated": false,
"type": "string",
"title": "First Name",
"description": "A persons first name"
},
"lastName": {
"deprecated": true,
"type": "string",
"title": "Last Name",
"description": "A persons last name"
}
}
}
```


2 changes: 2 additions & 0 deletions gh-pages/examples/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Enum Documentation
description: JSON schema example demonstrating documentation of enum values using the custom meta:enum keyword. This must be enabled using the enableMetaEnum config option.

---


# Enum Documentation

<p>JSON schema example demonstrating documentation of enum values using the custom meta:enum keyword. This must be enabled using the enableMetaEnum config option.</p>
Expand Down
1 change: 1 addition & 0 deletions gh-pages/examples/examples-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@

## Draft-2019-09
- [draft-2019-09/array](draft-2019-09/array.md)
- [draft-2019-09/deprecated](draft-2019-09/deprecated.md)
2 changes: 2 additions & 0 deletions gh-pages/examples/name.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Name
description: JSON schema example for a name entity

---


# Name

<p>JSON schema example for a name entity</p>
Expand Down
2 changes: 2 additions & 0 deletions gh-pages/examples/oneof.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: One-of
description: Example schema to demonstrate the use of the oneOf keyword

---


# One-of

<p>Example schema to demonstrate the use of the oneOf keyword</p>
Expand Down
2 changes: 2 additions & 0 deletions gh-pages/examples/person.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Person
description: JSON schema example for a person entity

---


# Person

<p>JSON schema example for a person entity</p>
Expand Down
20 changes: 20 additions & 0 deletions gh-pages/yml/draft-2019-09/deprecated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"$id": https://example.com/deprecated.schema.json
"$schema": https://json-schema.org/draft/2019-09/schema
title: Draft 2019-09 - Deprecated Example
description: A schema demonstrating use of deprecated
examples:
- firstName: Neil
lastName: Williams
deprecated: true
type: object
properties:
firstName:
deprecated: false
type: string
title: First Name
description: A persons first name
lastName:
deprecated: true
type: string
title: Last Name
description: A persons last name
14 changes: 8 additions & 6 deletions templates/schema.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{#if schema.deprecated}}<div class="jssd-deprecated">⚠️ This schema has been marked as deprecated.</div>{{/if}}

{{#if schema.title}}# {{ schema.title }}{{else if schema.description}}# {{ schema.description }}{{else}}# {{/if}}

{{#if schema.title}}{{#if schema.description}}<p>{{ schema.description }}</p>{{/if}}{{/if}}
Expand Down Expand Up @@ -121,6 +123,12 @@
<td colspan="2">{{ this.$id }}</td>
</tr>
{{/if}}
{{#if this.deprecated}}
<tr>
<th>Deprecated</th>
<td colspan="2">{{this.deprecated}}</td>
</tr>
{{/if}}
{{#if this.title}}
<tr>
<th>Title</th>
Expand All @@ -146,12 +154,6 @@
<td colspan="2">{{this.default}}</td>
</tr>
{{/if}}
{{#if this.deprecated}}
<tr>
<th>Deprecated</th>
<td colspan="2">{{this.deprecated}}</td>
</tr>
{{/if}}
{{#if this.readOnly}}
<tr>
<th>Read Only</th>
Expand Down