combined schema (anyOf, allOf, oneOf) error message enhancement
还没有人认领这个 Issue。
评估
调研方向
首先,通过将 publish 设置为 dict 而不是 array,重现报告的 orquesta 任务转换,然后跟踪 schema 路径以 oneOf 结尾时出现的 schema 验证错误。完成的标准是:对于这个无效值,错误信息解释所接受的 string 或 array-of-dicts 选项。
由索引模型根据 Issue 内容生成。
描述
I think this goes here, but if it goes on StackStorm/st2, I can file the issue there.
This issue is about improving the error message returned when a schema validation error occurs due to not matching a oneOf schema.
I ran an orquesta workflow and for the task transition I used the incorrect:
publish:
message: foobar
instead of the correct:
publish:
- message: foobar
Doing that gave me an error message like:
{
"spec_path": "tasks.validate_input.next[0].publish",
"message": "{'error_message': 'wrong format for input param foobar: {{ ctx().foobar }}'} is not valid under any of the given schemas",
"type": "syntax",
"schema_path": "properties.tasks.patternProperties.^\\w+$.properties.next.items.properties.publish.oneOf"
},
Then, I went to look up the schema to figure out what I did wrong, mistakenly guessing that it didn't like my use of Jinja. My error was passing in a dict instead of an array. Could the error message be improved to say what the options are when the schemaPath is oneOf? (in this case string or array of unique one item dicts)
- 主要语言
- Python
- 星标
- 111
- 派生
- 45
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
StackStorm/orquesta 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
StackStorm/orquesta#275 ·
-
难度 3/5 1-2 天 新手友好度 35/100
StackStorm/orquesta#274 ·
-
难度 5/5 一周以上 新手友好度 25/100
StackStorm/orquesta#272 ·
-
难度 3/5 1-2 天 新手友好度 45/100
StackStorm/orquesta#268 ·
-
Vague error未关闭
难度 2/5 1-3 小时 新手友好度 45/100
StackStorm/orquesta#265 · 1 条评论 ·
查看 StackStorm/orquesta 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
pyjanitor-devs/pyjanitor#1758 ·
维护者通常 1 天内回复
-
bug ready for review
难度 2/5 1-3 小时 新手友好度 86/100
odysseus-dev/odysseus#6641 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
happypawspillaro/happypaws#78 ·
维护者通常 4 天内回复
-
pydanty:is-working
难度 2/5 1-3 小时 新手友好度 82/100
pydantic/pydantic-ai#10020 ·
维护者通常 1 天内回复
-
stdlib type-bug
难度 2/5 1-3 小时 新手友好度 68/100
python/cpython#159044 · 4 条评论 ·
维护者通常 1 天内回复