OpenAPIV3Parser.resolve() should handle all errors in the entire spec
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start at OpenAPIV3Parser.resolve(), especially its try-catch around spec resolution. Review how exceptions are added to SwaggerParseResult messages and determine how resolution can continue across paths and components; done means the result contains errors from the entire spec rather than stopping after the first exception.
Written by the indexing model from the issue text.
Description
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!
- Dominant language
- Java
- Stars
- 868
- Forks
- 560
- Avg merge
- 7m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from swagger-api/swagger-parser
-
InlineModelResolver.uniqueName throws StringIndexOutOfBoundsException for titles starting with a separator (camelCaseFlattenNaming)Possibly taken @arimu1 claimed this 36 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
swagger-api/swagger-parser#2386 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
swagger-api/swagger-parser#2168 ·
-
ResolveFully fails on internal references when the initial spec is read from a file URLPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
swagger-api/swagger-parser#1922 · 2 comments · 1 reaction ·
-
[Bug]: `ResolverFully` does not process OAS 3.1 combinators and skips nested OAS 3.1 schema-valued keywordsPossibly taken A pull request linked to this issue is open or already merged. OpenBug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
swagger-api/swagger-parser#2403 ·
-
[Bug]: Regression: resolveFully fails when components key does not match external file basenamePossibly taken A pull request linked to this issue is open or already merged. OpenBug
Difficulty 4/5 3-5 days Newbie friendliness 58/100
swagger-api/swagger-parser#2399 · 3 comments ·
All issues in swagger-api/swagger-parser
Similar issues
-
Clarify Javadoc for Logger methods taking Object... arguments with regards to Throwable detectionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
[Bug] The shared instance selector's placeholder and no-match text ignore the display languagePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
apache/rocketmq-dashboard#5561 ·
Maintainers usually reply within 3 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HMCL-dev/HMCL#6934 · 1 comment ·
Maintainers usually reply within 1 day
-
test(setup): GitHub configuration tests fail when the temp path is long enough for YAML foldingPossibly taken A pull request linked to this issue is open or already merged. Openbug good first issue help wanted priority medium size S
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
martin-francois/symphony-trello#776 · 1 comment ·
Maintainers usually reply within 1 day