diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..669bfb46 Binary files /dev/null and b/.DS_Store differ diff --git a/definitions/.DS_Store b/definitions/.DS_Store new file mode 100644 index 00000000..a41cbfc3 Binary files /dev/null and b/definitions/.DS_Store differ diff --git a/definitions/3.0.0/APIKeyHTTPSecurityScheme.json b/definitions/3.0.0/APIKeyHTTPSecurityScheme.json index d1472015..85891d61 100644 --- a/definitions/3.0.0/APIKeyHTTPSecurityScheme.json +++ b/definitions/3.0.0/APIKeyHTTPSecurityScheme.json @@ -8,15 +8,18 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "httpApiKey" ] }, "name": { - "type": "string" + "type": "string", + "description": "The name of the header, query or cookie parameter to be used." }, "in": { "type": "string", + "description": "The location of the API key", "enum": [ "header", "query", @@ -24,7 +27,8 @@ ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -32,6 +36,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/APIKeyHTTPSecurityScheme.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json" diff --git a/definitions/3.0.0/BearerHTTPSecurityScheme.json b/definitions/3.0.0/BearerHTTPSecurityScheme.json index 7a247c3a..3f71902b 100644 --- a/definitions/3.0.0/BearerHTTPSecurityScheme.json +++ b/definitions/3.0.0/BearerHTTPSecurityScheme.json @@ -7,21 +7,25 @@ "properties": { "scheme": { "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.", "enum": [ "bearer" ] }, "bearerFormat": { - "type": "string" + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes." }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { diff --git a/definitions/3.0.0/NonBearerHTTPSecurityScheme.json b/definitions/3.0.0/NonBearerHTTPSecurityScheme.json index eeadb2d8..39a47dc1 100644 --- a/definitions/3.0.0/NonBearerHTTPSecurityScheme.json +++ b/definitions/3.0.0/NonBearerHTTPSecurityScheme.json @@ -4,6 +4,7 @@ "properties": { "scheme": { "type": "string", + "description": "A short description for security scheme.", "enum": [ "bearer" ] @@ -17,13 +18,16 @@ ], "properties": { "scheme": { - "type": "string" + "type": "string", + "description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235." }, "description": { - "type": "string" - }, + "type": "string", + "description": "A short description for security scheme." + }, "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "http" ] diff --git a/definitions/3.0.0/Reference.json b/definitions/3.0.0/Reference.json index f9e9893a..1fb90eba 100644 --- a/definitions/3.0.0/Reference.json +++ b/definitions/3.0.0/Reference.json @@ -1,13 +1,18 @@ { "type": "object", + "description": "A simple object to allow referencing other components in the specification, internally and externally.", "required": [ "$ref" ], "properties": { "$ref": { + "description": "The reference string.", "$ref": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/ReferenceObject.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/Reference.json" } \ No newline at end of file diff --git a/definitions/3.0.0/SaslGssapiSecurityScheme.json b/definitions/3.0.0/SaslGssapiSecurityScheme.json index f3ef3f35..eb65dcc8 100644 --- a/definitions/3.0.0/SaslGssapiSecurityScheme.json +++ b/definitions/3.0.0/SaslGssapiSecurityScheme.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "gssapi" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { @@ -19,6 +21,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json" diff --git a/definitions/3.0.0/SaslPlainSecurityScheme.json b/definitions/3.0.0/SaslPlainSecurityScheme.json index 6de1b832..54922bce 100644 --- a/definitions/3.0.0/SaslPlainSecurityScheme.json +++ b/definitions/3.0.0/SaslPlainSecurityScheme.json @@ -6,19 +6,24 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme. Valid values", "enum": [ "plain" ] }, "description": { - "type": "string" - } + "type": "string", + "description": "A short description for security scheme." + } }, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json" diff --git a/definitions/3.0.0/SaslScramSecurityScheme.json b/definitions/3.0.0/SaslScramSecurityScheme.json index b7b9fc36..375c84e8 100644 --- a/definitions/3.0.0/SaslScramSecurityScheme.json +++ b/definitions/3.0.0/SaslScramSecurityScheme.json @@ -6,20 +6,25 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "scramSha256", "scramSha512" ] }, "description": { - "type": "string" - } + "type": "string", + "description": "A short description for security scheme." + } }, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json" diff --git a/definitions/3.0.0/SecurityScheme.json b/definitions/3.0.0/SecurityScheme.json index ee6b9f70..83573217 100644 --- a/definitions/3.0.0/SecurityScheme.json +++ b/definitions/3.0.0/SecurityScheme.json @@ -1,4 +1,5 @@ { + "description": "Defines a security scheme that can be used by the operations.", "oneOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/userPassword.json" @@ -28,6 +29,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json" } ], + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/SecurityScheme.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json" } \ No newline at end of file diff --git a/definitions/3.0.0/X509.json b/definitions/3.0.0/X509.json index 059a1ca0..0ef56d8a 100644 --- a/definitions/3.0.0/X509.json +++ b/definitions/3.0.0/X509.json @@ -19,6 +19,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/X509.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/X509.json" diff --git a/definitions/3.0.0/apiKey.json b/definitions/3.0.0/apiKey.json index dd4b8af8..83a7174b 100644 --- a/definitions/3.0.0/apiKey.json +++ b/definitions/3.0.0/apiKey.json @@ -7,19 +7,22 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme", "enum": [ "apiKey" ] }, "in": { "type": "string", + "description": " The location of the API key.", "enum": [ "user", "password" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." } }, "patternProperties": { @@ -27,6 +30,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/apiKey.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/apiKey.json" diff --git a/definitions/3.0.0/asymmetricEncryption.json b/definitions/3.0.0/asymmetricEncryption.json index 58ef8eb1..b52c5dff 100644 --- a/definitions/3.0.0/asymmetricEncryption.json +++ b/definitions/3.0.0/asymmetricEncryption.json @@ -6,12 +6,14 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "asymmetricEncryption" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme." } }, "patternProperties": { diff --git a/definitions/3.0.0/asyncapi.json b/definitions/3.0.0/asyncapi.json index 18a6c39d..0af21643 100644 --- a/definitions/3.0.0/asyncapi.json +++ b/definitions/3.0.0/asyncapi.json @@ -31,7 +31,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/servers.json" }, "defaultContentType": { - "type": "string" + "type": "string", + "description": "Default content type to use when encoding/decoding a message's payload." }, "channels": { "$ref": "http://asyncapi.com/definitions/3.0.0/channels.json" diff --git a/definitions/3.0.0/channel.json b/definitions/3.0.0/channel.json index 22a3c4b6..c2797964 100644 --- a/definitions/3.0.0/channel.json +++ b/definitions/3.0.0/channel.json @@ -1,70 +1,75 @@ { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "address": { - "type": ["string", "null"], - "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." - }, - "messages": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" - }, - "parameters": { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" - }, - "title": { - "type": "string", - "description": "A human-friendly title for the channel." - }, - "summary": { - "type": "string", - "description": "A brief summary of the channel." - }, - "description": { - "type": "string", - "description": "A longer description of the channel. CommonMark is allowed." - }, - "servers": { - "type": "array", - "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", - "items": { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - "uniqueItems": true - }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] - }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" - } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/channel.json" + "type": "object", + "description": "Describes a shared communication channel.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "address": { + "type": ["string", "null"], + "description": "An optional string representation of this channel's address. The address is typically the \"topic name\", \"routing key\", \"event type\", or \"path\". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain Channel Address Expressions." + }, + "messages": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelMessages.json" + }, + "parameters": { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameters.json" + }, + "title": { + "type": "string", + "description": "A human-friendly title for the channel." + }, + "summary": { + "type": "string", + "description": "A brief summary of the channel." + }, + "description": { + "type": "string", + "description": "A longer description of the channel. CommonMark is allowed." + }, + "servers": { + "type": "array", + "description": "The references of the servers on which this channel is available. If absent or empty then this channel must be available on all servers.", + "items": { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + "uniqueItems": true + }, + "tags": { + "type": "array", + "description": "A list of tags for logical grouping of channels.", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/channelBindingsObject.json" + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/channel.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/channel.json" } \ No newline at end of file diff --git a/definitions/3.0.0/channelBindingsObject.json b/definitions/3.0.0/channelBindingsObject.json index 21ba2f2c..5c5e737f 100644 --- a/definitions/3.0.0/channelBindingsObject.json +++ b/definitions/3.0.0/channelBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a channel.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/channels.json b/definitions/3.0.0/channels.json index a4f4e89d..4532f1b5 100644 --- a/definitions/3.0.0/channels.json +++ b/definitions/3.0.0/channels.json @@ -1,15 +1,19 @@ { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" - } - ] - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/channels.json" + "type": "object", + "description": "An object containing all the Channel Object definitions the Application MUST use during runtime.", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/channel.json" + } + ] + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/channels.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/channels.json" } \ No newline at end of file diff --git a/definitions/3.0.0/components.json b/definitions/3.0.0/components.json index 3f3589ef..566ecb5e 100644 --- a/definitions/3.0.0/components.json +++ b/definitions/3.0.0/components.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI Specification.", + "description": "An object to hold a set of reusable objects for different aspects of the AsyncAPI specification. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -10,6 +10,7 @@ "properties": { "schemas": { "type": "object", + "description": "An object to hold reusable Schema Object. If this is a Schema Object, then the schemaFormat will be assumed to be 'application/vnd.aai.asyncapi+json;version=asyncapi' where the version is equal to the AsyncAPI Version String.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -25,6 +26,7 @@ }, "servers": { "type": "object", + "description": "An object to hold reusable Server Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -40,6 +42,7 @@ }, "channels": { "type": "object", + "description": "An object to hold reusable Channel Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -55,6 +58,7 @@ }, "serverVariables": { "type": "object", + "description": "An object to hold reusable Server Variable Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -70,6 +74,7 @@ }, "messages": { "type": "object", + "description": "An object to hold reusable Message Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -85,6 +90,7 @@ }, "securitySchemes": { "type": "object", + "description": "An object to hold reusable Security Scheme Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -100,6 +106,7 @@ }, "parameters": { "type": "object", + "description": "An object to hold reusable Parameter Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -115,6 +122,7 @@ }, "correlationIds": { "type": "object", + "description": "An object to hold reusable Correlation ID Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -130,6 +138,7 @@ }, "operationTraits": { "type": "object", + "description": "An object to hold reusable Operation Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -145,6 +154,7 @@ }, "messageTraits": { "type": "object", + "description": "An object to hold reusable Message Trait Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -160,6 +170,7 @@ }, "replies": { "type": "object", + "description": "An object to hold reusable Operation Reply Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -175,6 +186,7 @@ }, "replyAddresses": { "type": "object", + "description": "An object to hold reusable Operation Reply Address Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -190,6 +202,7 @@ }, "serverBindings": { "type": "object", + "description": "An object to hold reusable Server Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -205,6 +218,7 @@ }, "channelBindings": { "type": "object", + "description": "An object to hold reusable Channel Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -220,6 +234,7 @@ }, "operationBindings": { "type": "object", + "description": "An object to hold reusable Operation Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -235,6 +250,7 @@ }, "messageBindings": { "type": "object", + "description": "An object to hold reusable Message Bindings Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -250,6 +266,7 @@ }, "tags": { "type": "object", + "description": "An object to hold reusable Tag Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -265,6 +282,7 @@ }, "externalDocs": { "type": "object", + "description": "An object to hold reusable External Documentation Objects.", "patternProperties": { "^[\\w\\d\\.\\-_]+$": { "oneOf": [ @@ -279,6 +297,9 @@ } } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/components.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/components.json" } \ No newline at end of file diff --git a/definitions/3.0.0/contact.json b/definitions/3.0.0/contact.json index ec226020..f6e1c80d 100644 --- a/definitions/3.0.0/contact.json +++ b/definitions/3.0.0/contact.json @@ -1,28 +1,31 @@ { - "type": "object", - "description": "Contact information for the owners of the API.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/contact.json" + "type": "object", + "description": "Contact information for the exposed API.", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The identifying name of the contact person/organization." + }, + "url": { + "type": "string", + "description": "The URL pointing to the contact information.", + "format": "uri" + }, + "email": { + "type": "string", + "description": "The email address of the contact person/organization.", + "format": "email" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/contact.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/contact.json" } \ No newline at end of file diff --git a/definitions/3.0.0/correlationId.json b/definitions/3.0.0/correlationId.json index 03d0a514..4eb2e1b5 100644 --- a/definitions/3.0.0/correlationId.json +++ b/definitions/3.0.0/correlationId.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "An object that specifies an identifier at design time that can used for message tracing and correlation.", "required": [ "location" ], @@ -20,6 +21,9 @@ "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/correlationId.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/correlationId.json" } \ No newline at end of file diff --git a/definitions/3.0.0/externalDocs.json b/definitions/3.0.0/externalDocs.json index 0a20754f..aae10107 100644 --- a/definitions/3.0.0/externalDocs.json +++ b/definitions/3.0.0/externalDocs.json @@ -1,16 +1,18 @@ { "type": "object", "additionalProperties": false, - "description": "information about external documentation", + "description": "Allows referencing an external resource for extended documentation.", "required": [ "url" ], "properties": { "description": { - "type": "string" + "type": "string", + "description": "A short description of the target documentation. CommonMark syntax can be used for rich text representation." }, "url": { "type": "string", + "description": "The URL for the target documentation. This MUST be in the form of an absolute URL.", "format": "uri" } }, @@ -19,6 +21,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/externalDocs.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" } \ No newline at end of file diff --git a/definitions/3.0.0/info.json b/definitions/3.0.0/info.json index bf8c1491..6c9b70fa 100644 --- a/definitions/3.0.0/info.json +++ b/definitions/3.0.0/info.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "General information about the API.", + "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", "required": [ "version", "title" @@ -37,6 +37,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", "items": { "oneOf": [ { @@ -60,6 +61,9 @@ ] } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/info.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/info.json" } \ No newline at end of file diff --git a/definitions/3.0.0/license.json b/definitions/3.0.0/license.json index 391692c9..9561f995 100644 --- a/definitions/3.0.0/license.json +++ b/definitions/3.0.0/license.json @@ -1,25 +1,26 @@ { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/license.json" + "type": "object", + "required": ["name"], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the license type. It's encouraged to use an OSI compatible license." + }, + "url": { + "type": "string", + "description": "The URL pointing to the license.", + "format": "uri" + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/license.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/license.json" } \ No newline at end of file diff --git a/definitions/3.0.0/messageBindingsObject.json b/definitions/3.0.0/messageBindingsObject.json index cfe65074..abfe27bd 100644 --- a/definitions/3.0.0/messageBindingsObject.json +++ b/definitions/3.0.0/messageBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/messageObject.json b/definitions/3.0.0/messageObject.json index 69aeafe4..90f0d23f 100644 --- a/definitions/3.0.0/messageObject.json +++ b/definitions/3.0.0/messageObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a message received on a given channel and operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,13 +9,15 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, "messageId": { - "type": "string" + "type": "string", + "description": "Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is case-sensitive. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions." }, "payload": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" @@ -75,6 +78,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object", "additionalProperties": false, @@ -113,6 +117,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the message object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Message Object.", "items": { "oneOf": [ { @@ -144,6 +149,9 @@ } } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/messageObject.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageObject.json" } \ No newline at end of file diff --git a/definitions/3.0.0/messageTrait.json b/definitions/3.0.0/messageTrait.json index fd0f0475..c381219a 100644 --- a/definitions/3.0.0/messageTrait.json +++ b/definitions/3.0.0/messageTrait.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a trait that MAY be applied to a Message Object. This object MAY contain any property from the Message Object, except payload and traits.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -8,13 +9,15 @@ }, "properties": { "contentType": { - "type": "string" + "type": "string", + "description": "The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. application/json). When omitted, the value MUST be the one specified on the defaultContentType field." }, "headers": { "$ref": "http://asyncapi.com/definitions/3.0.0/anySchema.json" }, "messageId": { - "type": "string" + "type": "string", + "description": "Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is case-sensitive. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions." }, "correlationId": { "oneOf": [ @@ -72,6 +75,7 @@ }, "examples": { "type": "array", + "description": "List of examples.", "items": { "type": "object" } @@ -80,6 +84,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/messageBindingsObject.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/messageTrait.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/messageTrait.json" } \ No newline at end of file diff --git a/definitions/3.0.0/multiFormatSchema.json b/definitions/3.0.0/multiFormatSchema.json index fa993a10..d4047bb0 100644 --- a/definitions/3.0.0/multiFormatSchema.json +++ b/definitions/3.0.0/multiFormatSchema.json @@ -1,4 +1,5 @@ { + "description": "The Multi Format Schema Object represents a schema definition. It differs from the Schema Object in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.).", "if": { "not": { "type": "object" @@ -17,6 +18,7 @@ }, "properties": { "schemaFormat": { + "description": "A string containing the name of the schema format that is used to define the information. If schemaFormat is missing, it MUST default to application/vnd.aai.asyncapi+json;version={{asyncapi}} where {{asyncapi}} matches the AsyncAPI Version String. In such a case, this would make the Multi Format Schema Object equivalent to the Schema Object. When using Reference Object within the schema, the schemaFormat of the resource being referenced MUST match the schemaFormat of the schema that contains the initial reference. For example, if you reference Avro schema, then schemaFormat of referencing resource and the resource being reference MUST match.", "anyOf": [ { "type": "string" @@ -48,7 +50,9 @@ } ] }, - "schema": {} + "schema": { + "description": "Definition of the message payload. It can be of any type but defaults to Schema Object. It MUST match the schema format defined in schemaFormat, including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string." + } }, "allOf": [ { diff --git a/definitions/3.0.0/oauth2Flow.json b/definitions/3.0.0/oauth2Flow.json index d3ca471b..41a48e04 100644 --- a/definitions/3.0.0/oauth2Flow.json +++ b/definitions/3.0.0/oauth2Flow.json @@ -1,28 +1,36 @@ { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "availableScopes": { - "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json" - } - }, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" + "type": "object", + "description": "Configuration details for a supported OAuth Flow", + "properties": { + "authorizationUrl": { + "type": "string", + "format": "uri", + "description": "The authorization URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "tokenUrl": { + "type": "string", + "format": "uri", + "description": "The token URL to be used for this flow. This MUST be in the form of an absolute URL." + }, + "refreshUrl": { + "type": "string", + "format": "uri", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL." + }, + "availableScopes": { + "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Scopes.json", + "description": "The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it." + } + }, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/oauth2Flow.json" + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" } \ No newline at end of file diff --git a/definitions/3.0.0/oauth2Flows.json b/definitions/3.0.0/oauth2Flows.json index 735806c8..e700efbc 100644 --- a/definitions/3.0.0/oauth2Flows.json +++ b/definitions/3.0.0/oauth2Flows.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Allows configuration of the supported OAuth Flows.", "required": [ "type", "flows" @@ -7,17 +8,20 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "oauth2" ] }, "description": { - "type": "string" - }, + "type": "string", + "description": "A short description for security scheme." + }, "flows": { "type": "object", "properties": { "implicit": { + "description": "Configuration for the OAuth Implicit flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -38,6 +42,7 @@ ] }, "password": { + "description": "Configuration for the OAuth Resource Owner Protected Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -58,6 +63,7 @@ ] }, "clientCredentials": { + "description": "Configuration for the OAuth Client Credentials flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" @@ -78,6 +84,7 @@ ] }, "authorizationCode": { + "description": "Configuration for the OAuth Authorization Code flow.", "allOf": [ { "$ref": "http://asyncapi.com/definitions/3.0.0/oauth2Flow.json" diff --git a/definitions/3.0.0/openIdConnect.json b/definitions/3.0.0/openIdConnect.json index 2150ba4d..41b65f5d 100644 --- a/definitions/3.0.0/openIdConnect.json +++ b/definitions/3.0.0/openIdConnect.json @@ -7,20 +7,23 @@ "properties": { "type": { "type": "string", + "description": "The type of the security scheme.", "enum": [ "openIdConnect" ] }, "description": { - "type": "string" + "type": "string", + "description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation." }, "openIdConnectUrl": { "type": "string", - "format": "uri" + "format": "uri", + "description": "OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL." }, "scopes": { "type": "array", - "description": "List of the needed scope names.", + "description": "List of the needed scope names. An empty array means no scopes are needed.", "items": { "type": "string" } diff --git a/definitions/3.0.0/operation.json b/definitions/3.0.0/operation.json index 3bcf7fea..03d2db05 100644 --- a/definitions/3.0.0/operation.json +++ b/definitions/3.0.0/operation.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes a specific operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -21,6 +22,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation. It MUST contain a subset of the messages defined in the channel referenced in this operation. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } @@ -37,6 +39,7 @@ }, "traits": { "type": "array", + "description": "A list of traits to apply to the operation object. Traits MUST be merged using traits merge mechanism. The resulting object MUST be a valid Operation Object.", "items": { "oneOf": [ { @@ -65,6 +68,7 @@ }, "tags": { "type": "array", + "description": "A list of tags for logical grouping and categorization of operations.", "items": { "oneOf": [ { @@ -91,6 +95,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/operationBindingsObject.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operation.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operation.json" } \ No newline at end of file diff --git a/definitions/3.0.0/operationBindingsObject.json b/definitions/3.0.0/operationBindingsObject.json index 8f629437..32f50c75 100644 --- a/definitions/3.0.0/operationBindingsObject.json +++ b/definitions/3.0.0/operationBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for an operation.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/operationReply.json b/definitions/3.0.0/operationReply.json index 2cf7c0e9..fe1491d9 100644 --- a/definitions/3.0.0/operationReply.json +++ b/definitions/3.0.0/operationReply.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -22,6 +23,7 @@ }, "messages": { "type": "array", + "description": "A list of $ref pointers pointing to the supported Message Objects that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the channel referenced in this operation reply. Every message processed by this operation MUST be valid against one, and only one, of the message objects referenced in this list. Please note the messages property value MUST be a list of Reference Objects and, therefore, MUST NOT contain Message Objects. However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience.", "items": { "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" } diff --git a/definitions/3.0.0/operationReplyAddress.json b/definitions/3.0.0/operationReplyAddress.json index dd7d0e2c..937744d3 100644 --- a/definitions/3.0.0/operationReplyAddress.json +++ b/definitions/3.0.0/operationReplyAddress.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "An object that specifies where an operation has to send the reply", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -20,6 +21,9 @@ "description": "An optional description of the address. CommonMark is allowed." } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operationReplyAddress.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operationReplyAddress.json" } \ No newline at end of file diff --git a/definitions/3.0.0/operationTrait.json b/definitions/3.0.0/operationTrait.json index 986f4796..4a03ee65 100644 --- a/definitions/3.0.0/operationTrait.json +++ b/definitions/3.0.0/operationTrait.json @@ -1,34 +1,45 @@ { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" - }, - "summary": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" - }, - "description": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" - }, - "security": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" - }, - "tags": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" - }, - "externalDocs": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" - } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" + "type": "object", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "title": { + "description": "A human-friendly title for the operation.", + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/title" + }, + "summary": { + "description": "A short summary of what the operation is about.", + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/summary" + }, + "description": { + "description": "A verbose explanation of the operation. CommonMark syntax can be used for rich text representation.", + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/description" + }, + "security": { + "description": "A declaration of which security schemes are associated with this operation. Only one of the security scheme objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied.", + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/security" + }, + "tags": { + "description": "A list of tags for logical grouping and categorization of operations.", + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/tags" + }, + "externalDocs": { + "description": "Additional external documentation for this operation.", + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/externalDocs" + }, + "bindings": { + "description": "A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation.", + "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/bindings" + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operationTrait.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json" } \ No newline at end of file diff --git a/definitions/3.0.0/operations.json b/definitions/3.0.0/operations.json index 7d44877f..c1097e32 100644 --- a/definitions/3.0.0/operations.json +++ b/definitions/3.0.0/operations.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Holds a dictionary with all the operations this application MUST implement.", "additionalProperties": { "oneOf": [ { @@ -10,6 +11,9 @@ } ] }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/operations.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/operations.json" } \ No newline at end of file diff --git a/definitions/3.0.0/parameter.json b/definitions/3.0.0/parameter.json index f483a9c9..2f1afc8e 100644 --- a/definitions/3.0.0/parameter.json +++ b/definitions/3.0.0/parameter.json @@ -1,4 +1,5 @@ { + "description": "Describes a parameter included in a channel address.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { @@ -11,18 +12,18 @@ "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." }, "enum": { - "description": "A list of allowed values for the parameter.", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", "type": "array", "items": { "type": "string" } }, "default": { - "description": "The default value to use for the parameter.", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied.", "type": "string" }, "examples": { - "description": "List of example values to use for the parameter.", + "description": "An array of examples of the parameter value.", "type": "array", "items": { "type": "string" @@ -34,6 +35,9 @@ "pattern": "^\\$message\\.(header|payload)#(\\/(([^\\/~])|(~[01]))*)*" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/parameter.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/parameter.json" } \ No newline at end of file diff --git a/definitions/3.0.0/parameters.json b/definitions/3.0.0/parameters.json index 19193781..349d93b8 100644 --- a/definitions/3.0.0/parameters.json +++ b/definitions/3.0.0/parameters.json @@ -1,16 +1,19 @@ { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" - } - ] - }, - "description": "JSON objects describing re-usable channel parameters.", - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json" + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/parameter.json" + } + ] + }, + "description": "JSON objects describing re-usable channel parameters.", + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/parameters.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/parameters.json" } \ No newline at end of file diff --git a/definitions/3.0.0/schema.json b/definitions/3.0.0/schema.json index 7f08ab44..054bbc9b 100644 --- a/definitions/3.0.0/schema.json +++ b/definitions/3.0.0/schema.json @@ -1,4 +1,5 @@ { + "description": "The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 07. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.", "allOf": [ { "$ref": "http://json-schema.org/draft-07/schema#" @@ -81,7 +82,8 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/schema.json" }, "discriminator": { - "type": "string" + "type": "string", + "description": "Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it. See Composition and Inheritance for more details." }, "externalDocs": { "oneOf": [ @@ -95,6 +97,7 @@ }, "deprecated": { "type": "boolean", + "description": "Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is false.", "default": false } } diff --git a/definitions/3.0.0/server.json b/definitions/3.0.0/server.json index 17540811..28b2ef5d 100644 --- a/definitions/3.0.0/server.json +++ b/definitions/3.0.0/server.json @@ -1,78 +1,79 @@ { - "type": "object", - "description": "An object representing a Server.", - "required": [ - "host", - "protocol" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "host": { - "type": "string", - "description": "The server host name." - }, - "pathname": { - "type": "string", - "description": "The path to a resource in the host." - }, - "title": { - "type": "string", - "description": "A human-friendly title for the server." - }, - "summary": { - "type": "string", - "description": "A brief summary of the server." - }, - "description": { - "type": "string", - "description": "A longer description of the server. CommonMark is allowed." - }, - "protocol": { - "type": "string", - "description": "The transfer protocol." - }, - "protocolVersion": { - "type": "string" - }, - "variables": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" - }, - "security": { - "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" - }, - "tags": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] - }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" - } - ] - }, - "bindings": { - "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" - } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/server.json" + "type": "object", + "description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data.", + "required": ["host", "protocol"], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "host": { + "type": "string", + "description": "The server host name. It MAY include the port. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." + }, + "pathname": { + "type": "string", + "description": "The path to a resource in the host. This field supports Server Variables. Variable substitutions will be made when a variable is named in {braces}." + }, + "title": { + "type": "string", + "description": "A human-friendly title for the server." + }, + "summary": { + "type": "string", + "description": "A brief summary of the server." + }, + "description": { + "type": "string", + "description": "A longer description of the server. CommonMark is allowed." + }, + "protocol": { + "type": "string", + "description": "The protocol this server supports for connection." + }, + "protocolVersion": { + "type": "string", + "description": "An optional string describing the server. CommonMark syntax MAY be used for rich text representation." + }, + "variables": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverVariables.json" + }, + "security": { + "$ref": "http://asyncapi.com/definitions/3.0.0/securityRequirements.json" + }, + "tags": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] + }, + "bindings": { + "$ref": "http://asyncapi.com/definitions/3.0.0/serverBindingsObject.json" + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/server.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/server.json" } \ No newline at end of file diff --git a/definitions/3.0.0/serverBindingsObject.json b/definitions/3.0.0/serverBindingsObject.json index 5782a1c5..8eb72002 100644 --- a/definitions/3.0.0/serverBindingsObject.json +++ b/definitions/3.0.0/serverBindingsObject.json @@ -1,5 +1,6 @@ { "type": "object", + "description": "Map describing protocol-specific definitions for a server.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/definitions/3.0.0/serverVariable.json b/definitions/3.0.0/serverVariable.json index 9ef8f966..df4fbdda 100644 --- a/definitions/3.0.0/serverVariable.json +++ b/definitions/3.0.0/serverVariable.json @@ -1,33 +1,40 @@ { - "type": "object", - "description": "An object representing a Server Variable for server URL template substitution.", - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - }, - "examples": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" + "type": "object", + "description": "An object representing a Server Variable for server URL template substitution.", + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } + }, + "properties": { + "enum": { + "type": "array", + "description": "An enumeration of string values to be used if the substitution options are from a limited set.", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + "default": { + "type": "string", + "description": "The default value to use for substitution, and to send, if an alternate value is not supplied." + }, + "description": { + "type": "string", + "description": "An optional description for the server variable. CommonMark syntax MAY be used for rich text representation." + }, + "examples": { + "type": "array", + "description": "An array of examples of the server variable.", + "items": { + "type": "string" + } + } + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/serverVariable.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/serverVariable.json" } \ No newline at end of file diff --git a/definitions/3.0.0/servers.json b/definitions/3.0.0/servers.json index 921b4ed4..8283e885 100644 --- a/definitions/3.0.0/servers.json +++ b/definitions/3.0.0/servers.json @@ -1,16 +1,19 @@ { - "description": "An object representing multiple servers.", - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" - } - ] - }, - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://asyncapi.com/definitions/3.0.0/servers.json" + "description": "An object representing multiple servers.", + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/server.json" + } + ] + }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/servers.json" + }, + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://asyncapi.com/definitions/3.0.0/servers.json" } \ No newline at end of file diff --git a/definitions/3.0.0/symmetricEncryption.json b/definitions/3.0.0/symmetricEncryption.json index 4fb69278..e218cb06 100644 --- a/definitions/3.0.0/symmetricEncryption.json +++ b/definitions/3.0.0/symmetricEncryption.json @@ -19,6 +19,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/symmetricEncryption.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/symmetricEncryption.json" diff --git a/definitions/3.0.0/tag.json b/definitions/3.0.0/tag.json index 135fd63b..13cee649 100644 --- a/definitions/3.0.0/tag.json +++ b/definitions/3.0.0/tag.json @@ -1,15 +1,18 @@ { "type": "object", + "description": "Allows adding meta data to a single tag.", "additionalProperties": false, "required": [ "name" ], "properties": { "name": { - "type": "string" + "type": "string", + "description": "The name of the tag." }, "description": { - "type": "string" + "type": "string", + "description": "A short description for the tag. CommonMark syntax can be used for rich text representation." }, "externalDocs": { "oneOf": [ @@ -27,6 +30,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/tag.json" + }, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/tag.json" } \ No newline at end of file diff --git a/definitions/3.0.0/userPassword.json b/definitions/3.0.0/userPassword.json index aeaa22d0..5e6682df 100644 --- a/definitions/3.0.0/userPassword.json +++ b/definitions/3.0.0/userPassword.json @@ -19,6 +19,9 @@ "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" } }, + "example": { + "$ref": "http://asyncapi.com/examples/3.0.0/userPassword.json" + }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#", "$id": "http://asyncapi.com/definitions/3.0.0/userPassword.json" diff --git a/examples/.DS_Store b/examples/.DS_Store new file mode 100644 index 00000000..66097676 Binary files /dev/null and b/examples/.DS_Store differ diff --git a/examples/3.0.0/APIKeyHTTPSecurityScheme.json b/examples/3.0.0/APIKeyHTTPSecurityScheme.json new file mode 100644 index 00000000..e1bddc93 --- /dev/null +++ b/examples/3.0.0/APIKeyHTTPSecurityScheme.json @@ -0,0 +1,7 @@ +[ + { + "type": "httpApiKey", + "name": "api_key", + "in": "header" + } +] \ No newline at end of file diff --git a/examples/3.0.0/ReferenceObject.json b/examples/3.0.0/ReferenceObject.json new file mode 100644 index 00000000..1bc58e64 --- /dev/null +++ b/examples/3.0.0/ReferenceObject.json @@ -0,0 +1,3 @@ +[{ + "$ref": "#/components/schemas/Pet" +}] \ No newline at end of file diff --git a/examples/3.0.0/Sasl.json b/examples/3.0.0/Sasl.json new file mode 100644 index 00000000..85ea380b --- /dev/null +++ b/examples/3.0.0/Sasl.json @@ -0,0 +1,5 @@ +[ + { + "type": "scramSha512" + } +] \ No newline at end of file diff --git a/examples/3.0.0/SecurityScheme.json b/examples/3.0.0/SecurityScheme.json new file mode 100644 index 00000000..eb52bb8b --- /dev/null +++ b/examples/3.0.0/SecurityScheme.json @@ -0,0 +1,5 @@ +[ + { + "type": "userPassword" + } +] \ No newline at end of file diff --git a/examples/3.0.0/X509.json b/examples/3.0.0/X509.json new file mode 100644 index 00000000..690ba0a2 --- /dev/null +++ b/examples/3.0.0/X509.json @@ -0,0 +1,5 @@ +[ + { + "type": "X509" + } +] \ No newline at end of file diff --git a/examples/3.0.0/apiKey.json b/examples/3.0.0/apiKey.json new file mode 100644 index 00000000..5ae19cc0 --- /dev/null +++ b/examples/3.0.0/apiKey.json @@ -0,0 +1,6 @@ +[ + { + "type": "apiKey", + "in": "user" + } +] diff --git a/examples/3.0.0/channel.json b/examples/3.0.0/channel.json new file mode 100644 index 00000000..0fc0dab0 --- /dev/null +++ b/examples/3.0.0/channel.json @@ -0,0 +1,40 @@ +[{ + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { "$ref": "#/servers/rabbitmqInProd" }, + { "$ref": "#/servers/rabbitmqInStaging" } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [ + { + "name": "user", + "description": "User-related messages" + } + ], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } +}] \ No newline at end of file diff --git a/examples/3.0.0/channels.json b/examples/3.0.0/channels.json new file mode 100644 index 00000000..b9aeb6a6 --- /dev/null +++ b/examples/3.0.0/channels.json @@ -0,0 +1,12 @@ +[ + { + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } + } +] diff --git a/examples/3.0.0/components.json b/examples/3.0.0/components.json new file mode 100644 index 00000000..c0331a88 --- /dev/null +++ b/examples/3.0.0/components.json @@ -0,0 +1,130 @@ +[{ + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": ["5671", "5672"], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/contact.json b/examples/3.0.0/contact.json new file mode 100644 index 00000000..1c81a963 --- /dev/null +++ b/examples/3.0.0/contact.json @@ -0,0 +1,8 @@ +[ + { + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" + } + +] \ No newline at end of file diff --git a/examples/3.0.0/correlationId.json b/examples/3.0.0/correlationId.json new file mode 100644 index 00000000..82d8a96e --- /dev/null +++ b/examples/3.0.0/correlationId.json @@ -0,0 +1,4 @@ +[{ + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" +}] \ No newline at end of file diff --git a/examples/3.0.0/externalDocs.json b/examples/3.0.0/externalDocs.json new file mode 100644 index 00000000..18c3766a --- /dev/null +++ b/examples/3.0.0/externalDocs.json @@ -0,0 +1,4 @@ +[{ + "description": "Find more info here", + "url": "https://example.com" +}] \ No newline at end of file diff --git a/examples/3.0.0/info.json b/examples/3.0.0/info.json new file mode 100644 index 00000000..26bcdf95 --- /dev/null +++ b/examples/3.0.0/info.json @@ -0,0 +1,27 @@ +[ + { + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] + } + +] \ No newline at end of file diff --git a/examples/3.0.0/license.json b/examples/3.0.0/license.json new file mode 100644 index 00000000..18becf4f --- /dev/null +++ b/examples/3.0.0/license.json @@ -0,0 +1,7 @@ +[ + { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + } + +] \ No newline at end of file diff --git a/examples/3.0.0/messageObject.json b/examples/3.0.0/messageObject.json new file mode 100644 index 00000000..9243d026 --- /dev/null +++ b/examples/3.0.0/messageObject.json @@ -0,0 +1,58 @@ +[ +{ + "messageId": "userSignup", + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [{ "$ref": "#/components/messageTraits/commonHeaders" }], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] +} +] \ No newline at end of file diff --git a/examples/3.0.0/messageTrait.json b/examples/3.0.0/messageTrait.json new file mode 100644 index 00000000..5126ee4a --- /dev/null +++ b/examples/3.0.0/messageTrait.json @@ -0,0 +1,3 @@ +[ { + "contentType": "application/json" +} ] \ No newline at end of file diff --git a/examples/3.0.0/oauth2Flow.json b/examples/3.0.0/oauth2Flow.json new file mode 100644 index 00000000..0f8b4083 --- /dev/null +++ b/examples/3.0.0/oauth2Flow.json @@ -0,0 +1,8 @@ +[{ + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operation.json b/examples/3.0.0/operation.json new file mode 100644 index 00000000..bdddeb81 --- /dev/null +++ b/examples/3.0.0/operation.json @@ -0,0 +1,31 @@ +[{ + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": ["write:pets", "read:pets"] + } + ], + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [{ "$ref": "#/components/operationTraits/kafka" }], + "messages": [{ "$ref": "/components/messages/userSignedUp" }], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [{ "$ref": "/components/messages/userSignedUpReply" }] + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operationReplyAddress.json b/examples/3.0.0/operationReplyAddress.json new file mode 100644 index 00000000..53a7a78b --- /dev/null +++ b/examples/3.0.0/operationReplyAddress.json @@ -0,0 +1,4 @@ +[{ + "description": "Consumer inbox", + "location": "$message.header#/replyTo" +}] \ No newline at end of file diff --git a/examples/3.0.0/operationTrait.json b/examples/3.0.0/operationTrait.json new file mode 100644 index 00000000..98e8dbf5 --- /dev/null +++ b/examples/3.0.0/operationTrait.json @@ -0,0 +1,7 @@ +[{ + "bindings": { + "amqp": { + "ack": false + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/operations.json b/examples/3.0.0/operations.json new file mode 100644 index 00000000..a623a01a --- /dev/null +++ b/examples/3.0.0/operations.json @@ -0,0 +1,18 @@ +[{ + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [{ "name": "user" }, { "name": "signup" }, { "name": "register" }], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [{ "$ref": "#/components/operationTraits/kafka" }] + } +}] \ No newline at end of file diff --git a/examples/3.0.0/parameter.json b/examples/3.0.0/parameter.json new file mode 100644 index 00000000..45e25436 --- /dev/null +++ b/examples/3.0.0/parameter.json @@ -0,0 +1,9 @@ +[{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/parameters.json b/examples/3.0.0/parameters.json new file mode 100644 index 00000000..ad7bc889 --- /dev/null +++ b/examples/3.0.0/parameters.json @@ -0,0 +1,8 @@ +[{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } +}] \ No newline at end of file diff --git a/examples/3.0.0/server.json b/examples/3.0.0/server.json new file mode 100644 index 00000000..3868a102 --- /dev/null +++ b/examples/3.0.0/server.json @@ -0,0 +1,14 @@ +[ + { + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" + }, + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." + } +] diff --git a/examples/3.0.0/serverVariable.json b/examples/3.0.0/serverVariable.json new file mode 100644 index 00000000..467af35f --- /dev/null +++ b/examples/3.0.0/serverVariable.json @@ -0,0 +1,14 @@ +[ + { + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": ["production", "staging"] + } + } + } +] diff --git a/examples/3.0.0/servers.json b/examples/3.0.0/servers.json new file mode 100644 index 00000000..be5bd9a1 --- /dev/null +++ b/examples/3.0.0/servers.json @@ -0,0 +1,38 @@ +[ { + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } +} ] \ No newline at end of file diff --git a/examples/3.0.0/symmetricEncryption.json b/examples/3.0.0/symmetricEncryption.json new file mode 100644 index 00000000..cd4a9731 --- /dev/null +++ b/examples/3.0.0/symmetricEncryption.json @@ -0,0 +1,3 @@ +[{ + "type": "symmetricEncryption" +}] \ No newline at end of file diff --git a/examples/3.0.0/tag.json b/examples/3.0.0/tag.json new file mode 100644 index 00000000..4258baa6 --- /dev/null +++ b/examples/3.0.0/tag.json @@ -0,0 +1,4 @@ +[{ + "name": "user", + "description": "User-related messages" +}] \ No newline at end of file diff --git a/examples/3.0.0/userPassword.json b/examples/3.0.0/userPassword.json new file mode 100644 index 00000000..eb52bb8b --- /dev/null +++ b/examples/3.0.0/userPassword.json @@ -0,0 +1,5 @@ +[ + { + "type": "userPassword" + } +] \ No newline at end of file