From 47b462b66123c8fcd08e13f3830b583e1e1944f2 Mon Sep 17 00:00:00 2001 From: Kirill Efimov Date: Thu, 11 Apr 2024 15:34:22 +0300 Subject: [PATCH] fix(test): update snapshots --- .../__snapshots__/AsyncAPI.test.js.snap | 141 ++++++++++++++++++ .../__snapshots__/Operations.test.js.snap | 46 +++++- 2 files changed, 184 insertions(+), 3 deletions(-) diff --git a/test/components/__snapshots__/AsyncAPI.test.js.snap b/test/components/__snapshots__/AsyncAPI.test.js.snap index 73e133aa2..ee7f57801 100644 --- a/test/components/__snapshots__/AsyncAPI.test.js.snap +++ b/test/components/__snapshots__/AsyncAPI.test.js.snap @@ -378,6 +378,14 @@ The Smartylighting Streetlights API allows you to remotely manage the city light * [Servers](#servers) * [production](#production-server) +* [Operations](#operations) + * [RECEIVE smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured](#receive-smartylightingstreetlights10eventstreetlightidlightingmeasured-operation) + * [SEND smartylighting/streetlights/1/0/action/{streetlightId}/turn/on](#send-smartylightingstreetlights10actionstreetlightidturnon-operation) + * [SEND smartylighting/streetlights/1/0/action/{streetlightId}/turn/off](#send-smartylightingstreetlights10actionstreetlightidturnoff-operation) + * [SEND smartylighting/streetlights/1/0/action/{streetlightId}/dim](#send-smartylightingstreetlights10actionstreetlightiddim-operation) + * [SEND some.channel](#send-somechannel-operation) + * [REPLY someRequest](#reply-somerequest-operation) + * [REQUEST someRequest](#request-somerequest-operation) ## Servers @@ -438,6 +446,7 @@ On multiple lines. *Inform about environmental lighting conditions of a particular streetlight.* +* Message ID: \`receiveLightMeasurement.message\` * Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) ##### Headers @@ -508,6 +517,7 @@ On multiple lines. *Command a particular streetlight to turn the lights on or off.* +* Message ID: \`turnOn.message\` * Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) ##### Headers @@ -568,6 +578,7 @@ On multiple lines. *Command a particular streetlight to turn the lights on or off.* +* Message ID: \`turnOn.message\` * Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) ##### Headers @@ -628,6 +639,7 @@ On multiple lines. *Command a particular streetlight to dim the lights.* +* Message ID: \`dimLight.message\` * Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) ##### Headers @@ -675,6 +687,7 @@ Sending **one of** the following messages: #### Message \`Success\` +* Message ID: \`subscribe.message.0\` * Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) ##### Payload @@ -695,6 +708,7 @@ Sending **one of** the following messages: #### Message \`Failure\` +* Message ID: \`subscribe.message.1\` * Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) ##### Payload @@ -715,5 +729,132 @@ Sending **one of** the following messages: \\"errorMessage\\": \\"Something messed up\\" } } +\`\`\` + + + +### REPLY \`someRequest\` Operation + +* Operation ID: \`createSomeRequest\` + +##### Operation tags + +| Name | Description | Documentation | +|---|---|---| +| response-reply | - | - | + +#### Message \`SomeRequestReceive\` + +* Message ID: \`SomeRequestReceive\` +* Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) +* Correlation ID: \`$message.payload#/replyTo\` + +##### Payload + +| Name | Type | Description | Value | Constraints | Notes | +|---|---|---|---|---|---| +| (root) | object | - | - | - | **additional properties are allowed** | +| someId | integer | - | - | - | - | +| someText | string | - | examples (\`\\"some important text\\"\`) | - | - | + +> Examples of payload _(generated)_ + +\`\`\`json +{ + \\"someId\\": 0, + \\"someText\\": \\"some important text\\" +} +\`\`\` + + +#### Response information + +#### Operation reply address information + +* Operation reply address location: \`$message.payload#/replyTo\` + +#### Message \`SomeRequestSend\` + +* Message ID: \`SomeRequestSend\` +* Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) +* Correlation ID: \`$message.payload#/replyTo\` + +##### Payload + +| Name | Type | Description | Value | Constraints | Notes | +|---|---|---|---|---|---| +| (root) | object | - | - | - | **additional properties are allowed** | +| someId | integer | - | - | - | - | + +> Examples of payload _(generated)_ + +\`\`\`json +{ + \\"someId\\": 0 +} +\`\`\` + + + + +### REQUEST \`someRequest\` Operation + +* Operation ID: \`createSomeSendRequest\` + +##### Operation tags + +| Name | Description | Documentation | +|---|---|---| +| request-reply | - | - | + +#### Message \`SomeRequestSend\` + +* Message ID: \`SomeRequestReceive\` +* Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) +* Correlation ID: \`$message.payload#/replyTo\` + +##### Payload + +| Name | Type | Description | Value | Constraints | Notes | +|---|---|---|---|---|---| +| (root) | object | - | - | - | **additional properties are allowed** | +| someId | integer | - | - | - | - | + +> Examples of payload _(generated)_ + +\`\`\`json +{ + \\"someId\\": 0 +} +\`\`\` + + +#### Request information + +#### Operation reply address information + +* Operation reply address location: \`$message.payload#/replyTo\` + +#### Message \`SomeRequestReceive\` + +* Message ID: \`SomeSendRequestReply\` +* Content type: [application/json](https://www.iana.org/assignments/media-types/application/json) +* Correlation ID: \`$message.payload#/replyTo\` + +##### Payload + +| Name | Type | Description | Value | Constraints | Notes | +|---|---|---|---|---|---| +| (root) | object | - | - | - | **additional properties are allowed** | +| someId | integer | - | - | - | - | +| someText | string | - | examples (\`\\"some important text\\"\`) | - | - | + +> Examples of payload _(generated)_ + +\`\`\`json +{ + \\"someId\\": 0, + \\"someText\\": \\"some important text\\" +} \`\`\`" `; diff --git a/test/components/__snapshots__/Operations.test.js.snap b/test/components/__snapshots__/Operations.test.js.snap index a9d99bce6..a01dea0b2 100644 --- a/test/components/__snapshots__/Operations.test.js.snap +++ b/test/components/__snapshots__/Operations.test.js.snap @@ -80,7 +80,7 @@ This channel is used to exchange messages about users signing up |---|---|---|---|---|---| | groupId | string | - | allowed (\`\\"myGroupId\\"\`) | - | - | | clientId | string | - | allowed (\`\\"myClientId\\"\`) | - | - | -| bindingVersion | - | - | \`\\"0.1.0\\"\` | - | - | +| bindingVersion | - | - | \`\\"0.4.0\\"\` | - | - | #### Message \`SomeMessage\` @@ -265,7 +265,27 @@ A longer description of the message #### Response information -* should be done to channel: \`user/signedup\`" +* reply should be done to channel: \`user/signedup\` +#### Message \`SomeReplyMessage\` + +A longer description of the message + +##### Payload + +| Name | Type | Description | Value | Constraints | Notes | +|---|---|---|---|---|---| +| (root) | object | - | - | - | **additional properties are allowed** | +| user | string | - | - | - | - | +| signup | number | - | - | - | - | + +> Examples of payload _(generated)_ + +\`\`\`json +{ + \\"user\\": \\"string\\", + \\"signup\\": 0 +} +\`\`\`" `; exports[`Operations component for AsyncAPI v3 should render request operation 1`] = ` @@ -313,7 +333,27 @@ A longer description of the message #### Request information -* should be done to channel: \`user/signedup\`" +* request should be done to channel: \`user/signedup\` +#### Message \`SomeReplyMessage\` + +A longer description of the message + +##### Payload + +| Name | Type | Description | Value | Constraints | Notes | +|---|---|---|---|---|---| +| (root) | object | - | - | - | **additional properties are allowed** | +| user | string | - | - | - | - | +| signup | number | - | - | - | - | + +> Examples of payload _(generated)_ + +\`\`\`json +{ + \\"user\\": \\"string\\", + \\"signup\\": 0 +} +\`\`\`" `; exports[`Operations component for AsyncAPI v3 should render send operation 1`] = `