Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwaggerParse Results need to refactor #2100

Open
sagartib opened this issue May 10, 2024 · 1 comment
Open

SwaggerParse Results need to refactor #2100

sagartib opened this issue May 10, 2024 · 1 comment

Comments

@sagartib
Copy link

SwaggerParseResults.. should show what are the warnings and errors, by some prefix or separate list like in ParseRoot..

Please help to fix.

@sagartib sagartib changed the title SwaggerParse Results need to refacto SwaggerParse Results need to refactor May 10, 2024
@sagartib
Copy link
Author

SwaggerParseResult giving merged results of Warnings and Error. there is no way can clearly separate from this list.

public SwaggerParseResult deserialize(JsonNode rootNode, String path) {
SwaggerParseResult result = new SwaggerParseResult();
ParseResult rootParse = new ParseResult();
OpenAPI api = this.parseRoot(rootNode, rootParse, path);
result.setOpenAPI(api);
result.setMessages(rootParse.getMessages());
return result;
}

However required results available in OpenAPIDeserializer- ParseResult,, which is protected.

if SwaggerParseResult output gives or other way to get warnings and errors separately, that would be helpful.. People can use them whether the swagger is valid or not.

or

allow them ParseOption to disable warnings and just return errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant