Skip to content

docstrings_on_attributes: true removes examples #1282

@sjudd

Description

@sjudd

Describe the bug
If I add docstrings_on_attributes: true to my config, then example fields in my openapi schemaare removed entirely from the docstrings.

The default behavior seems to be to list first the description and then the example field in the attribute docstring at the top of the class. I'd expect that behavior to be retained when I add docstrings_on_attributes: true

OpenAPI Spec File
A link to an OpenAPI document which produces this issue. Ideally, write a minimal reproduction only containing the problematic pieces.

Desktop (please complete the following information):

  • OS: [e.g. macOS 10.15.1] macOS 15.5
  • Python Version: [e.g. 3.8.0] 3.11.9
  • openapi-python-client version [e.g. 0.1.0] 0.25.1

Additional context
Add any other context about the problem here.

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