openapi-generators / openapi-generators/openapi-python-client
docstrings_on_attributes: true removes examples
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 2k
- Forks
- 293
- Ø Merge
- 34 Min.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Das Issue nennt openapi-python-client 0.25.1 und die Konfiguration docstrings_on_attributes, aber keine Quelldatei oder keinen Test. Beginne damit, die generierten Docstrings mit und ohne diese Option anhand eines minimalen OpenAPI-Dokuments zu reproduzieren. Als erledigt gilt, dass die Attribut-Docstrings bei aktivierter Option sowohl die Felder description als auch example beibehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- openapi, python
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100