Is your change request related to a problem? Please describe.
Currently the extension loads the schema for every model it finds. But not all these models will be rendered by mkdocstrings, depending on the user docs. This is wasteful and can trigger errors.
Describe the solution you'd like
We could add an option to make it lazy, so that only rendered models would trigger schema loading.
I suggest adding an option because other tools might want to get the JSON output of Griffe, in which case we wouldn't be able to output schema if they are lazy callables.
Describe alternatives you've considered
/
Additional context
Discussed in #44.
Is your change request related to a problem? Please describe.
Currently the extension loads the schema for every model it finds. But not all these models will be rendered by mkdocstrings, depending on the user docs. This is wasteful and can trigger errors.
Describe the solution you'd like
We could add an option to make it lazy, so that only rendered models would trigger schema loading.
I suggest adding an option because other tools might want to get the JSON output of Griffe, in which case we wouldn't be able to output schema if they are lazy callables.
Describe alternatives you've considered
/
Additional context
Discussed in #44.