Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

docstrings_on_attributes: true removes examples

オープン
#1,282 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
openapi, python
領域
tooling

調査の方向性

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分
マージ済み PR(30日)
1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openapi-generators/openapi-python-client のほかの issue

openapi-generators/openapi-python-client の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。