From b6cd9100a55f7ae33b9e94de996c62a4721b329f Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Tue, 16 May 2023 18:41:58 -0400 Subject: [PATCH] expanding the schemas --- schemas/base.json | 6 ++++-- schemas/blog.json | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 schemas/blog.json diff --git a/schemas/base.json b/schemas/base.json index 0fcb932..6158582 100644 --- a/schemas/base.json +++ b/schemas/base.json @@ -1,14 +1,16 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "http://ndumas.com/schemas/myschema.json", - "title":"baseNote", + "$id": "https://ndumas.com/schemas/note.json", + "title":"note", "description":"properties all notes must have", "type":"object", "properties": { "title": { + "description":"Title of the note", "type": "string" }, "aliases": { + "description":"alternate names for the notes", "type": "array", "items": { "type":"string", diff --git a/schemas/blog.json b/schemas/blog.json new file mode 100644 index 0000000..e69b01a --- /dev/null +++ b/schemas/blog.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://ndumas.com/schemas/post.json", + "title":"post", + "description":"properties all notes must have", + "type":"object", + "properties": { + "title": { + "$ref":"https://ndumas.com/schemas/note.json" + }, + "date": { + "type":"date" + }, + "series": { + "type": "array", + "items": { + "type":"string", + "uniqueItems": true + } + } + }, + "required": ["title","aliases"] +}