diff --git a/package-lock.json b/package-lock.json index ce835882..fc988d66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.4", + "version": "6.0.0-next-major-spec.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5e1b21fc..73868fe4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.4", + "version": "6.0.0-next-major-spec.5", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index e2511835..0b8387f8 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -15,9 +15,7 @@ "properties": { "asyncapi": { "type": "string", - "enum": [ - "3.0.0" - ], + "const": "3.0.0", "description": "The AsyncAPI specification version of this document." }, "id": { @@ -2161,7 +2159,33 @@ }, "properties": { "schemaFormat": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "description": "All the schema formats tooling MUST support", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + { + "description": "All the schema formats tools are RECOMMENDED to support", + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0", + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0", + "application/raml+yaml;version=1.0" + ] + } + ] }, "schema": {} }, @@ -2169,6 +2193,7 @@ { "if": { "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", "required": [ "schemaFormat" ] @@ -2191,6 +2216,7 @@ }, { "if": { + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", "required": [ "schemaFormat" ], diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index c2bb5181..a9e52882 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -16,9 +16,7 @@ "properties": { "asyncapi": { "type": "string", - "enum": [ - "3.0.0" - ], + "const": "3.0.0", "description": "The AsyncAPI specification version of this document." }, "id": { @@ -2210,7 +2208,33 @@ }, "properties": { "schemaFormat": { - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "description": "All the schema formats tooling MUST support", + "enum": [ + "application/schema+json;version=draft-07", + "application/schema+yaml;version=draft-07", + "application/vnd.aai.asyncapi;version=3.0.0", + "application/vnd.aai.asyncapi+json;version=3.0.0", + "application/vnd.aai.asyncapi+yaml;version=3.0.0" + ] + }, + { + "description": "All the schema formats tools are RECOMMENDED to support", + "enum": [ + "application/vnd.oai.openapi;version=3.0.0", + "application/vnd.oai.openapi+json;version=3.0.0", + "application/vnd.oai.openapi+yaml;version=3.0.0", + "application/vnd.apache.avro;version=1.9.0", + "application/vnd.apache.avro+json;version=1.9.0", + "application/vnd.apache.avro+yaml;version=1.9.0", + "application/raml+yaml;version=1.0" + ] + } + ] }, "schema": {} }, @@ -2218,6 +2242,7 @@ { "if": { "not": { + "description": "If no schemaFormat has been defined, default to schema or reference", "required": [ "schemaFormat" ] @@ -2240,6 +2265,7 @@ }, { "if": { + "description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats", "required": [ "schemaFormat" ],