Invalid query parameters return two different error shapes
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by tracing query-parameter validation on the list endpoints for limit, dir, order_by, time[…], and the next/prev cursors, comparing the 400 and 422 response shapes shown in the issue. The issue leaves the choice of status and shape open, so clarify that decision before changing behavior. Done means all those invalid parameters use one consistent status and response shape, with a release note covering the client compatibility impact.
索引モデルが issue の本文から書いたものです。
説明
As of #1109, on the list endpoints an invalid limit returns a 400 with a plain message. For example GET /api/v1/events?limit=0:
{"status":400,"message":"invalid limit: must be between 1 and 1000"}
An invalid dir, order_by or time[…] on the same endpoint returns a 422 with a data detail. For example GET /api/v1/events?dir=sideways:
{"status":422,"message":"validation error","data":{"query.dir":"must be 'asc' or 'desc'"}}
An invalid next or prev cursor is a 400 with a plain message, like limit. A client has to handle both shapes for one request.
Proposal: pick one status and shape for query parameter validation and apply it on every endpoint. Clients that match on the status would break, so the change needs a release note.
- 主要言語
- Go
- スター
- 1.1k
- フォーク
- 70
- 平均マージ
- 3日 9時間
- マージ済み PR(30日)
- 34
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hookdeck/outpost のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
hookdeck/outpost#1195 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
hookdeck/outpost#1194 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
メンテナーはふだん 3 日以内に返信
hookdeck/outpost の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dragonflydb/dragonfly-operator#619 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
cloudfoundry/bosh-bootloader#701 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
baremetal: private network check rejects offer-specific options (Private Network 10Gbps / 25Gbps)対応中かも @lbarrosby が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
scaleway/terraform-provider-scaleway#4587 ·
メンテナーはふだん 1 日以内に返信
-
blocked-needs-validation bug
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
projectcapsule/capsule#2280 ·
メンテナーはふだん 1 日以内に返信