Fork me on GitHub
#aws
<
2022-04-04
>
kenny00:04:54

@equal.car1805, funny you ask today... It's quite simple to generate the specs from the api input files. I happened to have a use case for doing so and so I just pushed the code here: https://github.com/kennyjwilli/smithy-spec. Here's an example call:

(smithy-spec/->specs {::api-input ec2-input}
  {::smithy-spec/input-shape "TagList"
   ::smithy-spec/base-ns     "aws.ec2"})
=>
((clojure.spec.alpha/def :aws.ec2/TagList (clojure.spec.alpha/coll-of :aws.ec2.TagList/Tag))
 (clojure.spec.alpha/def :aws.ec2.TagList/Key clojure.core/string?)
 (clojure.spec.alpha/def
   :aws.ec2.TagList/Tag
   (clojure.spec.alpha/keys :opt-un [:aws.ec2.TagList/Key :aws.ec2.TagList/Value]))
 (clojure.spec.alpha/def :aws.ec2.TagList/Value clojure.core/string?))

Augustus00:04:42

wow, looks perfect thanks!

kenny00:04:40

Cannot confirm it works on everything since it's hot off the press. Still working to get it to better fit my use case.