We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81f975c commit de4dd4dCopy full SHA for de4dd4d
jsonschema/infer_test.go
@@ -142,3 +142,17 @@ func TestForWithMutation(t *testing.T) {
142
t.Fatalf("ForWithMutation: expected Required[0] to not be mutated")
143
}
144
145
+
146
+type s struct {
147
+ A t
148
+}
149
+type t struct {
150
+ B []s
151
152
153
+func TestForWithCycle(t *testing.T) {
154
+ _, err := jsonschema.For[s]()
155
+ if err == nil {
156
+ t.Fatalf("ForWithCycle: expected error, got nil")
157
+ }
158
0 commit comments