The `submit_permission` dependency causes duplicate validation errors
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
The duplicate errors come from the submit_permission dependency deserialising the request body separately from the main /api/v1/tasks endpoint. Start by finding that dependency and where it reads TaskRequest, then compare it with a test endpoint that has no dependency, which returns one error. Done means one validation error for an invalid TaskRequest on the tasks endpoint, with the existing tests still passing.
由索引模型根据 Issue 内容生成。
描述
Found while looking into #1802, if an invalid TaskRequest is passed to the /api/v1/tasks endpoint, two validation errors are returned instead of the expected one.
$ curl -H "Authorization: Bearer ${TOKEN}" http://localhost:8000/api/v1/demo --json '{"name": "count", "params": [], "instrument_session": "cm12345-1"}' | jq
{
"detail": [
{
"type": "dict_type",
"loc": [
"body",
"params"
],
"msg": "Input should be a valid dictionary",
"input": []
},
{
"type": "dict_type",
"loc": [
"body",
"params"
],
"msg": "Input should be a valid dictionary",
"input": []
}
]
}
This seems to be from deserialising the task for the main endpoint, as well as for the submit_permission. Passing the same JSON to a test endpoint without the dependency returns a single error.
- 主要语言
- Python
- 星标
- 14
- 派生
- 15
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 35
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
DiamondLightSource/blueapi 的其他 Issue
-
bug support: low
难度 2/5 1-3 小时 新手友好度 70/100
DiamondLightSource/blueapi#1802 · 1 条评论 ·
维护者通常 2 天内回复
-
support: low
难度 2/5 1-3 小时 新手友好度 68/100
DiamondLightSource/blueapi#1772 · 2 条评论 ·
维护者通常 2 天内回复
-
deployment dev-environment
难度 2/5 1-3 小时 新手友好度 75/100
DiamondLightSource/blueapi#1623 · 2 条评论 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
DiamondLightSource/blueapi#1605 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
DiamondLightSource/blueapi#1494 ·
维护者通常 2 天内回复
查看 DiamondLightSource/blueapi 的全部 Issue
相似的 Issue
-
needs-triage
难度 2/5 1-3 小时 新手友好度 86/100
MakazhanAlpamys/Soup#3589 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
ClickHouse/clickhouse-connect#1266 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
biosustain/growthcurves_app#89 ·
维护者通常 1 天内回复
-
`LogProxyConsumer._on_relation_departed` raises `APIError` when the promtail service does not exist未关闭
难度 2/5 1-3 小时 新手友好度 78/100
canonical/loki-k8s-operator#695 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复