Open languitar opened 5 months ago
Are your specs written in json or yaml?
We use yaml
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.
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.
Update: I am making good progress on this. Here's a working example of oasdiff providing the source code line within a GitHub annotation: https://github.com/oasdiff/github-demo/actions/runs/12018342867 Click the annotation to see the breaking change in the context of the OpenAPI spec: https://github.com/oasdiff/github-demo/commit/ee32aefdce17a7e6e0422178479775e2744a51a5#annotation_29032785074
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