question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error using JSON schema

See original GitHub issue

Test case:

{
	"$schema": "http://json.schemastore.org/package"
}

Error

Unable to load schema from ‘http://json.schemastore.org/package’. No schema request service available

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
aeschlicommented, Mar 7, 2019

You are right, the default settings are not meant to be modified. This is the currect code:

monaco.languages.json.jsonDefaults.setDiagnosticsOptions({ validate: true, allowComments: false, schemas: [], enableSchemaRequest: true});

monaco.editor.create(document.getElementById("container"), {
	value: '{\n  "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/package.json",\n  "author": {}\n}',
	language: "json"
});
0reactions
oldrich-scommented, Mar 7, 2019

@aeschli When I include monaco.languages.json.jsonDefaults.diagnosticsOptions.enableSchemaRequest = true; I get:

Cannot assign to 'enableSchemaRequest' because it is a constant or a read-only property.

(property) monaco.languages.json.DiagnosticsOptions.enableSchemaRequest?: boolean | undefined

If set, the schema service would load schema content on-demand with 'fetch' if available`

Is that a bug?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Json schema validation error - Stack Overflow
This errors happen when validating the JSON with the schema draft-04 or higher, the problem is that "id ...
Read more >
Handling Validation Errors - python-jsonschema
If you want to programmatically query which validation keywords failed when validating a given instance, you may want to do so using jsonschema.exceptions....
Read more >
JSON Schema validation error rule - Forums - IBM Support
I am trying to validate JSON message using "Validate Document via JSON Schema URL" option available on validate action in MPGW service. And...
Read more >
A Vocabulary for Structural Validation of JSON - JSON Schema
JSON Schema (application/schema+json) has several purposes, one of which is JSON instance validation. This document specifies a vocabulary for JSON Schema ...
Read more >
Validate with validation error messages - Json.NET
Schema.Extensions.IsValid(Newtonsoft.Json.Linq.JToken,Newtonsoft.Json.Schema.JsonSchema) extension method and returns error messages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found