Skip to content

feature: improve template for pydantic fields #48

@maxschulz-COL

Description

@maxschulz-COL

Is your feature request related to a problem? Please describe.

I have started to implement this plugin, thanks for creating it!

Having implemented it though, I started to realise that there are a few things that I don't like very well:

Image

Given that pydantic fields are more like arguments than really attributes, would it be possible to also display them as a table. This would then also leave ample space for things like defaults, which are currently more or less omitted.

  • given that pydantic field count as attributes, they get added to the TOC on the right hand side. This unnecessarily crowds the TOC and it would be great to remove them, without remove that level on all other pages. If they were not attributes, that might be automatically solved.

Describe the solution you'd like

Ideally some form of configuration option that allows me to treat pydantic fields similar to docstring parameters, that properly display types and defaults.

Describe alternatives you've considered

At this point I am considering writing my own extension, or maybe overwrite some template, but I am not sure that's possible. Some guidance here might be welcome!

Additional context

Happy to raise a PR if I am guided a little bit on what would be the correct approach

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions