Fix optional property for unary records
commiteca11827d10a7d01a80fac2a8e5c67d0d86aaf9a
authorNickolay Kudasov <nickolay.kudasov@gmail.com>
dateWed 7 Mar 2018, 05:36 (9 years ago)
parent655885a
src/Data/Swagger/Internal/Schema.hs+1−1
@@ -725,7 +725,7 @@ instance OVERLAPPING_ Constructor c => GToSchema (C1 c U1) where
725725 gdeclareNamedSchema = gdeclareNamedSumSchema
726726
727727-- | Single field constructor.
728−instance (Selector s, GToSchema f) => GToSchema (C1 c (S1 s f)) where
728+instance (Selector s, GToSchema f, GToSchema (S1 s f)) => GToSchema (C1 c (S1 s f)) where
729729 gdeclareNamedSchema opts _ s
730730 | unwrapUnaryRecords opts = fieldSchema
731731 | otherwise =