Closed keerts closed 6 years ago
Also, should ::tags be replaced by ::res/tags, like:
-(defresource internet-gateway (ec2 "InternetGateway") (s/? (s/keys :opt [::tags]))) +(defresource internet-gateway (ec2 "InternetGateway") (s/? (s/keys :opt [::res/tags])))
Again, my Clojure / spec experience might be lacking, any explanation greatly appreciated.
I think the s/?
only works on sequences within s/cat
. I think if you take that out it'll work but I haven't checked yet.
It can be s/nilable
if you meant to make the map optional.
And it will also work when removing the s/?
then you will always have to pass the empty map.
The following spec is playing with me:
(defresource internet-gateway (ec2 "InternetGateway") (s/? (s/keys :opt [::res/tags])))
If I read it correctly, both of the following should be conformant:But the second form yields the following:
Must be my lacking experience with spec, but I need a little help understanding the error. Any help appreciated.