From 3b5bf603e6f578a9988b66b5b6ee0d1e93cceb74 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 22 May 2024 20:52:03 +0200 Subject: [PATCH] update common location --- bindings/kafka/0.4.0/message.json | 2 +- definitions/2.0.0/message.json | 4 ++-- definitions/2.1.0/message.json | 4 ++-- definitions/2.2.0/message.json | 4 ++-- definitions/2.3.0/message.json | 4 ++-- definitions/2.4.0/message.json | 4 ++-- definitions/2.5.0/message.json | 4 ++-- definitions/2.6.0/message.json | 4 ++-- definitions/3.0.0/multiFormatSchema.json | 4 ++-- {common => definitions/common}/avroSchema_v1.json | 2 +- .../common}/openapiSchema_3_0.json | 2 +- schemas/2.0.0.json | 12 ++++++------ schemas/2.1.0.json | 12 ++++++------ schemas/2.2.0.json | 12 ++++++------ schemas/2.3.0.json | 12 ++++++------ schemas/2.4.0.json | 12 ++++++------ schemas/2.5.0.json | 12 ++++++------ schemas/2.6.0.json | 12 ++++++------ schemas/3.0.0.json | 14 +++++++------- scripts/add-new-version.js | 2 +- 20 files changed, 69 insertions(+), 69 deletions(-) rename {common => definitions/common}/avroSchema_v1.json (98%) rename {common => definitions/common}/openapiSchema_3_0.json (98%) diff --git a/bindings/kafka/0.4.0/message.json b/bindings/kafka/0.4.0/message.json index 704c7c0d..d7d4fc61 100644 --- a/bindings/kafka/0.4.0/message.json +++ b/bindings/kafka/0.4.0/message.json @@ -19,7 +19,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ], "description": "The message key." diff --git a/definitions/2.0.0/message.json b/definitions/2.0.0/message.json index 0061db97..66b3a946 100644 --- a/definitions/2.0.0/message.json +++ b/definitions/2.0.0/message.json @@ -200,7 +200,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -223,7 +223,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.1.0/message.json b/definitions/2.1.0/message.json index a280a824..59fd06ab 100644 --- a/definitions/2.1.0/message.json +++ b/definitions/2.1.0/message.json @@ -223,7 +223,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -246,7 +246,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.2.0/message.json b/definitions/2.2.0/message.json index ec71a4d8..706dd5b0 100644 --- a/definitions/2.2.0/message.json +++ b/definitions/2.2.0/message.json @@ -226,7 +226,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -249,7 +249,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.3.0/message.json b/definitions/2.3.0/message.json index fd6d8f5e..bc6f1a05 100644 --- a/definitions/2.3.0/message.json +++ b/definitions/2.3.0/message.json @@ -229,7 +229,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -252,7 +252,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.4.0/message.json b/definitions/2.4.0/message.json index 25efb274..48c8a953 100644 --- a/definitions/2.4.0/message.json +++ b/definitions/2.4.0/message.json @@ -235,7 +235,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -258,7 +258,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.5.0/message.json b/definitions/2.5.0/message.json index 63a4506d..68d534f0 100644 --- a/definitions/2.5.0/message.json +++ b/definitions/2.5.0/message.json @@ -232,7 +232,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -255,7 +255,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/2.6.0/message.json b/definitions/2.6.0/message.json index f9e5b438..6b26f5f8 100644 --- a/definitions/2.6.0/message.json +++ b/definitions/2.6.0/message.json @@ -240,7 +240,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -263,7 +263,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index de026c72..1cd17517 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -158,7 +158,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } ] } @@ -188,7 +188,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ] } diff --git a/common/avroSchema_v1.json b/definitions/common/avroSchema_v1.json similarity index 98% rename from common/avroSchema_v1.json rename to definitions/common/avroSchema_v1.json index f3bfcd2b..3ce0b345 100644 --- a/common/avroSchema_v1.json +++ b/definitions/common/avroSchema_v1.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/common/openapiSchema_3_0.json b/definitions/common/openapiSchema_3_0.json similarity index 98% rename from common/openapiSchema_3_0.json rename to definitions/common/openapiSchema_3_0.json index 00e3a6ca..0dd2b603 100644 --- a/common/openapiSchema_3_0.json +++ b/definitions/common/openapiSchema_3_0.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { diff --git a/schemas/2.0.0.json b/schemas/2.0.0.json index 2398d17a..128f075f 100644 --- a/schemas/2.0.0.json +++ b/schemas/2.0.0.json @@ -1046,7 +1046,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1069,7 +1069,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1185,8 +1185,8 @@ } } }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1472,8 +1472,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.1.0.json b/schemas/2.1.0.json index 8cfde4c0..592bba3e 100644 --- a/schemas/2.1.0.json +++ b/schemas/2.1.0.json @@ -1070,7 +1070,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1093,7 +1093,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1236,8 +1236,8 @@ } } }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1523,8 +1523,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.2.0.json b/schemas/2.2.0.json index f9f0b2f8..124f4314 100644 --- a/schemas/2.2.0.json +++ b/schemas/2.2.0.json @@ -1082,7 +1082,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1105,7 +1105,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1221,8 +1221,8 @@ } } }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1508,8 +1508,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.3.0.json b/schemas/2.3.0.json index 37682eca..30e7a44d 100644 --- a/schemas/2.3.0.json +++ b/schemas/2.3.0.json @@ -1098,7 +1098,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1121,7 +1121,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1237,8 +1237,8 @@ } } }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1524,8 +1524,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.4.0.json b/schemas/2.4.0.json index f220e5f7..a9a05b4a 100644 --- a/schemas/2.4.0.json +++ b/schemas/2.4.0.json @@ -1116,7 +1116,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1139,7 +1139,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1258,8 +1258,8 @@ } } }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1545,8 +1545,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.5.0.json b/schemas/2.5.0.json index f078bf4e..9465c825 100644 --- a/schemas/2.5.0.json +++ b/schemas/2.5.0.json @@ -1130,7 +1130,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1153,7 +1153,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1272,8 +1272,8 @@ } } }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -1559,8 +1559,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/2.6.0.json b/schemas/2.6.0.json index c8d604cd..502c6348 100644 --- a/schemas/2.6.0.json +++ b/schemas/2.6.0.json @@ -1439,7 +1439,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } } } @@ -1462,7 +1462,7 @@ "then": { "properties": { "payload": { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } } } @@ -1726,8 +1726,8 @@ } ] }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -2013,8 +2013,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 22e1923f..c3bea3c8 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -2917,7 +2917,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/common/openapiSchema_3_0.json" + "$ref": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json" } ] } @@ -2947,7 +2947,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" }, { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ] } @@ -2957,8 +2957,8 @@ ] } }, - "http://asyncapi.com/common/openapiSchema_3_0.json": { - "$id": "http://asyncapi.com/common/openapiSchema_3_0.json", + "http://asyncapi.com/definitions/common/openapiSchema_3_0.json": { + "$id": "http://asyncapi.com/definitions/common/openapiSchema_3_0.json", "type": "object", "definitions": { "ExternalDocumentation": { @@ -3244,8 +3244,8 @@ }, "additionalProperties": false }, - "http://asyncapi.com/common/avroSchema_v1.json": { - "$id": "http://asyncapi.com/common/avroSchema_v1.json", + "http://asyncapi.com/definitions/common/avroSchema_v1.json": { + "$id": "http://asyncapi.com/definitions/common/avroSchema_v1.json", "definitions": { "avroSchema": { "title": "Avro Schema", @@ -4292,7 +4292,7 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, { - "$ref": "http://asyncapi.com/common/avroSchema_v1.json" + "$ref": "http://asyncapi.com/definitions/common/avroSchema_v1.json" } ], "description": "The message key." diff --git a/scripts/add-new-version.js b/scripts/add-new-version.js index 942f7f49..c09e644e 100644 --- a/scripts/add-new-version.js +++ b/scripts/add-new-version.js @@ -95,7 +95,7 @@ async function addNewVersion(newVersion) { } //Use the newest version as baseline for the new one - const latestVersion = (await execute('ls -d ./definitions/* | sort -V -r | head -1 | xargs -n 1 basename')).trim(); + const latestVersion = (await execute('ls -d ./definitions/*.*.* | sort -V -r | head -1 | xargs -n 1 basename')).trim(); await execute(`cp -R ./definitions/${latestVersion} ${newVersionDir}`); const latestExampleVersion = (await execute('ls -d ./examples/* | sort -V -r | head -1 | xargs -n 1 basename')).trim();