79185694

Date: 2024-11-13 15:57:24
Score: 1
Natty:
Report link

If you are looking to exclude a field from JSON schema, use SkipJsonSchema:

from pydantic.json_schema import SkipJsonSchema
from pydantic import BaseModel

class MyModel(BaseModel):
    visible_in_sch: str 
    not_visible_in_sch: SkipJsonSchema[str]

You can find out more in docs.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: alpintrekker