purescript-payload icon indicating copy to clipboard operation
purescript-payload copied to clipboard

Compile error should occur when 'query' prop is given but not mentioned in the query string

Open m-bock opened this issue 2 years ago • 0 comments

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.

m-bock avatar Aug 10 '22 08:08 m-bock