Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code action to open json schema #395

Merged
merged 12 commits into from
Feb 12, 2021

Conversation

evidolob
Copy link
Collaborator

@evidolob evidolob commented Jan 18, 2021

What does this PR do?

Adds code action to open json schema, this code action will be available only for JSON Schema specific error/warnings, only for schemas which URI has file(local schemas) or https (remote, usually for schema store).

Demo:
ezgif com-gif-maker (10)

ezgif com-gif-maker (9)

Note: to be able to open files from LS this PR also update vscode-languageclient to 7.0.0 version

VSCode extension part: redhat-developer/vscode-yaml#418

What issues does this PR fix or reference?

redhat-developer/vscode-yaml#174

Is it tested? How?

To test this you need redhat-developer/vscode-yaml#418 also, just build both and run extension, open any yaml file with schema associated, make some error in it, after error appeared in editor, there are yellow bulb should appeared for line with error, just click on it, an click on Jump to schema location and you should see JSON scheme opened in editor.

@evidolob evidolob self-assigned this Jan 18, 2021
@evidolob evidolob marked this pull request as draft January 18, 2021 13:15
Copy link
Contributor

@JPinkney JPinkney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than my one comment and the github action comments it looks good to me

src/languageservice/services/yamlCodeActions.ts Outdated Show resolved Hide resolved
Signed-off-by: Yevhen Vydolob <[email protected]>
@coveralls
Copy link

coveralls commented Jan 20, 2021

Coverage Status

Coverage decreased (-0.5%) to 76.053% when pulling 426ee1d on evidolob:open-schema into 19df4f0 on redhat-developer:master.

@evidolob evidolob added this to the 0.15.0 milestone Jan 20, 2021
@evidolob evidolob marked this pull request as ready for review January 26, 2021 07:47
Signed-off-by: Yevhen Vydolob <[email protected]>
Copy link
Contributor

@JPinkney JPinkney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Yevhen Vydolob <[email protected]>
@evidolob evidolob modified the milestones: 0.15.0, 0.16.0 Feb 10, 2021
@evidolob evidolob merged commit b241d78 into redhat-developer:master Feb 12, 2021
@evidolob evidolob deleted the open-schema branch February 12, 2021 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants