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

Commit 588dece

Browse files
authored
Merge pull request #24 from flaksp/main
Fix typo in "Using Dynamic References to Support Generic Types"
2 parents 18ea88f + bf8483f commit 588dece

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/posts/dynamicref-and-generics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ You can also use multiple dynamic anchors to support types like `Dictionary<TKey
112112
"type": "object",
113113
"properties": {
114114
"key": { "$dynamicRef": "#TKey" },
115-
"key": { "$dynamicRef": "#TValue" }
115+
"value": { "$dynamicRef": "#TValue" }
116116
}
117117
}
118118
}
@@ -169,4 +169,4 @@ By using `$dynamicRef` and `$dynamicAnchor`, you don't need to write full schema
169169
_**ASIDE** With Draft 2020-12, including `$dynamicAnchor` in the generic schema is required for `$dynamicRef` to work. In future versions, this requirement will be removed as it isn't strictly needed: any resolution attempt will simply fail. (This requirement is a holdover from its Draft 2019-09 predecessor `$recursive*`.) However for the particular application of modelling generic types, I'd still keep it in because it serves as an analog for not being able to instantiate a generic type, like `List<T>`. The net outcome is the same (validation failure), but I think including it more explicitly describes the intent._
170170

171171

172-
_Cover photo by [Nick Fewings](https://unsplash.com/@jannerboy62) on [Unsplash](https://unsplash.com/photos/-sAtFFj28W4) with some edits by me._ 😁
172+
_Cover photo by [Nick Fewings](https://unsplash.com/@jannerboy62) on [Unsplash](https://unsplash.com/photos/-sAtFFj28W4) with some edits by me._ 😁

0 commit comments

Comments
 (0)