Option group `requestComplexity` is described as accepting `-1` for every property, but `allowRegex` is a boolean

未关闭 适合新手
#10,870 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
85/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃

调研方向

阅读 src/Options/index.js 中 requestComplexity 的描述,并将其与布尔选项 allowRegex 进行比较。更新措辞以明确指定数值属性,然后运行 npm run definitions 重新生成 src/Options/Definitions.js 和 src/Options/docs.js。当这三处描述都准确地将有关 -1 的说明限定于数值属性时,即为完成。

由索引模型根据 Issue 内容生成。

描述

New Issue Checklist
Issue Description

The description of the requestComplexity option group in src/Options/index.js ends with:

Each property can be set to -1 to disable that specific limit.

The group also contains requestComplexity.allowRegex, which is a boolean option (parsers.booleanParser). Setting it to -1 is rejected by the boolean validation, so the sentence only applies to the numeric limits (includeDepth, includeCount, subqueryDepth, subqueryLimit, queryDepth, graphQLDepth, graphQLFields, batchRequestLimit). The same sentence is replicated in the generated src/Options/Definitions.js and src/Options/docs.js.

Steps to reproduce

Start Parse Server with:

requestComplexity: { allowRegex: -1 }
Actual Outcome

Startup fails with the boolean validation error (requestComplexity.allowRegex must be a boolean.), although the option group description says each property can be set to -1.

Expected Outcome

The description is accurate for every property in the group, for example:

Each numeric property can be set to -1 to disable that specific limit.

Changed in src/Options/index.js and regenerated with npm run definitions.

Environment

Server

  • Parse Server version: 9.11.1-alpha.2
  • Operating system: n/a (documentation)
  • Local or remote host: n/a

Database

  • System (MongoDB or Postgres): n/a
  • Database version: n/a
  • Local or remote host: n/a

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): n/a
  • SDK version: n/a
Logs

n/a

主要语言
JavaScript
星标
21.4k
派生
4.8k
平均合并
7 小时 8 分钟
30 天内合并 PR
65

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

parse-community/parse-server 的其他 Issue

查看 parse-community/parse-server 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。