purescript-payload
purescript-payload copied to clipboard
Compile error should occur when 'query' prop is given but not mentioned in the query string
First of all: Great library!
Here's a small thing that I came across that may be a bit type-unsafe:
mySpec
:: Spec
{ getBar ::
GET "/bar"
{ query :: { foo :: String }
, response :: { data :: Array String }
}
}
mySpec = Spec
I'm specifying the query but it's not mentioned in the query string. The code compiles but the foo
query param is not sent by the client.
Currently only the opposite is checked: Prop present in the query string but not mention in the record below.