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

Adding tests and fixing examples

parent 9b5c2cf2
Branches
Tags
No related merge requests found
......@@ -36,7 +36,7 @@ aks.
| Property | Type | Required | Nullable | Defined by |
|----------|------|----------|----------|------------|
| [@id](#id) | `string` | Optional | No | Definitions (this schema) |
| [@id](#id) | `string` | **Required** | No | Definitions (this schema) |
| [id](#id-1) | `string` | **Required** | No | Definitions (this schema) |
| [meta:id](#metaid) | `string` | Optional | No | Definitions (this schema) |
| `*` | any | Additional | Yes | this schema *allows* additional properties |
......@@ -47,7 +47,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`@id`
* is optional
* is **required**
* type: `string`
* defined in this schema
......
......@@ -27,7 +27,10 @@
"format": "email",
"description": "An about ids. It is meta. If you are confused, send an email to the address specified in this property value."
}
}
},
"required": [
"@id"
]
}
},
"allOf": [
......
......@@ -27,7 +27,8 @@
"format": "email",
"description": "An about ids. It is meta. If you are confused, send an email to the address specified in this property value."
}
}
},
"required": ["@id"]
}
},
"allOf": [
......
......@@ -36,7 +36,7 @@ aks.
| Property | Type | Required | Nullable | Defined by |
|----------|------|----------|----------|------------|
| [@id](#id) | `string` | Optional | No | Definitions (this schema) |
| [@id](#id) | `string` | **Required** | No | Definitions (this schema) |
| [id](#id-1) | `string` | **Required** | No | Definitions (this schema) |
| [meta:id](#metaid) | `string` | Optional | No | Definitions (this schema) |
| `*` | any | Additional | Yes | this schema *allows* additional properties |
......@@ -47,7 +47,7 @@ An `id` with an `@` in front of it. The `@` stands for "dot com"
`@id`
* is optional
* is **required**
* type: `string`
* defined in this schema
......
......@@ -57,6 +57,7 @@ describe('Compare results', () => {
const files = readdirSync('./spec/examples').filter(item => !(/(^|\/)\.[^\/\.]/g).test(item));
expect(files.length).toEqual(22);
//console.log(readFileSync(path.resolve('./examples/schemas/', 'definitions.schema.json')).toString());
files.forEach(file => {
if (statSync('./spec/examples/' + file).isFile()) {
const expectedstr = readFileSync(path.resolve('./spec/examples/', file)).toString();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment