Skip to content

Interest in taking Schema description from Schema.__doc__ docstring #861

@ddorian

Description

@ddorian

You take the object description from Meta.description in

jsonschema["description"] = Meta.description

Do you have interest in a pull request to also get it from the Schema docstring? Something like:

if hasattr(Meta, "description"):
    jsonschema["description"] = Meta.description
elif schema.__doc__:
    jsonschema["description"] = schema.__doc__

You can do the same formating as in https://flask-smorest.readthedocs.io/en/latest/openapi.html#add-summary-and-description.

Makes sense?

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