I'm running into a weird error with Reitit and Malli under GitHub Actions The error shows
***:type :enum, :properties nil, :children nil, :min 1, :max nil***
There were no indications on which ns was causing the issue so I manually went through all my routes to finally land at this
This :parameters works fine
{:query
{:attribute
[:enum
"profile"
"address"
"birthdate"
"gender"
"preferred_username"
"updated_at"
"website"
"picture"
"identities"
"sub"
"phone_number"
"phone_number_verified"
"zoneinfo"
"custom:working-sector"
"custom:company-type"
"custom:sector-type"
"custom:company"
"custom:phone"
"custom:country"
"custom:city"
"custom:join-reason"
"custom:role"
"locale"
"email"
"email_verified"
"given_name"
"family_name"
"middle_name"
"name"
"nickname"]}}
This does not work (Mind the parenthesis)
{:query
(let [attrs (cognito/get-active-pool-attributes)]
{:attribute (into [:enum]
attrs)})}}}
The call to cognito/get-active-pool-attributes takes a second at most but I don't think that'll be the issue, right?
Note that both return the same results, i.e. true for = of both
I could provide a much longer trace for the issue if neededCan (cognito/get-active-pool-attributes) return empty?
That error means that [:enum] is not allowed and must have at least one child.
I think it could also happen with [:enum nil]
> Can (cognito/get-active-pool-attributes) return empty?
As far as I understand, no it does not, in the background this just runs
(map :Name (get-in (aws/invoke (cognito)
{:op :DescribeUserPool
:request {:UserPoolId id}})
[:UserPool :SchemaAttributes]))
I understand what you mean by it being possibly [:enum nil] but I don't know how that's happening, all other AWS functionality is running fine