CodeChain-io / CodeChain-io/codechain-indexer
Validate `firstEvaluatedKey` and `lastEvaluatedKey`'s length
- 主要言語
- TypeScript
- スター
- 21
- フォーク
- 15
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Here is the code that validates `firstEvaluatedKey` and `lastEvaluatedKey`.
```
export const txPaginationSchema = {
firstEvaluatedKey: Joi.array().items(Joi.number(), Joi.number()),
lastEvaluatedKey: Joi.array().items(Joi.number(), Joi.number())
};
```
The above condition does not check an input array's length. All of these inputs `[]`, `[1]`, `[1,2]` and `[1,2,3]` are valid in the current implementation. Only `[1,2]` should pass the validation and other `[]`, `[1]`, `[1,2,3]` should fail the validation.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
まず、issueに示されているtxPaginationSchemaの定義を見つけ、近くにあるバリデーションテストや使用箇所を確認します。空の配列、要素数が1、2、3の配列に対するスキーマの動作を検証します。完了とは、両方のキーで2要素の場合のみが受け入れられることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100