I'm using aws-api with MediaConvert. After using aws/validate-requests
, I get an error:
{ ...
:path
[:Settings
:OutputGroups
:OutputGroupSettings
:FileGroupSettings
:Destination],
:pred
(clojure.core/fn
[%]
(clojure.core/re-matches (clojure.core/re-pattern "^s3:\\/\\/") %)),
:val "<s3://bucket-name/somename/>"
...
}
The :Destination
value here will only match the string "s3://". However, this is https://docs.aws.amazon.com/mediaconvert/latest/ug/specify-output-groups.html. I can use MediaConvert (outside aws-api
) with the rejected value and it works. Is this likely a bug or might I be overlooking something?what :op
?
:CreateJob
do you mind filing a bug for that at cognitect-labs/aws-api ?
offhand, it looks like the spec is using re-matches
instead of re-find
(most regexes in the APIs descriptors have ^ and $ anchors, but not this one for :CreateJob
)
as a workaround you could maybe redefine the spec to be a little looser @thomas559
some other regexes from the MediaConvert API descriptors...
most have the ^ $ anchors
heh that name "__stringPatternArnAwsUsGovCnKmsAZ26EastWestCentralNorthSouthEastWest1912D12KeyAFAF098AFAF094AFAF094AFAF094AFAF0912"
Thanks, @ghadi. I'll file the issue. The spec part is a little opaque to me (not spec as a library, just where they are being defined by aws-api
), but I'll take a look and see if I can figure it out.
The specs are mechanically generated @thomas559
We’ll have to analyze it some more and maybe modify the generator
(Which isn’t public)
That's the part where I get lost a little, since normally I'd look for a spec (e.g., :a/b
) in the source and override it. Here I'm not sure where to look for the name
Check (aws/doc client :CreateJob)
and see if you can navigate through the specs
Thanks, I was able to redefine the spec. In general, having the validation function is enormously useful for something like MediaConvert where the request can be a really big map.