Currently the following custom methods are supported:
- serializeJSONLD
- updateConfiguration
- filesInProject
- cleanDiagnosticTree
- fileUsage
- conversion
- serialization
- didChangeConfiguration command
- renameFile
After initialization, provides notifications with the JSONLD when available (updates with changes).
Notification message from server to client:
{ "uri": "DocumentUri", "model": "string" }
Client notification to update the ALS-specific configuration.
Notification message from client to server:
{ "formattingOptions": { "string": { "tabSize": "integer", "insertSpaces": "boolean" } }, "genericOptions": { "string": "any" }, "templateType": "NONE|SIMPLE|FULL" }
templateType
values:
- NONE: Turns templates off.
- SIMPLE: Template will only contain the first level.
- FULL: Template will contain the whole structure required for the definition. If no FULL option is available, by default it will show the SIMPLE template.
- BOTH: Template will contain both the first and second level.
After initialization, provides notifications about the files included in a project (updates with changes).
Notification message from server to client:
{ "uris": "DocumentUri[]" }
Performs validation on a given document (without the use of cache).
Request message from client to server:
{ "textDocument": "TextDocumentIdentifier" }
{ "uri": "DocumentUri", "diagnostics": "Diagnostic[]", "profile": "string" }
For a given document, generates a list of other documents that reference it.
Request message from client to server:
{ "uri": "DocumentUri" }
[ "Location" ]
For a given document, performs AMF conversion for compatible specifications.
Request message from client to server:
{ "uri": "DocumentUri", "target": "string", "syntax?": "string" }
target
values:
- OAS 2.0
- OAS 3.0
- RAML 0.8
- RAML 1.0
- ASYNC 2.0
- AMF Graph
syntax
values:
- json
- yaml
- raml
{ "uri": "DocumentUri", "model": "string" }
For a given document, serializes AMF towards a specific model (similar to the JSONLD notifications, but on demand
Request message from client to server:
{ "documentIdentifier": "TextDocumentIdentifier" }
{ "uri": "DocumentUri", "model": "string" }
Sent from the client to server to notice a new focus for a file, which will trigger new parse and diagnostic on isolated files (similar to textdocument/didOpen
).
Notification from client to server:
{ "uri": "DocumentUri", "version": "integer" }
Request from client to server to get the Workspace Configuration applied for a specific file.
Please bear in mind that the Workspace Configuration is not the same as the global Als Configuration.
{ "textDocument": "TextDocumentIdentifier" }
{ "workspace": string, "configuration": { "mainPath": string, "folder"?: string, "dependencies": string[], "customValidationProfiles": string[], "semanticExtensions": string[] } }
Where:
workspace
is the root folder of the workspace containing the filemainPath
is the main file uri of saidworkspace
folder
same asworkspace
[optional]dependencies
uris of all immutable dependencies of the projectcustomValidationProfiles
uris of all the active validation profiles on the workspacesemanticExtensions
uris of all the active semantic extensions on the workspace (Not yet implemented)
Request message from client to server's workspace/executeCommand
, to modify a workspace configuration.
{ "command": "didChangeConfiguration", "arguments": [ { "mainPath"?: string, "folder": string, "dependencies": [ { "uri": string, "scope"?: string } ] } ] }
Where:
folder
uri pointing to the workspace for which this configuration change will be appliedmainPath
[optional] sets the main file path of the workspace. Path will always be relative to the workspace folder uri.dependencies
the project's dependencies.file
the dependency URIscope
[optional] The scope given to the dependency, can have the following values:"custom-validation"
: Custom Validation Profile"semantic-extension"
: AML semantic extensions"dialect"
: AML dialects"dependency"
: cacheable dependency
{}
Request message from client to server's workspace/executeCommand
:
{ "command": "indexDialect", "arguments": [ { "uri": "DocumentUri", "content"?: "string" } ] }
If a content is not provided, the dialect will be loaded from the provided uri.
{}
WARNING: The use of these custom methods is discouraged and they will be removed in future release.
Deprecated in favor of willRename
, which is set to be implemented in the short run.
For a given document, provides all the requirements to rename the file and it's references inside a project.
Request message from client to server:
{ "oldDocument": "TextDocumentIdentifier", "newDocument": "TextDocumentIdentifier" }
{ "edits": "WorkspaceEdit" }
Deprecated in favor of the textDocument/didFocus
notification.
Request message from client to server's workspace/executeCommand
:
{ "command": "didFocusChange", "arguments": [ { "uri": "DocumentUri", "version": "integer" } ] }
{}