I'm trying to use dhall to type an openapi specification. Following the description of a Security Requirement Object which the open api object have an array of, I write the following code:
let SecurityRequirement =
{
mapKey: Text
, mapValue: List Text
}
in
let req1 : SecurityRequirement =
{ mapKey = "AuthorizationHeader"
, mapValue = ([] : List Text)
}
let req2 : SecurityRequirement =
{ mapKey = "Foo"
, mapValue = ([] : List Text)
}
let requirements : List SecurityRequirement =
[ req1, req2 ]
in requirements
With this code, I get
{"Foo":[],"AuthorizationHeader":[]}
while I'm trying to have
[{"Foo":[]},{"AuthorizationHeader":[]}]
.
How can I achieve my goal ?