redocly-cli icon indicating copy to clipboard operation
redocly-cli copied to clipboard

Add Junit XML as a linting result format

Open SyedAhkam opened this issue 9 months ago • 2 comments

Hi, I had been using Spectral CLI for linting and been looking to switch to Redocly's linting solution. At my workplace we have a CI Job which lints our OpenAPI specs, stores the test results and report them to CircleCI if any issues are recognized.

Now the issue is that CircleCI only supports uploading test results in Junit XML format which sadly Redocly does not support, hence I am writing this issue.

Adding a new option for the --format and writing a backend for it would be the expected solution. I can't comment on specifics.

An alternative I've been looking into is to convert from checkstyle to junit on the fly from within my CI Job before uploading the test results.

SyedAhkam avatar Mar 05 '25 15:03 SyedAhkam

You can also use the json output format as it's easier to work with.

tatomyr avatar Mar 05 '25 19:03 tatomyr

You can also use the json output format as it's easier to work with.

Yeah.. but the JSON output is specific to each tool which means I would need to write a helper script which converts the results to structured Junit.

It would be so convenient if Redocly has first class support for Junit XML as its a de facto standard when it comes to sharing test results b/w tools.

SyedAhkam avatar Mar 05 '25 20:03 SyedAhkam