Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Option to hide default value when its type is pydantic.BaseModel #149

Open
lenormf opened this issue May 19, 2023 · 1 comment
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@lenormf
Copy link

lenormf commented May 19, 2023

Hi,

Whenever describing a model with autopydantic_model, I want default values to be shown.

However, some fields of the model point to another model (which inherits pydantic.BaseModel).

That results in that model’s representation (along with all its fields and subfields) being shown as a default value, spawning several lines.

I would like to somehow disable that behaviour, as I can already click on the hyperlinked type of that problematic field to learn about its own fields.

Hope it’s clear,

Thanks!

@mansenfranzen
Copy link
Owner

Hi @lenormf,

thanks for raising the question!

Have you looked at this FAQ section? It might very well answer your question.

@mansenfranzen mansenfranzen self-assigned this Jul 3, 2023
@mansenfranzen mansenfranzen added the duplicate This issue or pull request already exists label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants