Skip to content

Instantly share code, notes, and snippets.

@tonyfast
Forked from bollwyvl/LICENSE
Created June 19, 2020 01:44

Revisions

  1. @bollwyvl bollwyvl revised this gist Oct 25, 2019. 2 changed files with 114 additions and 103 deletions.
    13 changes: 8 additions & 5 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,16 @@
    # Towards a JSON Schema for the Language Server Protocol
    <div style="font-size: 48px;">Towards a JSON Schema for the Language Server Protocol</div>

    _Thoughts on a [machine-readable][], language-agnostic specification of the
    [Language Server Protocol][] in [JSON Schema][]._

    **tl,dr: Using [ts-json-schema-generator][] with some code generated from the spec yields a fairly robust schema ([JSON](./generated.protocol.schema.json) or [YAML](./generated.protocol.schema.yml)).**

    [machine-readable]: https://github.com/microsoft/language-server-protocol/issues/67
    [Language Server Protocol]: https://microsoft.github.io/language-server-protocol
    [JSON Schema]: https://json-schema.org
    [ts-json-schema-generator]: https://github.com/vega/ts-json-schema-generator

    View on:
    - [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/master?urlpath=lab%2Ftree%2FTowards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)
    - [nbviewer](https://nbviewer.jupyter.org/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/Towards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)
    - [gist](https://gist.github.com/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7)
    > Viewable on:
    > - [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/master?urlpath=lab%2Ftree%2FTowards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)
    > - [nbviewer](https://nbviewer.jupyter.org/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/Towards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)
    > - [gist](https://gist.github.com/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7)
    204 changes: 106 additions & 98 deletions Towards a JSON Schema for the Language Server Protocol.ipynb
    Original file line number Diff line number Diff line change
    @@ -9,14 +9,24 @@
    "_Thoughts on a [machine-readable][], language-agnostic specification of the\n",
    "[Language Server Protocol][] in [JSON Schema][]._\n",
    "\n",
    "**tl,dr: Using [ts-json-schema-generator][] with some code generated from the spec yields a fairly robust schema ([JSON](./generated.protocol.schema.json) or [YAML](./generated.protocol.schema.yml)).**\n",
    "\n",
    "[machine-readable]: https://github.com/microsoft/language-server-protocol/issues/67\n",
    "[Language Server Protocol]: https://microsoft.github.io/language-server-protocol\n",
    "[JSON Schema]: https://json-schema.org\n",
    "[ts-json-schema-generator]: https://github.com/vega/ts-json-schema-generator\n",
    "\n",
    "> Viewable on:\n",
    "> - [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/master?urlpath=lab%2Ftree%2FTowards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)\n",
    "> - [nbviewer](https://nbviewer.jupyter.org/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/Towards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)\n",
    "> - [gist](https://gist.github.com/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7)\n",
    "> - [gist](https://gist.github.com/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7)"
    ]
    },
    {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
    "# Motivation\n",
    "\n",
    "The Language Server community would benefit from a more [machine-readable](https://github.com/microsoft/language-server-protocol/issues/67) description of the Language Server Protocol Specification.\n",
    "\n",
    @@ -189,42 +199,40 @@
    "\u001b[2K\u001b[1G\u001b[2m[1/5]\u001b[22m Validating package.json...\n",
    "\u001b[2K\u001b[1G\u001b[2m[2/5]\u001b[22m Resolving packages...\n",
    "\u001b[1G⠁ \u001b[0K\u001b[2K\u001b[1G\u001b[2K\u001b[1G\u001b[32msuccess\u001b[39m Already up-to-date.\n",
    "\u001b[2K\u001b[1GDone in 0.44s.\n",
    "\u001b[2K\u001b[1GDone in 0.43s.\n",
    "\u001b[2K\u001b[1G\u001b[1myarn run v1.15.2\u001b[22m\n",
    "\u001b[2K\u001b[1G\u001b[2m$ tsc\u001b[22m\n",
    "\u001b[2K\u001b[1GDone in 2.74s.\n",
    "\u001b[K\u001b[?25haudited 334 packages in 3.943s/ postinstall: \u001b[7msill\u001b[0m \u001b[35minstall\u001b[0m executeActions\u001b[0m\u001b[K0m\u001b[K.18.\u001b[0m\u001b[KK\n",
    "\u001b[2K\u001b[1GDone in 2.65s.\n",
    "\u001b[K\u001b[?25haudited 334 packages in 4.137s/ postinstall: \u001b[7msill\u001b[0m \u001b[35minstall\u001b[0m executeActions\u001b[0m\u001b[K0m\u001b[K.18.\u001b[0m\u001b[KK\n",
    "found \u001b[92m0\u001b[0m vulnerabilities\n",
    "\n",
    "\u001b[K\u001b[?25h \u001b[27m\u001b[90m...........\u001b[0m] - postinstall: \u001b[7msill\u001b[0m \u001b[35minstall\u001b[0m executeActions\u001b[0m\u001b[K0m\u001b[Km\u001b[K\u001b[0m\u001b[KK\n",
    "\u001b[K\u001b[?25h \u001b[27m\u001b[90m...........\u001b[0m] - postinstall: \u001b[7msill\u001b[0m \u001b[35minstall\u001b[0m executeActions\u001b[0m\u001b[K0m\u001b[KlTre\u001b[0m\u001b[KK\n",
    "> vscode-lsp@1.0.0 postinstall /home/weg/Documents/projects/lsp-json-schema/vscode-languageserver-node\n",
    "> cd types && npm install && cd ../jsonrpc && npm install && cd ../protocol && npm install && cd ../server && npm install && cd ../client && npm install && cd ../client-tests && npm install && cd ..\n",
    "\n",
    "\u001b[K\u001b[?25hup to date in 0.453s....\u001b[0m] \\ prepare:types: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageserver-type\u001b[0m\u001b[K\n",
    "\u001b[K\u001b[?25hup to date in 0.417s....\u001b[0m] \\ prepare:types: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageserver-type\u001b[0m\u001b[K\n",
    "found \u001b[92m0\u001b[0m vulnerabilities\n",
    "\n",
    "\u001b[K\u001b[?25hup to date in 0.531s....\u001b[0m] - prepare:jsonrpc: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-jsonrpc@5.0.0-nex\u001b[0m\u001b[K\n",
    "\u001b[K\u001b[?25hup to date in 0.478s....\u001b[0m] - prepare:jsonrpc: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-jsonrpc@5.0.0-nex\u001b[0m\u001b[K\n",
    "found \u001b[92m0\u001b[0m vulnerabilities\n",
    "\n",
    "\u001b[K\u001b[?25haudited 2 packages in 0.494s] \\ prepare:protocol: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageserver-p\u001b[0m\u001b[K\n",
    "\u001b[K\u001b[?25haudited 2 packages in 0.761s] \\ prepare:protocol: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageserver-p\u001b[0m\u001b[K\n",
    "found \u001b[92m0\u001b[0m vulnerabilities\n",
    "\n",
    "\u001b[K\u001b[?25haudited 4 packages in 0.484s] \\ prepare:server: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageserver@6.0\u001b[0m\u001b[K\n",
    "\u001b[K\u001b[?25haudited 4 packages in 0.478s] \\ prepare:server: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageserver@6.0\u001b[0m\u001b[K\n",
    "found \u001b[92m0\u001b[0m vulnerabilities\n",
    "\n",
    "\u001b[K\u001b[?25haudited 28 packages in 0.677s \\ prepare:client: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageclient@6.0\u001b[0m\u001b[K\n",
    "\u001b[K\u001b[?25haudited 28 packages in 1.403s \\ prepare:client: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscode-languageclient@6.0\u001b[0m\u001b[K\n",
    "found \u001b[92m0\u001b[0m vulnerabilities\n",
    "\n",
    "\u001b[K\u001b[?25h\u001b[37;40mnpm\u001b[0m \u001b[0m\u001b[30;43mWARN\u001b[0m\u001b[35m\u001b[0m text-extension@0.0.1 No descriptioneActions\u001b[0m\u001b[K0m\u001b[KepsI\u001b[0m\u001b[KK\n",
    "\u001b[0m\u001b[37;40mnpm\u001b[0m \u001b[0m\u001b[30;43mWARN\u001b[0m\u001b[35m\u001b[0m text-extension@0.0.1 No repository field.\n",
    "\u001b[0m\u001b[37;40mnpm\u001b[0m \u001b[0m\u001b[30;43mWARN\u001b[0m\u001b[35m\u001b[0m text-extension@0.0.1 No license field.\n",
    "\u001b[0m\n",
    "\u001b[K\u001b[?25haudited 93 packages in 1.023s - prepare:client-tests: \u001b[30;43mWARN\u001b[0m text-extension@0.0.1 No licen\u001b[0m\u001b[K[0m\u001b[K\n",
    "\u001b[K\u001b[?25haudited 93 packages in 0.745s - prepare:client-tests: \u001b[30;43mWARN\u001b[0m text-extension@0.0.1 No licen\u001b[0m\u001b[K[0m\u001b[K\n",
    "found 1 \u001b[91mhigh\u001b[0m severity vulnerability\n",
    " run `npm audit fix` to fix them, or `npm audit` for details\n",
    "\u001b[K\u001b[?25haudited 334 packages in 13.785s prepare:vscode-languageserver-node: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscod\u001b[0m\u001b[K[0m\u001b[K\n",
    "found \u001b[92m0\u001b[0m vulnerabilities\n",
    "\n"
    "\u001b[K\u001b[?25hup to date in 15.65s....\u001b[0m] | prepare:vscode-languageserver-node: \u001b[32minfo\u001b[0m \u001b[35mlifecycle\u001b[0m vscod\u001b[0m\u001b[K[0m\u001b[K\n"
    ]
    }
    ],
    @@ -3903,28 +3911,28 @@
    " <td>None</td>\n",
    " </tr>\n",
    " <tr>\n",
    " <th>_raw_result</th>\n",
    " <td>`CodeLens`</td>\n",
    " <td>`CompletionItem`</td>\n",
    " <td>`DocumentLink`</td>\n",
    " <td>`InitializeResult` defined as follows:</td>\n",
    " <td>null</td>\n",
    " <td>`(Command | CodeAction)[]` \\| `null` where `Co...</td>\n",
    " <td>`CodeLens[]` \\| `null` defined as follows:</td>\n",
    " <td>`ColorPresentation[]` defined as follows:</td>\n",
    " <td>`CompletionItem[]` \\| `CompletionList` \\| `nul...</td>\n",
    " <td>[`Location`](#location) \\| [`Location`](#locat...</td>\n",
    " <th>title</th>\n",
    " <td>Code Lens Resolve Request</td>\n",
    " <td>Completion Item Resolve Request</td>\n",
    " <td>Document Link Resolve Request</td>\n",
    " <td>Initialize Request</td>\n",
    " <td>Shutdown Request</td>\n",
    " <td>Code Action Request</td>\n",
    " <td>Code Lens Request</td>\n",
    " <td>Color Presentation Request</td>\n",
    " <td>Completion Request</td>\n",
    " <td>Goto Declaration Request</td>\n",
    " <td>...</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>DidSaveTextDocument Notification</td>\n",
    " <td>WillSaveTextDocument Notification</td>\n",
    " <td>DidChangeConfiguration Notification</td>\n",
    " <td>DidChangeWatchedFiles Notification</td>\n",
    " <td>DidChangeWorkspaceFolders Notification</td>\n",
    " <td>Cancellation Support</td>\n",
    " <td>Telemetry Notification</td>\n",
    " <td>PublishDiagnostics Notification</td>\n",
    " <td>LogMessage Notification</td>\n",
    " <td>ShowMessage Notification</td>\n",
    " </tr>\n",
    " <tr>\n",
    " <th>_raw_params</th>\n",
    @@ -3951,28 +3959,28 @@
    " <td>`ShowMessageParams` defined as follows:</td>\n",
    " </tr>\n",
    " <tr>\n",
    " <th>title</th>\n",
    " <td>Code Lens Resolve Request</td>\n",
    " <td>Completion Item Resolve Request</td>\n",
    " <td>Document Link Resolve Request</td>\n",
    " <td>Initialize Request</td>\n",
    " <td>Shutdown Request</td>\n",
    " <td>Code Action Request</td>\n",
    " <td>Code Lens Request</td>\n",
    " <td>Color Presentation Request</td>\n",
    " <td>Completion Request</td>\n",
    " <td>Goto Declaration Request</td>\n",
    " <th>_raw_result</th>\n",
    " <td>`CodeLens`</td>\n",
    " <td>`CompletionItem`</td>\n",
    " <td>`DocumentLink`</td>\n",
    " <td>`InitializeResult` defined as follows:</td>\n",
    " <td>null</td>\n",
    " <td>`(Command | CodeAction)[]` \\| `null` where `Co...</td>\n",
    " <td>`CodeLens[]` \\| `null` defined as follows:</td>\n",
    " <td>`ColorPresentation[]` defined as follows:</td>\n",
    " <td>`CompletionItem[]` \\| `CompletionList` \\| `nul...</td>\n",
    " <td>[`Location`](#location) \\| [`Location`](#locat...</td>\n",
    " <td>...</td>\n",
    " <td>DidSaveTextDocument Notification</td>\n",
    " <td>WillSaveTextDocument Notification</td>\n",
    " <td>DidChangeConfiguration Notification</td>\n",
    " <td>DidChangeWatchedFiles Notification</td>\n",
    " <td>DidChangeWorkspaceFolders Notification</td>\n",
    " <td>Cancellation Support</td>\n",
    " <td>Telemetry Notification</td>\n",
    " <td>PublishDiagnostics Notification</td>\n",
    " <td>LogMessage Notification</td>\n",
    " <td>ShowMessage Notification</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " <td>None</td>\n",
    " </tr>\n",
    " </tbody>\n",
    "</table>\n",
    @@ -3983,135 +3991,135 @@
    "type ↩️ \\\n",
    "method codeLens/resolve \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result `CodeLens` \n",
    "_raw_params `CodeLens` \n",
    "title Code Lens Resolve Request \n",
    "_raw_params `CodeLens` \n",
    "_raw_result `CodeLens` \n",
    "\n",
    "type \\\n",
    "method completionItem/resolve \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result `CompletionItem` \n",
    "_raw_params `CompletionItem` \n",
    "title Completion Item Resolve Request \n",
    "_raw_params `CompletionItem` \n",
    "_raw_result `CompletionItem` \n",
    "\n",
    "type \\\n",
    "method documentLink/resolve \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result `DocumentLink` \n",
    "_raw_params `DocumentLink` \n",
    "title Document Link Resolve Request \n",
    "_raw_params `DocumentLink` \n",
    "_raw_result `DocumentLink` \n",
    "\n",
    "type \\\n",
    "method initialize \n",
    "_raw_error None \n",
    "_raw_result `InitializeResult` defined as follows: \n",
    "_raw_params `InitializeParams` defined as follows: \n",
    "title Initialize Request \n",
    "_raw_params `InitializeParams` defined as follows: \n",
    "_raw_result `InitializeResult` defined as follows: \n",
    "\n",
    "type \\\n",
    "method shutdown \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result null \n",
    "_raw_params void \n",
    "title Shutdown Request \n",
    "_raw_params void \n",
    "_raw_result null \n",
    "\n",
    "type \\\n",
    "method textDocument/codeAction \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result `(Command | CodeAction)[]` \\| `null` where `Co... \n",
    "_raw_params `CodeActionParams` defined as follows: \n",
    "title Code Action Request \n",
    "_raw_params `CodeActionParams` defined as follows: \n",
    "_raw_result `(Command | CodeAction)[]` \\| `null` where `Co... \n",
    "\n",
    "type \\\n",
    "method textDocument/codeLens \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result `CodeLens[]` \\| `null` defined as follows: \n",
    "_raw_params `CodeLensParams` defined as follows: \n",
    "title Code Lens Request \n",
    "_raw_params `CodeLensParams` defined as follows: \n",
    "_raw_result `CodeLens[]` \\| `null` defined as follows: \n",
    "\n",
    "type \\\n",
    "method textDocument/colorPresentation \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result `ColorPresentation[]` defined as follows: \n",
    "_raw_params `ColorPresentationParams` defined as follows \n",
    "title Color Presentation Request \n",
    "_raw_params `ColorPresentationParams` defined as follows \n",
    "_raw_result `ColorPresentation[]` defined as follows: \n",
    "\n",
    "type \\\n",
    "method textDocument/completion \n",
    "_raw_error code and message set in case an exception happ... \n",
    "_raw_result `CompletionItem[]` \\| `CompletionList` \\| `nul... \n",
    "_raw_params `CompletionParams` defined as follows: \n",
    "title Completion Request \n",
    "_raw_params `CompletionParams` defined as follows: \n",
    "_raw_result `CompletionItem[]` \\| `CompletionList` \\| `nul... \n",
    "\n",
    "type ... \\\n",
    "method textDocument/declaration ... \n",
    "_raw_error code and message set in case an exception happ... ... \n",
    "_raw_result [`Location`](#location) \\| [`Location`](#locat... ... \n",
    "_raw_params [`TextDocumentPositionParams`](#textdocumentpo... ... \n",
    "title Goto Declaration Request ... \n",
    "_raw_params [`TextDocumentPositionParams`](#textdocumentpo... ... \n",
    "_raw_result [`Location`](#location) \\| [`Location`](#locat... ... \n",
    "\n",
    "type ➡️ \\\n",
    "method textDocument/didSave \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `DidSaveTextDocumentParams` defined as follows: \n",
    "title DidSaveTextDocument Notification \n",
    "_raw_params `DidSaveTextDocumentParams` defined as follows: \n",
    "_raw_result None \n",
    "\n",
    "type \\\n",
    "method textDocument/willSave \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `WillSaveTextDocumentParams` defined as follows: \n",
    "title WillSaveTextDocument Notification \n",
    "_raw_params `WillSaveTextDocumentParams` defined as follows: \n",
    "_raw_result None \n",
    "\n",
    "type \\\n",
    "method workspace/didChangeConfiguration \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `DidChangeConfigurationParams` defined as foll... \n",
    "title DidChangeConfiguration Notification \n",
    "_raw_params `DidChangeConfigurationParams` defined as foll... \n",
    "_raw_result None \n",
    "\n",
    "type \\\n",
    "method workspace/didChangeWatchedFiles \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `DidChangeWatchedFilesParams` defined as follows: \n",
    "title DidChangeWatchedFiles Notification \n",
    "_raw_params `DidChangeWatchedFilesParams` defined as follows: \n",
    "_raw_result None \n",
    "\n",
    "type \\\n",
    "method workspace/didChangeWorkspaceFolders \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `DidChangeWorkspaceFoldersParams` defined as f... \n",
    "title DidChangeWorkspaceFolders Notification \n",
    "_raw_params `DidChangeWorkspaceFoldersParams` defined as f... \n",
    "_raw_result None \n",
    "\n",
    "type ➡️ ⬅️ ⬅️ \\\n",
    "method $/cancelRequest telemetry/event \n",
    "_raw_error None None \n",
    "_raw_result None None \n",
    "_raw_params `CancelParams` defined as follows: 'any' \n",
    "title Cancellation Support Telemetry Notification \n",
    "_raw_params `CancelParams` defined as follows: 'any' \n",
    "_raw_result None None \n",
    "\n",
    "type \\\n",
    "method textDocument/publishDiagnostics \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `PublishDiagnosticsParams` defined as follows: \n",
    "title PublishDiagnostics Notification \n",
    "_raw_params `PublishDiagnosticsParams` defined as follows: \n",
    "_raw_result None \n",
    "\n",
    "type \\\n",
    "method window/logMessage \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `LogMessageParams` defined as follows: \n",
    "title LogMessage Notification \n",
    "_raw_params `LogMessageParams` defined as follows: \n",
    "_raw_result None \n",
    "\n",
    "type \n",
    "method window/showMessage \n",
    "_raw_error None \n",
    "_raw_result None \n",
    "_raw_params `ShowMessageParams` defined as follows: \n",
    "title ShowMessage Notification \n",
    "_raw_params `ShowMessageParams` defined as follows: \n",
    "_raw_result None \n",
    "\n",
    "[4 rows x 50 columns]"
    ]
    @@ -5549,7 +5557,7 @@
    "output_type": "stream",
    "text": [
    " 947 1759 25075 vscode-languageserver-node/protocol/src/protocol-schema.ts\n",
    "protocol/src/protocol-schema.ts\u001b[2K\u001b[1Gprotocol/src/protocol-schema.ts 329ms\n",
    "protocol/src/protocol-schema.ts\u001b[2K\u001b[1Gprotocol/src/protocol-schema.ts 344ms\n",
    " 811 1764 24007 vscode-languageserver-node/protocol/src/protocol-schema.ts\n"
    ]
    }
    @@ -6223,7 +6231,7 @@
    "metadata": {},
    "outputs": [],
    "source": [
    "assert not len(missing_params_from_generated_schema) and not len(missing_params_from_generated_schema)"
    "assert not len(missing_params_from_generated_schema) and not len(missing_results_from_generated_schema)"
    ]
    },
    {
    @@ -6464,7 +6472,7 @@
    "metadata": {},
    "source": [
    "# The Schema\n",
    "For posterity, here's the whole thing."
    "For posterity, here's the whole thing. It should also be available as [JSON](./generated.protocol.schema.json) or [YAML](./generated.protocol.schema.yml)."
    ]
    },
    {
    @@ -6476,7 +6484,7 @@
    "name": "stdout",
    "output_type": "stream",
    "text": [
    "generated.protocol.schema.yml\u001b[2K\u001b[1Ggenerated.protocol.schema.yml 1376ms\n"
    "generated.protocol.schema.yml\u001b[2K\u001b[1Ggenerated.protocol.schema.yml 1359ms\n"
    ]
    },
    {
  2. @bollwyvl bollwyvl revised this gist Oct 25, 2019. 4 changed files with 4719 additions and 4816 deletions.
    3,059 changes: 1,597 additions & 1,462 deletions Towards a JSON Schema for the Language Server Protocol.ipynb
    1,597 additions, 1,462 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    1 change: 1 addition & 0 deletions environment.yml
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,7 @@ dependencies:
    - pandas
    - pip
    - pyemojify
    - pytest
    - python >=3.7,<3.8.0a0
    - python-language-server
    - pyyaml
    3,811 changes: 1,840 additions & 1,971 deletions generated.protocol.schema.json
    1,840 additions, 1,971 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    2,664 changes: 1,281 additions & 1,383 deletions generated.protocol.schema.yml
    1,281 additions, 1,383 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  3. @bollwyvl bollwyvl revised this gist Oct 25, 2019. 1 changed file with 1 addition and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -170,7 +170,7 @@
    "metadata": {},
    "source": [
    "### The Generator\n",
    "The most robust transformer is [vega/ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator). We'll install it (from a fork where we'll added needed features based on the VLSPN code base) into the VLSPN environment, as well as all the dependencies."
    "The most robust transformer is [vega/ts-json-schema-generator](https://github.com/vega/ts-json-schema-generator). We'll install it (from a fork where we'll add needed features based on the VLSPN code base) into the VLSPN environment, as well as all the dependencies."
    ]
    },
    {
  4. @bollwyvl bollwyvl revised this gist Oct 25, 2019. 2 changed files with 24 additions and 5 deletions.
    13 changes: 10 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,13 @@
    # Towards a JSON Schema for the Language Server Protocol

    [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/master?urlpath=lab%2Ftree%2FTowards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)
    _Thoughts on a [machine-readable][], language-agnostic specification of the
    [Language Server Protocol][] in [JSON Schema][]._

    Thoughts on a [machine-readable](https://github.com/microsoft/language-server-protocol/issues/67),
    language-agnostic specification of the Language Server Protocol.
    [machine-readable]: https://github.com/microsoft/language-server-protocol/issues/67
    [Language Server Protocol]: https://microsoft.github.io/language-server-protocol
    [JSON Schema]: https://json-schema.org

    View on:
    - [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/master?urlpath=lab%2Ftree%2FTowards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)
    - [nbviewer](https://nbviewer.jupyter.org/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/Towards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)
    - [gist](https://gist.github.com/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7)
    16 changes: 14 additions & 2 deletions Towards a JSON Schema for the Language Server Protocol.ipynb
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,21 @@
    "source": [
    "<div style=\"font-size: 48px;\">Towards a JSON Schema for the Language Server Protocol</div>\n",
    "\n",
    "The Language Server community would benefit from more [machine-readable](https://github.com/microsoft/language-server-protocol/issues/67) description of the Language Server Protocol Specification.\n",
    "_Thoughts on a [machine-readable][], language-agnostic specification of the\n",
    "[Language Server Protocol][] in [JSON Schema][]._\n",
    "\n",
    "JSON Schema, with [implementations](https://json-schema.org/implementations.html) across a number of languages is a fine initial choice, and would ease the way toward an eventual binary specification."
    "[machine-readable]: https://github.com/microsoft/language-server-protocol/issues/67\n",
    "[Language Server Protocol]: https://microsoft.github.io/language-server-protocol\n",
    "[JSON Schema]: https://json-schema.org\n",
    "\n",
    "> Viewable on:\n",
    "> - [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/master?urlpath=lab%2Ftree%2FTowards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)\n",
    "> - [nbviewer](https://nbviewer.jupyter.org/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/Towards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)\n",
    "> - [gist](https://gist.github.com/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7)\n",
    "\n",
    "The Language Server community would benefit from a more [machine-readable](https://github.com/microsoft/language-server-protocol/issues/67) description of the Language Server Protocol Specification.\n",
    "\n",
    "JSON Schema, with [implementations](https://json-schema.org/implementations.html) across a number of languages is a fine initial choice, and would ease the way toward other specifications."
    ]
    },
    {
  5. @bollwyvl bollwyvl revised this gist Oct 25, 2019. 4 changed files with 25428 additions and 6264 deletions.
    13,818 changes: 7,554 additions & 6,264 deletions Towards a JSON Schema for the Language Server Protocol.ipynb
    7,554 additions, 6,264 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    8,090 changes: 8,090 additions & 0 deletions generated.protocol.schema.json
    8,090 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    6,265 changes: 6,265 additions & 0 deletions generated.protocol.schema.yml
    6,265 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    3,519 changes: 3,519 additions & 0 deletions naive.protocol.schema.json
    3,519 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  6. @bollwyvl bollwyvl revised this gist Oct 24, 2019. 1 changed file with 6868 additions and 299 deletions.
    7,167 changes: 6,868 additions & 299 deletions Towards a JSON Schema for the Language Server Protocol.ipynb
    6,868 additions, 299 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  7. @bollwyvl bollwyvl revised this gist Oct 19, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion environment.yml
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ dependencies:
    - importnb
    - ipywidgets
    - isort
    - jupyterlab
    - jupyterlab ==1.1.4
    - mypy
    - nodejs
    - pandas
  8. @bollwyvl bollwyvl revised this gist Oct 19, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion environment.yml
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ name: lsp-json-schema
    channels:
    - conda-forge

    packages:
    dependencies:
    - black
    - git
    - hypothesis
  9. @bollwyvl bollwyvl revised this gist Oct 19, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions environment.yml
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,7 @@ packages:
    - pandas
    - pip
    - pyemojify
    - python >=3.7,<3.8.0a0
    - python-language-server
    - pyyaml
    - pip:
  10. @bollwyvl bollwyvl revised this gist Oct 19, 2019. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1 +1,6 @@
    # TBD
    # Towards a JSON Schema for the Language Server Protocol

    [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gist/bollwyvl/7a128978b8ae89ab02bbd5b84d07a4b7/master?urlpath=lab%2Ftree%2FTowards%20a%20JSON%20Schema%20for%20the%20Language%20Server%20Protocol.ipynb)

    Thoughts on a [machine-readable](https://github.com/microsoft/language-server-protocol/issues/67),
    language-agnostic specification of the Language Server Protocol.
  11. @bollwyvl bollwyvl renamed this gist Oct 19, 2019. 1 changed file with 721 additions and 1655 deletions.
    721 additions, 1,655 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
  12. @bollwyvl bollwyvl revised this gist Oct 19, 2019. 4 changed files with 5659 additions and 0 deletions.
    5,619 changes: 5,619 additions & 0 deletions A JSON Schema for the Language Server Protocol.ipynb
    5,619 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
    11 changes: 11 additions & 0 deletions LICENSE
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    Copyright 2019 dead pixels collective

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

    3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    25 changes: 25 additions & 0 deletions environment.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    name: lsp-json-schema

    channels:
    - conda-forge

    packages:
    - black
    - git
    - hypothesis
    - hypothesis-jsonschema
    - importnb
    - ipywidgets
    - isort
    - jupyterlab
    - mypy
    - nodejs
    - pandas
    - pip
    - pyemojify
    - python-language-server
    - pyyaml
    - pip:
    - pyls-black
    - pyls-isort
    - pyls-mypy
    4 changes: 4 additions & 0 deletions postBuild
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    #!/usr/bin/env bash
    jupyter labextension install \
    @jupyter-widgets/jupyterlab-manager \
    @jupyterlab/toc
  13. @bollwyvl bollwyvl created this gist Oct 19, 2019.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    # TBD