Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

OpenAPIV3Parser.resolve() should handle all errors in the entire spec

Open
#2,149 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, openapi
Domain
api

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from swagger-api/swagger-parser

All issues in swagger-api/swagger-parser

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.