BrobridgeOrg / gravity-cli

Gravity CLI
MIT License
2 stars 3 forks source link

Command "gravity-cli pub" payload field accept all kind of string. #9

Open TaroBill opened 3 weeks ago

TaroBill commented 3 weeks ago

Should the payload field be restricted to accept only JSON format strings? Version: [47ca8b6]

Reproduce:

  1. Create product

    image

  2. Publish events that contains not a json type payload

(Default usage: gravity-cli pub accountCreated '{"id":4,"name":"fred"}')

image

  1. We can see that all of the invalid input is accept by gravity-cli. But we expect these will block by gravity-cli.

    image

  2. The following is Base64 decoded from nats. image

william-wyliang commented 2 weeks ago

This is related to the semantics expected/defined by the event processing flow of Gravity. @cfsghost @JheSue Does Gravity accept "any type of payloads"? Or, is it supposed only to accept the JSON-type payload?