Skip to content
Snippets Groups Projects
Commit 3f00ddda authored by Anjan Kaur's avatar Anjan Kaur
Browse files

Fixing failing tests and examples

parent 0f54ad55
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* [Extensible](./extensible.schema.md)`https://example.com/schemas/extensible` (Unknown) * [Extensible](./extensible.schema.md)`https://example.com/schemas/extensible` (Unknown)
* [Identifiable](./identifiable.schema.md)`https://example.com/schemas/identifiable` (Unknown) * [Identifiable](./identifiable.schema.md)`https://example.com/schemas/identifiable` (Unknown)
* [Join Types](./join.schema.md)`https://example.com/schemas/join` (Unknown) * [Join Types](./join.schema.md)`https://example.com/schemas/join` (Unknown)
* [Nested Object](./nestedobj.schema.md)`https://example.com/schemas/nestedobject` (Unknown)
* [Pattern Properties](./pattern.schema.md)`https://example.com/schemas/pattern` (Unknown) * [Pattern Properties](./pattern.schema.md)`https://example.com/schemas/pattern` (Unknown)
* [Simple](./simple.schema.md)`https://example.com/schemas/simple` (Unknown) * [Simple](./simple.schema.md)`https://example.com/schemas/simple` (Unknown)
* [Simple Types](./simpletypes.schema.md)`https://example.com/schemas/simpletypes` (Unknown) * [Simple Types](./simpletypes.schema.md)`https://example.com/schemas/simpletypes` (Unknown)
......
---
template: reference
foo: bar
---
# Nested Object Schema
```
https://example.com/schemas/nestedobject
```
| [Abstract](../abstract.md) | Extensible | [Status](../status.md) | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------------------------|------------|------------------------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | No | Forbidden | Forbidden | [nestedobj.schema.json](nestedobj.schema.json) |
# Nested Object Properties
| Property | Type | Required | Nullable | Defined by |
|----------|------|----------|----------|------------|
| [settings](#settings) | `object` | Optional | No | Nested Object (this schema) |
## settings
settings
`settings`
* is optional
* type: `object`
* defined in this schema
### settings Type
`object` with following properties:
| Property | Type | Required |
|----------|------|----------|
| `collaborators`| object | Optional |
#### collaborators
collaborators
`collaborators`
* is optional
* type: `object`
##### collaborators Type
`object` with following properties:
| Property | Type | Required |
|----------|------|----------|
| `id`| string | Optional |
#### id
`id`
* is optional
* type: `string`
##### id Type
`string`
{
"$id": "https://example.com/schemas/nestedobject",
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Nested Object",
"type": "object",
"properties": {
"settings": {
"description": "settings",
"type": "object",
"properties": {
"collaborators": {
"description": "collaborators",
"type": "object",
"patternProperties": {
".*": {
"type": "string"
}
},
"properties": {
"id": {
"type": "string"
}
}
}
}
}
},
"additionalProperties": false
}
\ No newline at end of file
{ {
"$id": "test.json", "$id": "https://example.com/schemas/nestedobject",
"$schema": "http://json-schema.org/draft-07/schema", "$schema": "http://json-schema.org/draft-07/schema",
"title": "test", "title": "Nested Object",
"type": "object", "type": "object",
"properties": { "properties": {
"settings": { "settings": {
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
* [Extensible](./extensible.schema.md)`https://example.com/schemas/extensible` (Unknown) * [Extensible](./extensible.schema.md)`https://example.com/schemas/extensible` (Unknown)
* [Identifiable](./identifiable.schema.md)`https://example.com/schemas/identifiable` (Unknown) * [Identifiable](./identifiable.schema.md)`https://example.com/schemas/identifiable` (Unknown)
* [Join Types](./join.schema.md)`https://example.com/schemas/join` (Unknown) * [Join Types](./join.schema.md)`https://example.com/schemas/join` (Unknown)
* [Nested Object](./nestedobj.schema.md)`https://example.com/schemas/nestedobject` (Unknown)
* [Pattern Properties](./pattern.schema.md)`https://example.com/schemas/pattern` (Unknown) * [Pattern Properties](./pattern.schema.md)`https://example.com/schemas/pattern` (Unknown)
* [Simple](./simple.schema.md)`https://example.com/schemas/simple` (Unknown) * [Simple](./simple.schema.md)`https://example.com/schemas/simple` (Unknown)
* [Simple Types](./simpletypes.schema.md)`https://example.com/schemas/simpletypes` (Unknown) * [Simple Types](./simpletypes.schema.md)`https://example.com/schemas/simpletypes` (Unknown)
......
---
template: reference
foo: bar
---
# Nested Object Schema
```
https://example.com/schemas/nestedobject
```
| [Abstract](../abstract.md) | Extensible | [Status](../status.md) | Identifiable | Custom Properties | Additional Properties | Defined In |
|----------------------------|------------|------------------------|--------------|-------------------|-----------------------|------------|
| Can be instantiated | No | Experimental | No | Forbidden | Forbidden | [nestedobj.schema.json](nestedobj.schema.json) |
# Nested Object Properties
| Property | Type | Required | Nullable | Defined by |
|----------|------|----------|----------|------------|
| [settings](#settings) | `object` | Optional | No | Nested Object (this schema) |
## settings
settings
`settings`
* is optional
* type: `object`
* defined in this schema
### settings Type
`object` with following properties:
| Property | Type | Required |
|----------|------|----------|
| `collaborators`| object | Optional |
#### collaborators
collaborators
`collaborators`
* is optional
* type: `object`
##### collaborators Type
`object` with following properties:
| Property | Type | Required |
|----------|------|----------|
| `id`| string | Optional |
#### id
`id`
* is optional
* type: `string`
##### id Type
`string`
...@@ -55,7 +55,7 @@ describe('Compare results', () => { ...@@ -55,7 +55,7 @@ describe('Compare results', () => {
ls.on('close', code => { ls.on('close', code => {
expect(code).toEqual(0); expect(code).toEqual(0);
const files = readdirSync('./spec/examples').filter(item => !(/(^|\/)\.[^\/\.]/g).test(item)); const files = readdirSync('./spec/examples').filter(item => !(/(^|\/)\.[^\/\.]/g).test(item));
expect(files.length).toEqual(21); expect(files.length).toEqual(22);
files.forEach(file => { files.forEach(file => {
if (statSync('./spec/examples/' + file).isFile()) { if (statSync('./spec/examples/' + file).isFile()) {
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
#### <%=name %> #### <%=name %>
<% if (schema.title) { %>##### <%= schema.title %><% } %> <% if (schema.title) { %>##### <%= schema.title %><% } %>
<% if (schema.description) { %>
<%- (""+schema.description).replace(/\n/g, '\n\n') %> <%- (""+schema.description).replace(/\n/g, '\n\n') %>
<% } %>
`<%=name %>` `<%=name %>`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment