This repository has been archived by the owner on Apr 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
How to set schema without modifying the JSON object itself? #1
Comments
I don't understand what object are you talking about
I explained here how to load json schemas with this server
atom/ide-json#2
…On 14 Feb 2018 10:34, "Dan Rosén" ***@***.***> wrote:
I can make the server use a schema by adding something like this to the
root of the object:
"$schema": "http://json.schemastore.org/package",
Is there a way to tell the language service to load a schema without
modifying the object?
Ideally there should be a way to express schema defaultiing based on
filename (for example).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIdDzCsX0Y0uP1tppormaMTdZcGkd7d8ks5tUqi-gaJpZM4SFBWt>
.
|
The object I'm editing. Say I have a buffer with {
"name": "example-pkg",
"license": "MIT",
"version": "0.1.0",
... Now I can get package.json-intellisense by modifing the json object in the buffer like so: {
"$schema": "http://json.schemastore.org/package",
"name": "example-pkg",
"license": "MIT",
"version": "0.1.0",
... |
O_o
I don't known this feature, I'm learning something thanks you
However to add default schema based on file name you must use the
jsonSchema/association notification to instruct the language server which
schema to load
…On 14 Feb 2018 11:46, "Dan Rosén" ***@***.***> wrote:
The object I'm editing. Say I have a buffer with package.json open, which
starts something like this:
{
"name": "example-pkg",
"license": "MIT",
"version": "0.1.0",
...
Now I can get package.json-intellisense by modifing the json object in the
buffer like so:
{
"$schema": "http://json.schemastore.org/package",
"name": "example-pkg",
"license": "MIT",
"version": "0.1.0",
...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIdDzDmmGNbv25i61CttIGvSQ8GSzo5qks5tUrl9gaJpZM4SFBWt>
.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I can make the server use a schema by adding something like this to the root of the object:
Is there a way to tell the language service to load a schema without modifying the object?
Ideally there should be a way to express schema defaultiing based on filename (for example).
The text was updated successfully, but these errors were encountered: