docstrings_on_attributes: true removes examples
還沒有人認領這個 Issue。
評估
研究方向
該 issue 提到了 openapi-python-client 0.25.1 和 docstrings_on_attributes 設定,但沒有指定原始檔案或測試。首先,使用最小的 OpenAPI 文件,在啟用和不啟用該選項的情況下重現產生的 docstring。完成標準是:啟用該選項時,屬性 docstring 保留 description 和 example 兩個欄位。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 2k
- 分支
- 293
- 平均合併
- 34 分鐘
- 30 天內合併 PR
- 1
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
openapi-generators/openapi-python-client 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 3/5 1-2 天 新手友好度 72/100
openapi-generators/openapi-python-client#1451 · 1 則留言 ·
-
難度 3/5 1-2 天 新手友好度 52/100
-
難度 3/5 1-2 天 新手友好度 64/100
openapi-generators/openapi-python-client#1435 · 1 則留言 ·
查看 openapi-generators/openapi-python-client 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 75/100
anthropics/skills#1811 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
speaches-ai/speaches#678 ·
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
datalayer/mcp-compose#42 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
conda-forge/spacy-feedstock#177 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
UKGovernmentBEIS/inspect_evals#2523 ·