Improve error messages from error handlers
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
Read discussion 757 and trace BaseAPICallValidator._find_path into BasePathFinder.find and APICallPathFinder._get_servers_iter in openapi_core/validation/validators.py and openapi_core/templating/paths/finders.py. Use the ServerNotFound exception in openapi_core/templating/paths/exceptions.py as the starting point; done means the error-handler messages clearly explain the validation failure and its meaning.
索引モデルが issue の本文から書いたものです。
説明
Discussed in https://github.com/python-openapi/openapi-core/discussions/757
Originally posted by jtherrmann January 11, 2024
All of the API endpoints for the test deployment of our Flask app, which is deployed via Amazon API Gateway, are currently returning a response like the one below:
{
"detail": "Server not found for https://vd2gh6uqw3.execute-api.us-west-2.amazonaws.com/api/user",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}
We depend on the latest pre-release of openapi-core, https://github.com/python-openapi/openapi-core/releases/tag/0.19.0a1.
The error message leads me to believe that openapi-core is raising a ServerNotFound exception from BasePathFinder.find (here), which is called from BaseAPICallValidator._find_path (here).
I have a couple of questions:
- Is
BaseAPICallValidatorfor validating requests, responses, or both? - Why does the validator need to validate the server URL? What exactly does
APICallPathFinder._get_servers_iterdo? What is the fundamental meaning of aServerNotFoundexception?
- 主要言語
- Python
- スター
- 368
- フォーク
- 140
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-openapi/openapi-core のほかの issue
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
python-openapi/openapi-core#1188 · コメント 2 件 ·
-
kind/bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
python-openapi/openapi-core#1225 · コメント 2 件 ·
-
kind/bug
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
python-openapi/openapi-core#1212 ·
-
[Bug]: Query parameter validation fails to match empty string when listed as a valid enum value オープンkind/bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
python-openapi/openapi-core#1210 ·
-
kind/bug kind/bug/confirmed
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
python-openapi/openapi-core#1180 · コメント 3 件 ·
python-openapi/openapi-core の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100