My use case is that have many kinds of messages, for which I can get json schemes from an http request.

I want to update the schema that’s being validated with when I get the response of the http request.

I’m using angular and making an http request, and when I get the schema, I do the same code like the examples and use setDiagnosticsOptions.

I now realize that this kinda requires the defaults to be set before setting the model, but I cannot do that, because I get the schema in runtime and want to load them without reloading the entire site.

Has anyone encountered this use case and solved this somehow?