Skip to content

Dynamic schema does not update when changing for current document and not using $schema property #106

@dsherret

Description

@dsherret

I am using a dynamic schema in an vscode extension that implements an vscode.TextDocumentContentProvider that fires an onDidChange event on schema change. This in turn sends a schema content change notification (json/schemaContent) to the language server, which calls this language service's languageService.resetSchema(uri).

That's all good, but unfortunately the JsonSchemaService does not clear its current document cache in this scenario. So this means dynamic schema changes to the current viewing file do not cause any schema changes (In my scenario, the user specifies plugins in the JSON file and based on what plugins they specify the configuration changes).

I've opened #105 to resolve this issue.

Workarounds for user:

  1. Change the JSON plugin settings so it clears all the cached schemas.
  2. View another JSON file with a schema then switch back to the other file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions