-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Rename Schema to Field? #577
Copy link
Copy link
Closed
Labels
changeSuggested alteration to Pydantic, not a new feature nor a bugSuggested alteration to Pydantic, not a new feature nor a bugfeedback wantedtopic-json schemaRelated to JSON SchemaRelated to JSON Schema
Milestone
Metadata
Metadata
Assignees
Labels
changeSuggested alteration to Pydantic, not a new feature nor a bugSuggested alteration to Pydantic, not a new feature nor a bugfeedback wantedtopic-json schemaRelated to JSON SchemaRelated to JSON Schema
Currently we have the class
Schemafor when you need to define more stuff on a field than just the type and default.But this is a confusing name since not all it's arguments refer to the schema. It'll get more confusing if we want to add more arguments to
Schema/Field, eg. a more complex alias system #477.Therefore we should rename it to
Field.This would require:
Fieldclass, perhaps renaming the entirefields.pymodule.Schemaneeds to carry on working for a while but with a deprecation warningWhat does everyone thing?
@tiangolo
Schemawas your work originally, are you ok with this?