asyncapi-archived-repos / docgen

AsyncAPI documentation generator. DEPRECATED in favour of
https://github.com/asyncapi/generator
Apache License 2.0
21 stars 11 forks source link

Message payload might not be a JSON object #12

Closed fmvilas closed 6 years ago

fmvilas commented 7 years ago

We're currently documenting message payloads as if they're always JSON objects, but the reality is that it can be something else, for instance, a number. Here's an example:

https://ubidots.com/docs/api/mqtt.html#subscribe-to-a-variable

It says:

/v1.6/devices/{LABEL_DEVICE}/{LABEL_VARIABLE}/lv: This will return the last value of the variable as a single float value. This makes it easier to parse in microcontrollers.

That's especially important for IoT devices.

NicoHood commented 6 years ago
topics:
  accounts.1.0.action.user.signup:
    publish:
      $ref: "#/components/messages/userSignUp"
  accounts.1.0.event.user.signup:
    publish:
      payload:
        type: "string"
        description: "Simple response string"
        default: "test"

image

Seems to work for me already!?

fmvilas commented 6 years ago

Yes. I forgot to close this issue. Thanks!