git.iko.soy/typeable/openapi3
on master help sign in
Fix unwrapUnaryRecords
69b7838Nickolay Kudasov
src/Data/Swagger/Schema/Internal.hs+1−1
@@ -289,7 +289,7 @@ instance {-# OVERLAPPABLE #-} GToSchema f => GToSchema (C1 c f) where
289-- | Single field constructor.
289-- | Single field constructor.
290instance (Selector s, GToSchema f) => GToSchema (C1 c (S1 s f)) where
290instance (Selector s, GToSchema f) => GToSchema (C1 c (S1 s f)) where
291 gtoNamedSchema opts _ s
291 gtoNamedSchema opts _ s
292− | unwrapUnaryRecords opts = unnamed (snd fieldSchema)
292+ | unwrapUnaryRecords opts = fieldSchema
293 | otherwise =
293 | otherwise =
294 case schema ^. schemaItems of
294 case schema ^. schemaItems of
295 Just (SchemaItemsArray [_]) -> fieldSchema
295 Just (SchemaItemsArray [_]) -> fieldSchema