Skip to content

SwaggerParser.parse(String swaggerAsString) always returns null #59

@nmcb

Description

@nmcb

As it delegates to SwaggerParser.parse(String swaggerAsString, List<AuthorizationValue> auths) passing a null value as the second parameter which leads to the conditional statement in this method to always be false.

public Swagger parse(String swaggerAsString) {
    return parse(swaggerAsString, null);
}

public Swagger parse(String swaggerAsString, List<AuthorizationValue> auths) {
    Swagger output;
    try {
        output = new Swagger20Parser().parse(swaggerAsString);
        if (output != null && auths != null && auths.size() > 0) {
            return new SwaggerResolver().resolve(output, auths);
        }
    } catch (IOException e) {
        // continue;
    }
    return null;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions