diff --git a/package-lock.json b/package-lock.json index c05f9dec4..6b6bf6601 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@asyncapi/generator-react-sdk": "^1.1.2", "@asyncapi/parser": "^3.1.0", - "@asyncapi/react-component": "^2.5.1", + "@asyncapi/react-component": "^2.6.5", "highlight.js": "10.7.3", "puppeteer": "^24.4.0", "react": "^18.3.1", @@ -746,9 +746,9 @@ } }, "node_modules/@asyncapi/protobuf-schema-parser": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.5.1.tgz", - "integrity": "sha512-rfSHrsJm+W5I10KhQGx2VZTBObw0w5fsMCcZJVSCV1E9YhKDUQkeH+78QBzuLdHtfo9ut90Ykx02wslpZlcu1A==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@asyncapi/protobuf-schema-parser/-/protobuf-schema-parser-3.6.0.tgz", + "integrity": "sha512-z6zVRAMi2bkkgjREoCIvUg7KcacyoEh+VIwQmEni/JPuPFMOD3oPv4kwoftEeiF2+gGiioeIxpkI5x7rmHf2Nw==", "license": "Apache-2.0", "dependencies": { "@asyncapi/parser": "^3.4.0", @@ -772,15 +772,15 @@ } }, "node_modules/@asyncapi/react-component": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-2.5.1.tgz", - "integrity": "sha512-/HPIMCcrKHsyzUHlN0DG4z4USkZXKJ6hKr4gnw1pPUfSHIteV2cOUg7SP9U9hdjLusCijjbH1Oqjyg6LYiMgaQ==", + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/@asyncapi/react-component/-/react-component-2.6.5.tgz", + "integrity": "sha512-+kQyIc337MHGTQ1ZYEuY2vfCyii2J/3o3Pm5/oJFgzWs9jWIz7/momLFl6rsS7Yd7elBam9Ukw0F3oM1AwwyHQ==", "license": "Apache-2.0", "dependencies": { "@asyncapi/avro-schema-parser": "^3.0.24", "@asyncapi/openapi-schema-parser": "^3.0.24", "@asyncapi/parser": "^3.3.0", - "@asyncapi/protobuf-schema-parser": "^3.4.0", + "@asyncapi/protobuf-schema-parser": "^3.6.0", "highlight.js": "^10.7.2", "isomorphic-dompurify": "^2.14.0", "marked": "^4.0.14", diff --git a/package.json b/package.json index 5106a65d6..b5ed6f690 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "dependencies": { "@asyncapi/generator-react-sdk": "^1.1.2", "@asyncapi/parser": "^3.1.0", - "@asyncapi/react-component": "^2.5.1", + "@asyncapi/react-component": "^2.6.5", "highlight.js": "10.7.3", "puppeteer": "^24.4.0", "react": "^18.3.1", diff --git a/test/components/__snapshots__/index.test.js.snap b/test/components/__snapshots__/index.test.js.snap index 96dd9296d..8d004f260 100644 --- a/test/components/__snapshots__/index.test.js.snap +++ b/test/components/__snapshots__/index.test.js.snap @@ -1103,69 +1103,69 @@ exports[`Index component should render AsyncAPI v2 document 1`] = `
  • Receive real-time information about environmental lighting conditions 📈
  • Servers

    Operations

    Messages

    Messages

    Schemas

    Schemas

    @@ -1199,81 +1199,81 @@ exports[`Index component should render AsyncAPI v3 document 1`] = `
  • Receive real-time information about environmental lighting conditions 📈
  • Servers

    • mqtt://test.mosquitto.org:{port}/mqttproduction

      Test broker

      -
      object
      port
      required
      string

      Secure connection (TLS) is available through port 8883.

      +
      object
      port
      required
      string

      Secure connection (TLS) is available through port 8883.

      Default value:"1883"
        Allowed values:
      • "1883"
      • "8883"

    Operations

    • RECEIVE smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured

      The topic on which measured values may be produced and consumed.

      Inform about environmental lighting conditions of a particular streetlight.

      This is the description with bold text.

      On multiple lines.

      -
      Operation IDreceiveLightMeasurement

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      -
      object
      object
      const
      my-app-id

      Accepts the following message:

      Light measured

      Inform about environmental lighting conditions of a particular streetlight.

      Message IDreceiveLightMeasurement.message
      object
      integer
      >= 0

      Light intensity measured in lumens.

      -
      object
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
      +
      Operation IDreceiveLightMeasurement

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      +
      object
      object
      const
      my-app-id

      Accepts the following message:

      Light measured

      Inform about environmental lighting conditions of a particular streetlight.

      Message IDreceiveLightMeasurement.message
      object
      integer
      >= 0

      Light intensity measured in lumens.

      +
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      +

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
         \\"lumens\\": 0,
         \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
       }
       
      -
      This example has been generated automatically.
      {
      +
      This example has been generated automatically.
      {
         \\"my-app-header\\": 100
       }
       
      -
      This example has been generated automatically.
    • SEND smartylighting/streetlights/1/0/action/{streetlightId}/turn/on

      Operation IDturnOn

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      -
      object
      object
      const
      my-app-id

      Accepts the following message:

      Turn on/off

      Command a particular streetlight to turn the lights on or off.

      Message IDturnOn.message
      object
      string

      Whether to turn on or off the light.

      -
        Allowed values:
      • "on"
      • "off"
      object
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
      +
      This example has been generated automatically.
    • SEND smartylighting/streetlights/1/0/action/{streetlightId}/turn/on

      Operation IDturnOn

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      +
      object
      object
      const
      my-app-id

      Accepts the following message:

      Turn on/off

      Command a particular streetlight to turn the lights on or off.

      Message IDturnOn.message
      object
      string

      Whether to turn on or off the light.

      +
        Allowed values:
      • "on"
      • "off"
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      +

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
         \\"command\\": \\"on\\",
         \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
       }
       
      -
      This example has been generated automatically.
      {
      +
      This example has been generated automatically.
      {
         \\"my-app-header\\": 100
       }
       
      -
      This example has been generated automatically.
    • SEND smartylighting/streetlights/1/0/action/{streetlightId}/turn/off

      Operation IDturnOff

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      -
      object
      object
      const
      my-app-id

      Accepts the following message:

      Turn on/off

      Command a particular streetlight to turn the lights on or off.

      Message IDturnOn.message
      object
      string

      Whether to turn on or off the light.

      -
        Allowed values:
      • "on"
      • "off"
      object
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
      +
      This example has been generated automatically.
    • SEND smartylighting/streetlights/1/0/action/{streetlightId}/turn/off

      Operation IDturnOff

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      +
      object
      object
      const
      my-app-id

      Accepts the following message:

      Turn on/off

      Command a particular streetlight to turn the lights on or off.

      Message IDturnOn.message
      object
      string

      Whether to turn on or off the light.

      +
        Allowed values:
      • "on"
      • "off"
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      +

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
         \\"command\\": \\"on\\",
         \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
       }
       
      -
      This example has been generated automatically.
      {
      +
      This example has been generated automatically.
      {
         \\"my-app-header\\": 100
       }
       
      -
      This example has been generated automatically.
    • SEND smartylighting/streetlights/1/0/action/{streetlightId}/dim

      Operation IDdimLight

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      -
      object
      object
      const
      my-app-id

      Accepts the following message:

      Dim light

      Command a particular streetlight to dim the lights.

      Message IDdimLight.message
      object
      percentage
      integer
      [ 0 .. 100 ]

      Percentage to which the light should be dimmed to.

      +
      This example has been generated automatically.
    • SEND smartylighting/streetlights/1/0/action/{streetlightId}/dim

      Operation IDdimLight

      Available only on servers:

      object
      streetlightId
      required
      string

      The ID of the streetlight.

      +
      object
      object
      const
      my-app-id

      Accepts the following message:

      Dim light

      Command a particular streetlight to dim the lights.

      Message IDdimLight.message
      object
      percentage
      integer
      [ 0 .. 100 ]

      Percentage to which the light should be dimmed to.

      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
      +

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

      Examples

      {
         \\"percentage\\": 100,
         \\"sentAt\\": \\"2019-08-24T14:15:22Z\\"
       }
       
      -
      This example has been generated automatically.
      {
      +
      This example has been generated automatically.
      {
         \\"my-app-header\\": 100
       }
       
      This example has been generated automatically.
    • SEND some.channel

      this description shows in markdown

      -
      Operation IDsome.channel.subscribe

      Available only on servers:

      Accepts one of the following messages:

      • #0
        Message IDsubscribe.message.0
        object
        result
        string
          Examples values:
        • "success"

        Additional properties are allowed.

        Examples

        {
        +
        Operation IDsome.channel.subscribe

        Available only on servers:

        Accepts one of the following messages:

        • #0
          Message IDsubscribe.message.0
          object
          result
          string
            Examples values:
          • "success"

          Additional properties are allowed.

          Examples

          {
             \\"result\\": \\"success\\"
           }
           
          -
          This example has been generated automatically.
        • #1
          Message IDsubscribe.message.1
          object
            Examples values:
          • {"error":{"errorCode":404,"errorMessage":"Something messed up"}}
          object
          errorCode
          integer
          errorMessage
          string

          Additional properties are allowed.

          Additional properties are allowed.

          Examples

          • #1 Example
            {
            +
            This example has been generated automatically.
        • #1
          Message IDsubscribe.message.1
          object
            Examples values:
          • {"error":{"errorCode":404,"errorMessage":"Something messed up"}}
          object
          errorCode
          integer
          errorMessage
          string

          Additional properties are allowed.

          Additional properties are allowed.

          Examples

          • #1 Example
            {
               \\"error\\": {
                 \\"errorCode\\": 404,
                 \\"errorMessage\\": \\"Something messed up\\"
               }
             }
             
            -

    Messages

    • #1Light measured

      Inform about environmental lighting conditions of a particular streetlight.

      Message IDlightMeasured
      object
      integer
      >= 0

      Light intensity measured in lumens.

      -
      object
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

    • #2Turn on/off

      Command a particular streetlight to turn the lights on or off.

      Message IDturnOnOff
      object
      string

      Whether to turn on or off the light.

      -
        Allowed values:
      • "on"
      • "off"
      object
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

    • #3Dim light

      Command a particular streetlight to dim the lights.

      Message IDdimLight
      object
      percentage
      integer
      [ 0 .. 100 ]

      Percentage to which the light should be dimmed to.

      +

    Messages

    • #1Light measured

      Inform about environmental lighting conditions of a particular streetlight.

      Message IDlightMeasured
      object
      integer
      >= 0

      Light intensity measured in lumens.

      +
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      +

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

    • #2Turn on/off

      Command a particular streetlight to turn the lights on or off.

      Message IDturnOnOff
      object
      string

      Whether to turn on or off the light.

      +
        Allowed values:
      • "on"
      • "off"
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      +

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

    • #3Dim light

      Command a particular streetlight to dim the lights.

      Message IDdimLight
      object
      percentage
      integer
      [ 0 .. 100 ]

      Percentage to which the light should be dimmed to.

      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

    • #4
      Message IDsuccessMessage
      object
      result
      string
        Examples values:
      • "success"

      Additional properties are allowed.

    • #5
      Message IDfailureMessage
      object
        Examples values:
      • {"error":{"errorCode":404,"errorMessage":"Something messed up"}}
      object
      errorCode
      integer
      errorMessage
      string

      Additional properties are allowed.

      Additional properties are allowed.

    Schemas

    • object
      integer
      >= 0

      Light intensity measured in lumens.

      -
      object
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

    • object
      string

      Whether to turn on or off the light.

      -
        Allowed values:
      • "on"
      • "off"
      object
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      -

      Additional properties are allowed.

    • object
      percentage
      integer
      [ 0 .. 100 ]

      Percentage to which the light should be dimmed to.

      +

      Additional properties are allowed.

      object
      my-app-header
      integer
      [ 0 .. 100 ]

      Additional properties are allowed.

    • #4
      Message IDsuccessMessage
      object
      result
      string
        Examples values:
      • "success"

      Additional properties are allowed.

    • #5
      Message IDfailureMessage
      object
        Examples values:
      • {"error":{"errorCode":404,"errorMessage":"Something messed up"}}
      object
      errorCode
      integer
      errorMessage
      string

      Additional properties are allowed.

      Additional properties are allowed.

    Schemas

    • object
      integer
      >= 0

      Light intensity measured in lumens.

      +
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      +

      Additional properties are allowed.

    • object
      string

      Whether to turn on or off the light.

      +
        Allowed values:
      • "on"
      • "off"
      x-pi
      false
      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      +

      Additional properties are allowed.

    • object
      percentage
      integer
      [ 0 .. 100 ]

      Percentage to which the light should be dimmed to.

      sentAt
      string
      format: date-time

      Date and time when the message was sent.

      Additional properties are allowed.

    • sentAt
      string
      format: date-time

      Date and time when the message was sent.