IMO starting developing a web application that is not statically typed in the year 2023 is a mistake. The key is to catch bugs and inconsistencies before the compilation, before runtime.
It’s a drastic point of view and it does depend on the exact use case, I’m aware of that.
Yes absolutely, your points about validating a JSON schema programmatically are all valid. But when it happens during application runtime, that’s too late. What good does it bring when a JS error or warning is thrown when a validation has failed? This means that I have to actively look for such errors during development by e.g. visiting a page in the browser, following a specific click path or issuing a request to the rest api. If I don’t do that, i see that my code compiles, deploy it and then the validation fails when an end user is using the app.