diff --git a/examples/docs/definitions.schema.md b/examples/docs/definitions.schema.md index 556bf882ae635731a96182d99eb9dc50216bef82..5a8bebe3089ff31b8445ca333bda2a1fbcf04f6c 100644 --- a/examples/docs/definitions.schema.md +++ b/examples/docs/definitions.schema.md @@ -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 diff --git a/examples/generated-schemas/definitions.schema.json b/examples/generated-schemas/definitions.schema.json index 6ce74a09049e19154678a66ccb2779d4f213a249..4db488214caf04a6644abe8841448d45ab819b2f 100644 --- a/examples/generated-schemas/definitions.schema.json +++ b/examples/generated-schemas/definitions.schema.json @@ -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": [ diff --git a/examples/schemas/definitions.schema.json b/examples/schemas/definitions.schema.json index fb7623a60fff0c8c03bf997ebd218a6e44dabcae..0141419866d005b1e1a9dc3333362e75574424e8 100644 --- a/examples/schemas/definitions.schema.json +++ b/examples/schemas/definitions.schema.json @@ -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": [ diff --git a/spec/examples/definitions.schema.md b/spec/examples/definitions.schema.md index 556bf882ae635731a96182d99eb9dc50216bef82..5a8bebe3089ff31b8445ca333bda2a1fbcf04f6c 100644 --- a/spec/examples/definitions.schema.md +++ b/spec/examples/definitions.schema.md @@ -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 diff --git a/spec/lib/integrationTest.spec.js b/spec/lib/integrationTest.spec.js index 8ed479714682eb8335f98f894266f35bb487b453..575a13edcb9508d6e2e8e930a8f39cb4c1bfb2c7 100644 --- a/spec/lib/integrationTest.spec.js +++ b/spec/lib/integrationTest.spec.js @@ -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();