openapi-generators / openapi-generators/openapi-python-client
Oauth support seems broken
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2k
- フォーク
- 293
- 平均マージ
- 34分
- マージ済み PR(30日)
- 1
説明
Describe the bug
I am trying to generate a client for an API with an clientCredentials oauth flow, but the generated client doesn't seem to manage the authentication at all: Searching the client's folder for the keyword oauth yields no results.
I can make it work by generating a token myself and using it in AuthenticatedClient, but I would expect the generated client to be able to handle that.
Is openapi-python-client supposed to generate a client that handles a clientCredentials oauth flow ?
OpenAPI Spec File
openapi: 3.0.3
info:
title: Test API
version: v1
paths:
/test:
get:
security:
- oauth2: []
responses:
'200':
description: ""
components:
securitySchemes:
oauth2:
type: oauth2
flows:
clientCredentials:
refreshUrl: https://whatever.com/oauth/token/
tokenUrl: https://whatever.com/oauth/token/
scopes: {}
Desktop:
- OS: Ubuntu 22.04.5
- Python Version: 3.12.7
- openapi-python-client version: 0.24.2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供された OpenAPI YAML からクライアントを生成し、生成されたクライアントに OAuth の処理が含まれているかを確認します。これを AuthenticatedClient を使用した手動提供のトークンパスと比較します。clientCredentials フローが生成されたクライアントで処理されるか、サポートされる動作が明確に確立されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- openapi, python
- 領域
- api, authentication
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100