OpenAPIV3Parser.resolve() should handle all errors in the entire spec
还没有人认领这个 Issue。
评估
调研方向
从 OpenAPIV3Parser.resolve() 开始,重点查看其围绕 spec 解析的 try-catch。检查异常如何添加到 SwaggerParseResult 消息中,并确定如何跨 paths 和 components 继续解析;完成的标准是结果包含整个 spec 中的错误,而不是在第一个异常后停止。
由索引模型根据 Issue 内容生成。
描述
Hi, currently we've faced the issue on our project:
OpenAPIV3Parser.resolve() is wrapped with the try-catch and when any error occurs within it, e.g. path is incorrect or a component is wrongly defined, the exception is thrown and caught by that try-catch (typical try-catch behaviour). In this way the spec validation stops and not proceeded to further paths and components:
private SwaggerParseResult resolve(SwaggerParseResult result, List<AuthorizationValue> auth, ParseOptions options,
String location) {
try {
// any exception here stops the spec parsing
} catch (Exception e) {
LOGGER.warn("Exception while resolving:", e);
result.getMessages().add(e.getMessage());
}
return result;
}
It would be perfect to collect all such errors and not to get limited to a single one.
Please tell if it's possible,
Many thanks!
- 主要语言
- Java
- 星标
- 870
- 派生
- 565
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
swagger-api/swagger-parser 的其他 Issue
-
InlineModelResolver.uniqueName throws StringIndexOutOfBoundsException for titles starting with a separator (camelCaseFlattenNaming)可能已有人在做 @arimu1 于 50 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
swagger-api/swagger-parser#2386 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
swagger-api/swagger-parser#2168 ·
-
ResolveFully fails on internal references when the initial spec is read from a file URL可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
swagger-api/swagger-parser#1922 · 2 条评论 · 1 个 reaction ·
-
[Bug]: Discriminator mapping of a oneOf nested in array items gets a null key and is no longer updated after external ref resolution (regression since 2.1.36)可能已有人在做 @wyhasany 于 5 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
swagger-api/swagger-parser#2406 · 1 条评论 ·
-
[Question]: Guidance on jackson-coreutils vulnerabilities in legacy Swagger compatibility dependency未关闭Question
难度 5/5 一周以上 新手友好度 8/100
swagger-api/swagger-parser#2405 ·
查看 swagger-api/swagger-parser 的全部 Issue
相似的 Issue
-
[Bug] Lock owned by another client (e.g. Text app) cannot be unlocked from the app可能已有人在做 @falkloewert 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
oracle/graalvm-reachability-metadata#11026 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
CodeForPhilly/benefit-decision-toolkit#565 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
checkstyle/checkstyle#22050 · 1 条评论 ·
维护者通常 1 天内回复