@@ -144,7 +144,11 @@ sopSwaggerGenericToJSON'
144144 -> DatatypeInfo '[xs]
145145 -> POP Maybe '[xs]
146146 -> [Pair]
147+#if MIN_VERSION_generics_sop(0,5,0)
148+sopSwaggerGenericToJSON' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
149+#else
147150sopSwaggerGenericToJSON' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil)) (POP (defs :* Nil)) =
151+#endif
148152 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
149153sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
150154
@@ -220,7 +224,11 @@ sopSwaggerGenericParseJSON'
220224 -> DatatypeInfo '[xs]
221225 -> POP Maybe '[xs]
222226 -> Parser (SOP I '[xs])
227+#if MIN_VERSION_generics_sop(0,5,0)
228+sopSwaggerGenericParseJSON' opts obj (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
229+#else
223230sopSwaggerGenericParseJSON' opts obj (ADT _ _ (Record _ fieldsInfo :* Nil)) (POP (defs :* Nil)) =
231+#endif
224232 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
225233sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
226234
@@ -292,7 +300,11 @@ sopSwaggerGenericToEncoding'
292300 -> DatatypeInfo '[xs]
293301 -> POP Maybe '[xs]
294302 -> Series
303+#if MIN_VERSION_generics_sop(0,5,0)
304+sopSwaggerGenericToEncoding' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
305+#else
295306sopSwaggerGenericToEncoding' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil)) (POP (defs :* Nil)) =
307+#endif
296308 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
297309sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"
298310