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

Reject `limit=0` in paginated requests

オープン 初心者向け
#655 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
api

調査の方向性

server/app/interfaces/base.py の BaseWSGIApp._get_slice() と、既存の負の limit の処理から始めてください。server/test/interfaces/test_base.py の TestPagination に limit=0 のケースを追加し、そのテストを実行してください。ゼロが 400 Bad Request で拒否され、ページネーションのテストが通れば完了です。

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

説明

bug server Specification

Currently, BaseWSGIApp._get_slice() accepts limit=0, because it parses limit as a NonNegativeInteger. With limit=0, the server returns an empty page together with a cursor pointing to the same position as the request. For example, GET /shells?limit=0 on a non-empty repository returns:

{"paging_metadata":{"cursor":"1"},"result":[]}

A client that follows the cursor until it becomes None therefore loops forever.

The specification (IDTA-01002-3-1, v3.1.2) contradicts itself on whether limit=0 is valid:

To me, a page size of 0 is no meaningful behavior as it cannot make progress through a result set.
Rejecting it is the only sensible option, and it matches the OpenAPI definition.

_get_slice() should reject limit=0 with 400 Bad Request, the same way it already rejects negative values. A test for this case should be added to TestPagination in server/test/interfaces/test_base.py.

主要言語
Python
スター
105
フォーク
56
平均マージ
11日 9時間
マージ済み PR(30日)
4

環境構築

はじめの一歩

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

eclipse-basyx/basyx-python-sdk のほかの issue

eclipse-basyx/basyx-python-sdk の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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