@@ -120,15 +120,15 @@ mkEndpointWithSchemaRef :: forall cs hs proxy method status a.
120
120
mkEndpointWithSchemaRef mref path _ = mempty
121
121
& paths. at path ?~
122
122
(mempty & method ?~ (mempty
123
- & produces ?~ MimeList contentTypes
123
+ & produces ?~ MimeList responseContentTypes
124
124
& at code ?~ Inline (mempty
125
125
& schema .~ mref
126
126
& headers .~ responseHeaders)))
127
127
where
128
- method = swaggerMethod (Proxy :: Proxy method )
129
- code = fromIntegral (natVal (Proxy :: Proxy status ))
130
- contentTypes = allContentType (Proxy :: Proxy cs )
131
- responseHeaders = toAllResponseHeaders (Proxy :: Proxy hs )
128
+ method = swaggerMethod (Proxy :: Proxy method )
129
+ code = fromIntegral (natVal (Proxy :: Proxy status ))
130
+ responseContentTypes = allContentType (Proxy :: Proxy cs )
131
+ responseHeaders = toAllResponseHeaders (Proxy :: Proxy hs )
132
132
133
133
-- | Add parameter to every operation in the spec.
134
134
addParam :: Param -> Swagger -> Swagger
@@ -356,9 +356,9 @@ instance AllToResponseHeader '[] where
356
356
toAllResponseHeaders _ = mempty
357
357
358
358
instance (ToResponseHeader h , AllToResponseHeader hs ) => AllToResponseHeader (h ': hs ) where
359
- toAllResponseHeaders _ = InsOrdHashMap. insert hname header hdrs
359
+ toAllResponseHeaders _ = InsOrdHashMap. insert headerName headerBS hdrs
360
360
where
361
- (hname, header ) = toResponseHeader (Proxy :: Proxy h )
361
+ (headerName, headerBS ) = toResponseHeader (Proxy :: Proxy h )
362
362
hdrs = toAllResponseHeaders (Proxy :: Proxy hs )
363
363
364
364
instance AllToResponseHeader hs => AllToResponseHeader (HList hs ) where
0 commit comments