yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

feat: add diagnostic data with missing properties

Open p-spacek opened this issue 3 years ago • 1 comments

What does this PR do?

When problem 'Property {0} is not allowed.' is found during diagnostic it will extend diagnostic.data by possible props that could be inside the object.

  • diagnostic.data = Object.keys(schema.properties) subtract seenProperties

then it can be used inside CodeAction to suggest proper properties instead of the wrong one.

What issues does this PR fix or reference?

no ref

Is it tested? How?

added tests

p-spacek avatar Sep 02 '22 12:09 p-spacek

Coverage Status

Coverage increased (+0.03%) to 82.984% when pulling b58cb211678f861bfddbd0632ab6379d8b4c930d on jigx-com:feat/add-diagnostic-data-with-missing-properties into 47290fedd1ebfb8c71cfa8327e855f96a84644e2 on redhat-developer:main.

coveralls avatar Sep 02 '22 12:09 coveralls

Are you also planning to contribute CodeAction changes?

gorkem avatar Sep 25 '22 16:09 gorkem

Are you also planning to contribute CodeAction changes?

I didn't plan it (I needed some customized functionality in client, so I didn't need it in YLS), but I can add it (but not sure when).

p-spacek avatar Oct 14 '22 10:10 p-spacek