Hi!
and to enforce the additional OpenAPI requirement that default values actually validate against the associated (sub-)instance.
My solution is demonstrated in the attached script. As has been done in other examples, I'm extending the properties validator.
The problem is in resolving references in the sub-instance against which we need to validate. My solution has been to generate a separate Validator based on the full instance and store it as an attribute of the main Validator ahead-of-time. It feels janky to me an I am wondering if anyone has ideas for a more elegant solution.
Thanks,
-Patrick