Skip to content

Commit

Permalink
Merge branch 'next-major-spec' into add_migration_guide_v6
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni authored Oct 9, 2023
2 parents 8228531 + ae2b0d4 commit b43d3d6
Show file tree
Hide file tree
Showing 10 changed files with 3,013 additions and 69 deletions.
84 changes: 84 additions & 0 deletions bindings/googlepubsub/0.2.0/channel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json",
"title": "Cloud Pub/Sub Channel Schema",
"description": "This object contains information about the channel representation for Google Cloud Pub/Sub.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"bindingVersion": {
"type": "string",
"enum": [
"0.2.0"
],
"description": "The version of this binding."
},
"labels": {
"type": "object"
},
"messageRetentionDuration": {
"type": "string"
},
"messageStoragePolicy": {
"type": "object",
"additionalProperties": false,
"properties": {
"allowedPersistenceRegions": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"schemaSettings": {
"type": "object",
"additionalItems": false,
"properties": {
"encoding": {
"type": "string"
},
"firstRevisionId": {
"type": "string"
},
"lastRevisionId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"encoding",
"name"
]
}
},
"required": [
"schemaSettings"
],
"examples": [
{
"labels": {
"label1": "value1",
"label2": "value2"
},
"messageRetentionDuration": "86400s",
"messageStoragePolicy": {
"allowedPersistenceRegions": [
"us-central1",
"us-east1"
]
},
"schemaSettings": {
"encoding": "json",
"name": "projects/your-project-id/schemas/your-schema"
}
}
]
}
50 changes: 50 additions & 0 deletions bindings/googlepubsub/0.2.0/message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json",
"title": "Cloud Pub/Sub Channel Schema",
"description": "This object contains information about the message representation for Google Cloud Pub/Sub.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"bindingVersion": {
"type": "string",
"enum": [
"0.2.0"
],
"description": "The version of this binding."
},
"attributes": {
"type": "object"
},
"orderingKey": {
"type": "string"
},
"schema": {
"type": "object",
"additionalItems": false,
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"]
}
},
"examples": [
{
"schema": {
"name": "projects/your-project-id/schemas/your-avro-schema-id"
}
},
{
"schema": {
"name": "projects/your-project-id/schemas/your-protobuf-schema-id"
}
}
]
}
9 changes: 8 additions & 1 deletion bindings/kafka/0.4.0/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
},
"properties": {
"key": {
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json",
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json"
},
{
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json"
}
],
"description": "The message key."
},
"schemaIdLocation": {
Expand Down
8 changes: 4 additions & 4 deletions definitions/3.0.0/channelBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"googlepubsub": {
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
"enum": ["0.2.0"]
}
},
"allOf": [
Expand All @@ -223,20 +223,20 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json"
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
"const": "0.2.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/channel.json"
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/channel.json"
}
}
]
Expand Down
8 changes: 4 additions & 4 deletions definitions/3.0.0/messageBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
"googlepubsub": {
"properties": {
"bindingVersion": {
"enum": ["0.1.0"]
"enum": ["0.2.0"]
}
},
"allOf": [
Expand All @@ -270,20 +270,20 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json"
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.1.0"
"const": "0.2.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.1.0/message.json"
"$ref": "http://asyncapi.com/bindings/googlepubsub/0.2.0/message.json"
}
}
]
Expand Down
Loading

0 comments on commit b43d3d6

Please sign in to comment.