From 06cd2878b810a636849437f34c366a65b0047048 Mon Sep 17 00:00:00 2001 From: Muhammad Rafly Andrianza Date: Tue, 26 Apr 2022 21:42:44 +0700 Subject: [PATCH 1/3] docs: change misspelling at the next and back button and fix 404 not found button result (#685) --- pages/docs/specifications/v2.2.0.md | 4 ++-- pages/docs/tutorials/streetlights-interactive.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/docs/specifications/v2.2.0.md b/pages/docs/specifications/v2.2.0.md index 28a37301c9f8..b8cb4003da38 100644 --- a/pages/docs/specifications/v2.2.0.md +++ b/pages/docs/specifications/v2.2.0.md @@ -2419,8 +2419,8 @@ password | `string` | `password` | Used to hint UIs the input needs to be obscur Date: Tue, 26 Apr 2022 18:43:18 +0200 Subject: [PATCH 2/3] docs(spec): update latest specification (#697) --- .../v2.4.0-2022-04-release.4.md | 78 ++++--------------- 1 file changed, 15 insertions(+), 63 deletions(-) diff --git a/pages/docs/specifications/v2.4.0-2022-04-release.4.md b/pages/docs/specifications/v2.4.0-2022-04-release.4.md index 6ddb69f746f8..27b95d1136ee 100644 --- a/pages/docs/specifications/v2.4.0-2022-04-release.4.md +++ b/pages/docs/specifications/v2.4.0-2022-04-release.4.md @@ -4,7 +4,7 @@ Part of this content has been taken from the great work done by the folks at the [OpenAPI Initiative](https://openapis.org). Mainly because **it's a great work** and we want to keep as much compatibility as possible with the [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification). -#### Version 2.4.0 +#### Version 2.3.0 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). @@ -33,20 +33,23 @@ It means that the [application](#definitionsApplication) allows [consumers](#def ## Definitions +#### Server +A server MAY be a message broker that is capable of sending and/or receiving between a [producer](#definitionsProducer) and [consumer](#definitionsConsumer). A server MAY be a service with WebSocket API that enables message-driven communication between browser-to-server or server-to-server. + #### Application -An application is any kind of computer program or a group of them. It MUST be a [producer](#definitionsProducer), a [consumer](#definitionsConsumer) or both. An application MAY be a microservice, IoT device (sensor), mainframe process, etc. An application MAY be written in any number of different programming languages as long as they support the selected [protocol](#definitionsProtocol). An application MUST also use a protocol supported by the server in order to connect and exchange [messages](#definitionsMessage). +An application is any kind of computer program or a group of them. It MUST be a [producer](#definitionsProducer), a [consumer](#definitionsConsumer) or both. An application MAY be a microservice, IoT device (sensor), mainframe process, etc. An application MAY be written in any number of different programming languages as long as they support the selected [protocol](#definitionsProtocol). An application MUST also use a protocol supported by the [server](#definitionsServer) in order to connect and exchange [messages](#definitionsMessage). #### Producer -A producer is a type of application, connected to a server, that is creating [messages](#definitionsMessage) and addressing them to [channels](#definitionsChannel). A producer MAY be publishing to multiple channels depending on the server, protocol, and use-case pattern. +A producer is a type of application, connected to a [server](#definitionsServer), that is creating [messages](#definitionsMessage) and addressing them to [channels](#definitionsChannel). A producer MAY be publishing to multiple channels depending on the [server](#definitionsServer), protocol, and use-case pattern. #### Consumer -A consumer is a type of application, connected to a server via a supported [protocol](#definitionsProtocol), that is consuming [messages](#definitionsMessage) from [channels](#definitionsChannel). A consumer MAY be consuming from multiple channels depending on the server, protocol, and the use-case pattern. +A consumer is a type of application, connected to a [server](#definitionsServer) via a supported [protocol](#definitionsProtocol), that is consuming [messages](#definitionsMessage) from [channels](#definitionsChannel). A consumer MAY be consuming from multiple channels depending on the [server](#definitionsServer), protocol, and the use-case pattern. #### Message -A message is the mechanism by which information is exchanged via a channel between servers and applications. A message MUST contain a payload and MAY also contain headers. The headers MAY be subdivided into [protocol](#definitionsProtocol)-defined headers and header properties defined by the application which can act as supporting metadata. The payload contains the data, defined by the application, which MUST be serialized into a format (JSON, XML, Avro, binary, etc.). Since a message is a generic mechanism, it can support multiple interaction patterns such as event, command, request, or response. +A message is the mechanism by which information is exchanged via a channel between [servers](#definitionsServer) and applications. A message MUST contain a payload and MAY also contain headers. The headers MAY be subdivided into [protocol](#definitionsProtocol)-defined headers and header properties defined by the application which can act as supporting metadata. The payload contains the data, defined by the application, which MUST be serialized into a format (JSON, XML, Avro, binary, etc.). Since a message is a generic mechanism, it can support multiple interaction patterns such as event, command, request, or response. #### Channel -A channel is an addressable component, made available by the server, for the organization of [messages](#definitionsMessage). [Producer](#definitionsProducer) applications send messages to channels and [consumer](#definitionsConsumer) applications consume messages from channels. Servers MAY support many channel instances, allowing messages with different content to be addressed to different channels. Depending on the server implementation, the channel MAY be included in the message via protocol-defined headers. +A channel is an addressable component, made available by the [server](#definitionsServer), for the organization of [messages](#definitionsMessage). [Producer](#definitionsProducer) applications send messages to channels and [consumer](#definitionsConsumer) applications consume messages from channels. [Servers](#definitionsServer) MAY support many channel instances, allowing messages with different content to be addressed to different channels. Depending on the [server](#definitionsServer) implementation, the channel MAY be included in the message via protocol-defined headers. #### Protocol A protocol is the mechanism (wireline protocol or API) by which [messages](#definitionsMessage) are exchanged between the application and the [channel](#definitionsChannel). Example protocols include, but are not limited to, AMQP, HTTP, JMS, Kafka, Anypoint MQ, MQTT, Solace, STOMP, Mercure, WebSocket. @@ -268,7 +271,7 @@ The Servers Object is a map of [Server Objects](#serverObject). Field Pattern | Type | Description ---|:---:|--- -`^[A-Za-z0-9_\-]+$` | [Server Object](#serverObject) \| [Reference Object](#referenceObject) | The definition of a server this application MAY connect to. +`^[A-Za-z0-9_\-]+$` | [Server Object](#serverObject) | The definition of a server this application MAY connect to. ##### Servers Object Example @@ -652,8 +655,7 @@ Field Name | Type | Description ---|:---:|--- operationId | `string` | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. summary | `string` | A short summary of what the operation is about. -description | `string` | A verbose explanation of the operation. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation. -security | [[Security Requirement Object](#securityRequirementObject)]| A declaration of which security mechanisms are associated with this operation. Only one of the security requirement objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied. +description | `string` | A verbose explanation of the operation. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. tags | [Tags Object](#tagsObject) | A list of tags for API documentation control. Tags can be used for logical grouping of operations. externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this operation. bindings | [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation. @@ -669,14 +671,6 @@ This object can be extended with [Specification Extensions](#specificationExtens "operationId": "registerUser", "summary": "Action to sign a user up.", "description": "A longer description", - "security": [ - { - "petstore_auth": [ - "write:pets", - "read:pets" - ] - } - ], "tags": [ { "name": "user" }, { "name": "signup" }, @@ -719,10 +713,6 @@ This object can be extended with [Specification Extensions](#specificationExtens operationId: registerUser summary: Action to sign a user up. description: A longer description -security: - - petstore_auth: - - write:pets - - read:pets tags: - name: user - name: signup @@ -764,7 +754,6 @@ Field Name | Type | Description operationId | `string` | Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is **case-sensitive**. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. summary | `string` | A short summary of what the operation is about. description | `string` | A verbose explanation of the operation. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -security | [[Security Requirement Object](#securityRequirementObject)]| A declaration of which security mechanisms are associated with this operation. Only one of the security requirement objects MUST be satisfied to authorize an operation. In cases where Server Security also applies, it MUST also be satisfied. tags | [Tags Object](#tagsObject) | A list of tags for API documentation control. Tags can be used for logical grouping of operations. externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this operation. bindings | [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation. @@ -1027,7 +1016,6 @@ Describes a message received on a given channel and operation. Field Name | Type | Description ---|:---:|--- -messageId | `string` | 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. headers | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. payload | `any` | Definition of the message payload. It can be of any type but defaults to [Schema object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. @@ -1051,7 +1039,7 @@ The following table contains a set of values that every implementation MUST supp Name | Allowed values | Notes ---|:---:|--- -[AsyncAPI 2.4.0 Schema Object](#schemaObject) | `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` | This is the default when a `schemaFormat` is not provided. +[AsyncAPI 2.3.0 Schema Object](#schemaObject) | `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` | This is the default when a `schemaFormat` is not provided. [JSON Schema Draft 07](https://json-schema.org/specification-links.html#draft-7) | `application/schema+json;version=draft-07`, `application/schema+yaml;version=draft-07` | The following table contains a set of values that every implementation is RECOMMENDED to support. @@ -1067,7 +1055,6 @@ Name | Allowed values | Notes ```json { - "messageId": "userSignup", "name": "UserSignup", "title": "User signup", "summary": "Action to sign a user up.", @@ -1131,7 +1118,6 @@ Name | Allowed values | Notes ``` ```yaml -messageId: userSignup name: UserSignup title: User signup summary: Action to sign a user up. @@ -1179,7 +1165,6 @@ Example using Avro to define the payload: ```json { - "messageId": "userSignup", "name": "UserSignup", "title": "User signup", "summary": "Action to sign a user up.", @@ -1197,7 +1182,6 @@ Example using Avro to define the payload: ``` ```yaml -messageId: userSignup name: UserSignup title: User signup summary: Action to sign a user up. @@ -1227,7 +1211,6 @@ If you're looking to apply traits to an operation, see the [Operation Trait Obje Field Name | Type | Description ---|:---:|--- -messageId | `string` | 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. headers | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. schemaFormat | `string` | A string containing the name of the schema format/language used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). @@ -1408,7 +1391,6 @@ Field Name | Type | Description ---|:---|--- schemas | Map[`string`, [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject). servers | Map[`string`, [Server Object](#serverObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Objects](#serverObject). - serverVariables | Map[`string`, [Server Variable Object](#serverVariableObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Variable Objects](#serverVariableObject). channels | Map[`string`, [Channel Item Object](#channelItemObject)] | An object to hold reusable [Channel Item Objects](#channelItemObject). messages | Map[`string`, [Message Object](#messageObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Message Objects](#messageObject). securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject). @@ -1468,28 +1450,10 @@ my.org.User }, "servers": { "development": { - "url": "{stage}.gigantic-server.com:{port}", + "url": "development.gigantic-server.com", "description": "Development server", "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 `gigantic-server.com`" - }, - "port": { - "enum": ["8883", "8884"], - "default": "8883" + "protocolVersion": "0.9.1" } }, "channels": { @@ -1588,22 +1552,10 @@ components: type: string servers: development: - url: "{stage}.gigantic-server.com:{port}" + url: development.gigantic-server.com description: Development server 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 `gigantic-server.com` - port: - enum: [8883, 8884] - default: 8883 channels: user/signedup: subscribe: From fd34d37b93346d33432c28454b46fe44ea6d7ecf Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 26 Apr 2022 19:05:47 +0200 Subject: [PATCH 3/3] ci: update generic workflows (#698) --- .github/workflows/add-good-first-issue-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-good-first-issue-labels.yml b/.github/workflows/add-good-first-issue-labels.yml index 00acdb847097..dee10e7266c1 100644 --- a/.github/workflows/add-good-first-issue-labels.yml +++ b/.github/workflows/add-good-first-issue-labels.yml @@ -21,7 +21,7 @@ jobs: github-token: ${{ secrets.GH_TOKEN }} script: | const areas = ['javascript', 'typescript', 'java' , 'go', 'docs', 'ci-cd', 'design']; - const values = context.payload.comment.body.split(" "); + const values = context.payload.comment.body.trim().split(" "); switch(values[1]){ case 'ts': values[1] = 'typescript';