@hrefcl/apidoc - v4.0.5
    Preparing search index...
    • Parser for responseTopic tags - defines MQTT response topic paths

      This parser handles the responseTopic tag that defines where responses or acknowledgments should be published for command/response patterns in MQTT. It extracts:

      • Response topic path with placeholders
      • Validates topic format

      Parameters

      • content: string

        Raw content from the responseTopic tag

      Returns { topic: string }

      Parsed response topic information with topic path, or null if parsing fails

      // Input: "v1/{tenant}/devices/{deviceId}/commands/ack"
      // Output: { topic: "v1/{tenant}/devices/{deviceId}/commands/ack" }
      // Input: "v1/{tenant}/devices/{deviceId}/status/response"
      // Output: { topic: "v1/{tenant}/devices/{deviceId}/status/response" }
      // Input: "responses/device-commands"
      // Output: { topic: "responses/device-commands" }

      4.1.0