Skip to content

Commit

Permalink
update golden test
Browse files Browse the repository at this point in the history
  • Loading branch information
piq9117 authored and alexbiehl committed Mar 1, 2024
1 parent 5e1e3ab commit efcc040
Show file tree
Hide file tree
Showing 15 changed files with 75 additions and 75 deletions.
10 changes: 5 additions & 5 deletions test/golden/additional-properties.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -304,11 +304,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/bug-1.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/bug-2.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/csv.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -304,11 +304,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/datetime.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/enum-bug.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -293,11 +293,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/enum.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -357,11 +357,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/haskell-ext.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -308,11 +308,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/headers.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -321,11 +321,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/lists.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -354,11 +354,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/numbers.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
10 changes: 5 additions & 5 deletions test/golden/object-without-type.yaml.out
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ requiredQueryParameter ::
requiredQueryParameter name withParam = \request respond ->
case List.lookup name (Wai.queryString request) of
Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just Nothing ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam x request respond
{-# INLINEABLE requiredQueryParameter #-}
Expand All @@ -290,11 +290,11 @@ optionalQueryParameter name allowEmpty withParam = \request respond ->
| allowEmpty ->
withParam Nothing request respond
| otherwise ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Missing query parameter: " <> name))
Just (Just value) ->
case parseQueryParam (Text.decodeUtf8 value) of
Left _err ->
respond (Wai.responseBuilder (toEnum 400) [] mempty)
respond (Wai.responseBuilder (toEnum 400) [] ("Unable to recognize query parameter: " <> name))
Right x ->
withParam (Just x) request respond
{-# INLINEABLE optionalQueryParameter #-}
Expand Down
Loading

0 comments on commit efcc040

Please sign in to comment.