Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 8298ab5

Browse files
committed
fix allOf example
1 parent f34351d commit 8298ab5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pages/posts/dynamicref-and-generics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ _**NOTE** I used `T` here to match up with the C# `List<T>` to better illustrate
8787

8888
If we validate an instance against only this schema, `"$dynamicRef": "#T"` resolves to the subschema with `"$dynamicAnchor": "T"` that we included at `/$defs/content`. In this case, `$dymamicRef` and `$dynamicAnchor` work just like `$ref` and `$anchor`.
8989

90-
The `"not": true` means that all instances will fail validation. Typically, to ensure all instances fail validation, we'd use the `false` schema, but in this case, we need to include a dynamic anchor, so a simple `false` doesn't work. I think `"not": true` is probably the cleanest alternative, but you can also use something like `"allOf": { false }` if that makes more sense to you.
90+
The `"not": true` means that all instances will fail validation. Typically, to ensure all instances fail validation, we'd use the `false` schema, but in this case, we need to include a dynamic anchor, so a simple `false` doesn't work. I think `"not": true` is probably the cleanest alternative, but you can also use something like `"allOf": [ false ]` if that makes more sense to you.
9191

9292
_**NOTE** An empty array will still pass validation for this schema, but any array that has items will fail._
9393

0 commit comments

Comments
 (0)