Skip to content

Commit

Permalink
update multi format messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni committed May 13, 2024
1 parent 90a2d26 commit 7312f79
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 0 deletions.
48 changes: 48 additions & 0 deletions definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{

"if": {
"description": "If schemaFormat has been defined check if it's one of the AsyncAPI Schema Object formats",
"required": [
"schemaFormat"
],
"properties": {
"schemaFormat": {
"enum": [
"application/vnd.aai.asyncapi;version=2.0.0",
"application/vnd.aai.asyncapi+json;version=2.0.0",
"application/vnd.aai.asyncapi+yaml;version=2.0.0",
"application/vnd.aai.asyncapi;version=2.1.0",
"application/vnd.aai.asyncapi+json;version=2.1.0",
"application/vnd.aai.asyncapi+yaml;version=2.1.0",
"application/vnd.aai.asyncapi;version=2.2.0",
"application/vnd.aai.asyncapi+json;version=2.2.0",
"application/vnd.aai.asyncapi+yaml;version=2.2.0",
"application/vnd.aai.asyncapi;version=2.3.0",
"application/vnd.aai.asyncapi+json;version=2.3.0",
"application/vnd.aai.asyncapi+yaml;version=2.3.0",
"application/vnd.aai.asyncapi;version=2.4.0",
"application/vnd.aai.asyncapi+json;version=2.4.0",
"application/vnd.aai.asyncapi+yaml;version=2.4.0",
"application/vnd.aai.asyncapi;version=2.5.0",
"application/vnd.aai.asyncapi+json;version=2.5.0",
"application/vnd.aai.asyncapi+yaml;version=2.5.0",
"application/vnd.aai.asyncapi;version=2.6.0",
"application/vnd.aai.asyncapi+json;version=2.6.0",
"application/vnd.aai.asyncapi+yaml;version=2.6.0",
"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"
]
}
}
},
"then": {
"properties": {
"schema": {
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/multiFormatAsyncAPISchemaMessage.json"
}
32 changes: 32 additions & 0 deletions definitions/3.0.0/multiFormatAvroMessage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"if": {
"required": [
"schemaFormat"
],
"properties": {
"schemaFormat": {
"enum": [
"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"
]
}
}
},
"then": {
"properties": {
"schema": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/avroSchema_v1.json"
}
]
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/multiFormatAvroMessage.json"
}
24 changes: 24 additions & 0 deletions definitions/3.0.0/multiFormatJsonSchemaMessage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"if": {
"required": [
"schemaFormat"
],
"properties": {
"schemaFormat": {
"enum": [
"application/schema+json;version=draft-07",
"application/schema+yaml;version=draft-07"
]
}
}
},
"then": {
"properties": {
"schema": {
"$ref": "http://json-schema.org/draft-07/schema"
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/multiFormatJsonSchemaMessage.json"
}
32 changes: 32 additions & 0 deletions definitions/3.0.0/multiFormatOpenAPIMessage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"if": {
"required": [
"schemaFormat"
],
"properties": {
"schemaFormat": {
"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"
]
}
}
},
"then": {
"properties": {
"schema": {
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/openapiSchema_3_0.json"
}
]
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/multiFormatOpenAPIMessage.json"
}

0 comments on commit 7312f79

Please sign in to comment.