cli icon indicating copy to clipboard operation
cli copied to clipboard

Doc: Clarify CLI `trigger` help

Open delabassee opened this issue 5 years ago • 1 comments

It's not obvious to understand how to add a trigger after the function has been created and fn create trigger --help doesn't really help.

COMMAND OPTIONS
  --source value, -s value  trigger source
  --type value, -t value    Todo
  --annotation value        fn annotation (can be specified multiple times)

I assume that --type should be "HTTP" but what is --annotation and --source for? Adding a simple example might be alleviate any potential confusion.

delabassee avatar Feb 11 '19 06:02 delabassee

I was looking at the code and for the --type value, it says:

Class of trigger, e.g schedule, http, queue 

However, I am not sure all of these are supported (HTTP probably is).

For source, it says that this is an "URI path for the trigger (sayHello, say/hello)" -- changing it to this would probably help a bit, right?

There's also a comment for annotations, but it basically says it's a map of annotations that get attached and talks about its length.

CC'ing @JadeRedworth as she was the one that added this code :)

peterj avatar Feb 28 '19 18:02 peterj