Tufin / oasdiff

OpenAPI Diff and Breaking Changes
https://www.oasdiff.com
Apache License 2.0
663 stars 59 forks source link

Provide source code lines when reporting breaking changes #574

Open languitar opened 1 month ago

languitar commented 1 month ago

Is your feature request related to a problem? Please describe.

Currently, breaking change detection provides no source code lines. As a result, the annotations placed in GitHub via the githubactions format are always attached to the first line of the file. This makes it harder than necessary to trace the origin of the problematic source code change.

Describe the solution you'd like

Where possible, detected breaking changes should be associated with the source line of the closes affected concept. For instance, if a mandatory property is removed from a model, then the source code line could be the start of the model or, even better, the line the removal took place.

Describe alternatives you've considered

None

Additional context

None

reuvenharrison commented 1 month ago

Are your specs written in json or yaml?

languitar commented 1 month ago

We use yaml

reuvenharrison commented 1 month ago

Looks like we may have a way to implement this but it requires some heavy lifting. Before making this investment, it would be great to hear from users how much value this would provide.

reuvenharrison commented 1 month ago

For other people looking at this, here is a demonstration of this limitation: https://github.com/oasdiff/github-demo/actions/runs/9797247511 When clicking the annotations you get redirected to the first line of the spec instead of the specific line that was changed.