Missing references in API generation process

オープン
#952 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
openapi, python
領域
api, tooling

調査の方向性

issue にリンクされている create-a-new-client の手順から始め、報告されている OpenAPI クライアント生成プロセスを使って警告を再現します。Index、IndexInSpec、IndexParams の参照が削除される理由を調査し、その後、警告なしで生成が完了し、これらのスキーマが保持されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug
While trying to generate the OpenAPI client, I come across a bug that not only modifies several files unnecessarily but also displays a warning message about endpoint generating, which root cause is unclear to me:

Warning(s) encountered while generating. Client was generated, but some pieces may be missing

WARNING parsing POST /index/create within index. Endpoint will not be generated.

Could not find reference in parsed models or enums



Unable to process schema /components/schemas/Index:

Value {'object_type': 'IndexParams', 'nlist': 128} is not valid, only None is allowed

Failure to process schema has resulted in the removal of:
/components/schemas/Index
/components/schemas/IndexInSpec

Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, const=None, type=None, allOf=[], oneOf=[Reference(ref='#/components/schemas/IndexParams'), Schema(title=None, multipleOf=None, maximum=None, exclusiveMaximum=None, minimum=None, exclusiveMinimum=None, maxLength=None, minLength=None, pattern=None, maxItems=None, minItems=None, uniqueItems=None, maxProperties=None, minProperties=None, required=None, enum=None, const=None, type=<DataType.NULL: 'null'>, allOf=[], oneOf=[], anyOf=[], schema_not=None, items=None, properties=None, additionalProperties=None, description=None, schema_format=None, default=None, nullable=False, discriminator=None, readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None)], anyOf=[], schema_not=None, items=None, properties=None, additionalProperties=None, description=None, schema_format=None, default={'object_type': 'IndexParams', 'nlist': 128}, nullable=False, discriminator=Discriminator(propertyName='object_type', mapping=None), readOnly=None, writeOnly=None, xml=None, externalDocs=None, example=None, deprecated=None)

OpenAPI Spec File
A link to an OpenAPI document which produces this issue. Ideally, write a minimal reproduction only containing the problematic pieces.
Creating the new client: https://github.com/openapi-generators/openapi-python-client?tab=readme-ov-file#create-a-new-client

Desktop (please complete the following information):

  • OS: Windows 11 Enterprise Version 22H2
  • Python Version: 3.9.13
  • openapi-python-client version: 0.17.2
主要言語
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 を短くまとめたダイジェスト。