Skip to content

Load schema content contributed by other extensions#451

Merged
evidolob merged 3 commits intoredhat-developer:masterfrom
evidolob:fix-opening-schema
Mar 24, 2021
Merged

Load schema content contributed by other extensions#451
evidolob merged 3 commits intoredhat-developer:masterfrom
evidolob:fix-opening-schema

Conversation

@evidolob
Copy link
Copy Markdown
Collaborator

What does this PR do?

Add ability to open JSON Schema content contributed by other extensions with ExtensionAPI.

Depends on redhat-developer/yaml-language-server#424

What issues does this PR fix or reference?

redhat-developer/yaml-language-server#412

Is it tested? How?

With test. To manual test, open any yaml which has json schema contributed with ExtensionAPI(any k8s yaml with k8s extension installed) and click on codelens over first line, it should open JSON Schema in editor tab.

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob requested a review from joshuawilson as a code owner March 16, 2021 14:28
@evidolob evidolob self-assigned this Mar 16, 2021
@evidolob evidolob requested a review from JPinkney as a code owner March 16, 2021 14:28
Copy link
Copy Markdown
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.

I've been playing around with this change and it's really great 👍

}

it('should handle "json-schema" url', async () => {
const docUri = getDocUri('completion/completion.yaml');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you run this test against windows you might need ${path.sep}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, test on windows passed successfully

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ok

Comment thread src/json-schema-content-provider.ts Outdated
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
@evidolob evidolob merged commit 3d82d61 into redhat-developer:master Mar 24, 2021
@evidolob evidolob deleted the fix-opening-schema branch March 24, 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