Introduced a flag disableErrorsForMissingResourceDefinitions to effectively disable the error 'API resource definition for model "XWY" not found'. Instead of throwing the error though, we are invoking the Logger's error method to let users know they should fix it.
Since invokers of the modelFor method expect a model, we are returning an empty model structure which has proved effective in our tests.
Screenshot
N/A
What Changed & Why
Introduced a flag
disableErrorsForMissingResourceDefinitions
to effectively disable the error 'API resource definition for model "XWY" not found'. Instead of throwing the error though, we are invoking the Logger's error method to let users know they should fix it.Since invokers of the
modelFor
method expect a model, we are returning an empty model structure which has proved effective in our tests.Testing
Just run the tests.
Documentation
Updated the README file with instructions.