frequenz-floss / frequenz-api-dispatch

gRPC+protobuf specification and Python bindings for the Frequenz Dispatch API
https://frequenz-floss.github.io/frequenz-api-dispatch/
MIT License
1 stars 6 forks source link

Improve `payload` documentation #163

Closed thomas-nicolai-frequenz closed 3 months ago

thomas-nicolai-frequenz commented 5 months ago

What's needed?

Extend the documentation for the payload parameter as shown below:

Proposed solution

message Dispatch {
  // ...

  // The dispatch payload.
+  // 
+  // Note!!! 
+  //     The payload field allows for flexible JSON data to be associated with this dispatch.
+  //     The payload must adhere to the following constraints:
+  //      - Maximum JSON nesting depth: 5 levels. 
+  //      - The data should not contain executable code or scripts.
+  //      - Ensure all data is properly sanitized and encoded.
+  //      - The total size of the payload should not exceed 50 KB.
  google.protobuf.Struct payload = 11;

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response