Open FraDV0695 opened 2 months ago
Hi @FraDV0695,
thanks for raising your issue here!
If I understand you correctly, you would like to have a global configuration property that removes all inherited members from documented models by default, right?
The problem is similar to what was reported in this old issue
I am finding this sphinx extension very useful for managing the documentation of pydantic classes.
However, I am having quite a few problems generating correct documentation of classes when they inherit attributes from other parent classes (whether implemented in the same project or imported from external libraries). Through configuration management of both autodo_pydantic and autosummaary, I managed to partially obtain what I wanted: I can document all the attributes of the target class (both native and inherited), but all the methods and validators of the parent classes are also documented (especially those of the BaseModel class).
The suggestion given in the FAQ unfortunately does not help me, as I have no experience in generating templates for Sphinx. Furthermore, in my case, the manual modification that is suggested is impractical, since I automatically generate all the .rst files with sphinx-apidoc.
Instead of manually modifying the .rst files, would it not be possible to integrate this extension with the configuration parameters to handle this case, so as to be able to improve the automation of the documentation with this extension?
this are my general configuration inside the conf.py