fixed: GToSchema: infinite call: single constructor and recur
I followed `declareSchemaRef` to make sure that the context of `InsOrdHashMap` disappears.
Since the cause seems to be here, I rewrote it to keep the context and continue the calculation.
commit93d7dff2a1234292dea428f6d3d38a851f1ae7ed
authorncaq <ncaq@ncaq.net>
dateWed 2 Feb 2022, 21:24 (5 years ago)
parent1d23171
src/Data/OpenApi/Internal/Schema.hs+1−1
@@ -945,7 +945,7 @@ instance (Selector s, GToSchema f, GToSchema (S1 s f)) => GToSchema (C1 c (S1 s
945945 case schema ^. items of
946946 Just (OpenApiItemsArray [_]) -> fieldSchema
947947 _ -> do
948− declare defs
948+ NamedSchema _ schema <- recordSchema
949949 return (unnamed schema)
950950 where
951951 (defs, NamedSchema _ schema) = runDeclare recordSchema mempty