From f2c1d465e0c36722819538ff6990e6755baaa9fa Mon Sep 17 00:00:00 2001 From: Ismael Martinez Ramos Date: Mon, 30 Sep 2024 21:15:34 +0100 Subject: [PATCH 1/2] docs: adding optional version to the message object --- schemas/3.0.0-without-$id.json | 4 ++++ schemas/3.0.0.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 4ca677a4..5f271569 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2542,6 +2542,10 @@ "type": "string", "description": "A brief summary of the message." }, + "version": { + "type": "string", + "description": "A version for the message." + }, "name": { "type": "string", "description": "Name of the message." diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index f86ffae0..9066b052 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2594,6 +2594,10 @@ "type": "string", "description": "A brief summary of the message." }, + "version": { + "type": "string", + "description": "A version for the message." + }, "name": { "type": "string", "description": "Name of the message." From 3114348058f06e6baac5aef944dcc6db3d43e27d Mon Sep 17 00:00:00 2001 From: Ismael Martinez Ramos Date: Tue, 1 Oct 2024 17:40:55 +0100 Subject: [PATCH 2/2] docs: adding test and applying the changes to the definition, instead of the generated schema --- definitions/3.0.0/messageObject.json | 4 ++++ schemas/3.0.0-without-$id.json | 4 ---- schemas/3.0.0.json | 4 ---- test/definitions/3.0.0/models/channel/message.test.mjs | 1 + 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index f8cd37bb..1903dc7b 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -46,6 +46,10 @@ "type": "string", "description": "A brief summary of the message." }, + "version": { + "type": "string", + "description": "A version for the message." + }, "name": { "type": "string", "description": "Name of the message." diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index 5f271569..4ca677a4 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -2542,10 +2542,6 @@ "type": "string", "description": "A brief summary of the message." }, - "version": { - "type": "string", - "description": "A version for the message." - }, "name": { "type": "string", "description": "Name of the message." diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 9066b052..f86ffae0 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2594,10 +2594,6 @@ "type": "string", "description": "A brief summary of the message." }, - "version": { - "type": "string", - "description": "A version for the message." - }, "name": { "type": "string", "description": "Name of the message." diff --git a/test/definitions/3.0.0/models/channel/message.test.mjs b/test/definitions/3.0.0/models/channel/message.test.mjs index 99426546..b92e4639 100644 --- a/test/definitions/3.0.0/models/channel/message.test.mjs +++ b/test/definitions/3.0.0/models/channel/message.test.mjs @@ -20,6 +20,7 @@ const data = new JsonSchemaTestSuiteData( { "name": "UserSignup", "title": "User signup", + "version": "1.0.0", "summary": "Action to sign a user up.", "description": "A longer description", "contentType": "application/json",