Closed opqdonut closed 1 year ago
@opqdonut Should this be closed now too since #863 was merged?
I'll do some more testing and see if I can find any other corner cases.
Mutual recursion still doesn't work:
user=> (malli.json-schema/transform [:schema {:registry {"Foo" [:vector [:ref "Bar"]] "Bar" [:ref "Foo"]}} "Foo"])
{:$ref "#/definitions/Foo", :definitions {"Foo" {:type "array", :items {:$ref "#/definitions/Bar"}}}}
Fixed in master:
(malli.json-schema/transform [:schema {:registry {"Foo" [:vector [:ref "Bar"]] "Bar" [:ref "Foo"]}} "Foo"])
;{:$ref "#/definitions/Foo",
; :definitions {"Foo" {:type "array", :items {:$ref "#/definitions/Bar"}}
; "Bar" {:$ref "#/definitions/Foo"}}}
... at least for mu/closed schemas
863 seems to fix this.