ktr0731 / evans

Evans: more expressive universal gRPC client
MIT License
4.27k stars 188 forks source link

Unknown flag '--json' when used together with '--enrich' option #646

Closed shizzard closed 1 year ago

shizzard commented 1 year ago

Evans reports the unknown flag --json. Documentation states:

Enriched response To display more enriched response, you can use --enrich option. ... JSON output is also available with --json option.

I need the whole output to be a valid JSON to be able to handle it with jq.

To reproduce

Basically any gRPC call with --enrich --json flags will work:

$ evans \
    --path <path-to-proto-library> \
    --proto <path-to-proto-file> \
    --host <host> \
    --port <port> \
    --file <request-file> \
    cli call  --enrich --json \
    <service>.<method>

    evans: unknown flag: --json

--enrich option alone works as expected.

Expected behavior

Whole evans output is a valid JSON object.

Environment

shizzard commented 1 year ago

UPDATE: after digging into the code i found that the proper flag is --output json. I suppose you can just fix the documentation.

ktr0731 commented 1 year ago

Thank you! Fixed in #653.