Open stefan6419846 opened 1 year ago
Actually there is no public API yet, since nobody asked for it up to now. There is a remote API which covers all basic use cases, but no step API. And there is no additional documentation yet, on how to access all those values.
So using the public methods is a good approach. If you need more methods or a simpler access please let me know or provide a PR.
Thanks for the explanations. I agree that most users probably do not need to dig into these things and a documented external Groovy-based API has not the highest priority. Calling a JSON-based API might be feasible, but introduces the overhead for the HTTP requests and requires handling authentication etc.
As it turned out to take quite some time to understand how to get actual percentage strings and double values for the collected metrics (different class types for regular and delta values etc.), I would appreciate if at least some basic docs are provided. This might ensure that future changes at least take this into account as well.
Describe your use-case which is not covered by existing documentation.
I have to retrieve some coverage results from within a pipeline to do some custom handling with it. While this has been no real issue for the
warnings-ng-plugin
, it took me quite some time to figure out how to retrieve the desired values. Digging through the code, it seems like we need the following public calls:Is this the desired public API? Or is there any "easier" alternative?
Nevertheless, it might make sense to actually document snippets like this to avoid having to dig through the whole code of both the
code-coverage-api-plugin
andcoverage-model
.Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.
No response