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

Provide a usage example in the readme #39

Closed
aeschli opened this issue Apr 10, 2019 · 8 comments
Closed

Provide a usage example in the readme #39

aeschli opened this issue Apr 10, 2019 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Apr 10, 2019

No description provided.

@GeorgeGkas
Copy link

What do we expect to get from the example? What should we document? Why?

@cdietschrun
Copy link

This came from an internal email request. Basically, I'm a consumer of this service via npm packages, and it was very difficult to piece together what APIs I needed to call, or what objects I needed to prepare/pass to the API to make even the one call for doValidation make sense. We think examples of this would make sense.

I'm back on this subject as I'm trying to figure out how to use the JSONSchemaService (preferable the TypeScript itself and not just the javascript) and I'm not sure how to do that, since there's no getter for the schema service inside the language service, and I'm not sure why the npm packge (vscode-json-languageservice) doesn't seem to have Typescript code for anything but the language service.

@aeschli
Copy link
Contributor Author

aeschli commented May 15, 2019

JSONSchemaService is considered an implementation detail. You should only use the API's as present in the json language service. That's the API we keep stable and that's the APIs we want to create samples for to illustrate the usage.

@cdietschrun
Copy link

OK, sure. I really want to be able to do the schema parsing/resolution that you do in the schema service, though. What would you recommend I do?

@aeschli
Copy link
Contributor Author

aeschli commented May 17, 2019

What do you want to do with the resolved scheme?
For validation, use doValidation.

@cdietschrun
Copy link

My hope was to pass it along to something like react-jsonschema-form

@mtangoo
Copy link

mtangoo commented Jul 27, 2019

I have the same question. I want to use this with our Inhouse editor. But there are no instruction how to launch it. We want to use it over TCP not STDIO

@aeschli
Copy link
Contributor Author

aeschli commented Jul 29, 2019

@mtangoo The JSON language service is just a library that you can add as a node modules, for example in a language server. You probably are looking for samples for language servers. Have a look here:
https://www.npmjs.com/package/vscode-json-languageserver#integrate

@aeschli aeschli added the feature-request Request for new features or functionality label Oct 14, 2019
@aeschli aeschli added this to the Backlog milestone Oct 14, 2019
@aeschli aeschli modified the milestones: Backlog, November 2020 Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants