openapi-generators / openapi-generators/openapi-python-client
docstrings_on_attributes: true removes examples
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2k
- フォーク
- 293
- 平均マージ
- 34分
- マージ済み PR(30日)
- 1
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue では openapi-python-client 0.25.1 と docstrings_on_attributes 設定が挙げられていますが、ソースファイルやテストは指定されていません。まず、最小限の OpenAPI ドキュメントを使い、そのオプションの有効時と無効時に生成される docstring を再現してください。完了条件は、オプションを有効にしたときに属性の docstring が description フィールドと example フィールドの両方を保持することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- openapi, python
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100