Skip to content

Fix descriptions for inherited fields in schema generation #33

Description

@BenjaminPelletier

Currently, it appears that descriptions for fields that are inherited from a base class are not rendered into auto-generated schema. For instance:

class Foo(ImplicitDict):
    base_field: str
    """This is a base field."""

class Bar(Foo):
    extra_field: str
    """This is an extra field."""

In this case, rendering the schema definition for Bar will exclude "This is a base field" from the description of base_field. Expected behavior: "This is a base field" is included as the description for base_field in the rendered JSON Schema.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions