microsoft / microsoft/language-server-protocol

It's not clear from `metaModel.json` that `MessageActionItem` can contain arbitrary additional fields

Open
#2,148 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request meta protocol
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

The generator in https://github.com/microsoft/lsprotocol uses metaModel.json as the source of truth about the LSP protocol.

While the docs for ClientShowMessageActionItemOptions.additionalPropertiesSupport indicate that MessageActionItem objects can contain arbitrary additional attributes beyond what is shown in the spec, the description of MessageActionItem itself doesn't indicate this:

		{
			"name": "MessageActionItem",
			"properties": [
				{
					"name": "title",
					"type": {
						"kind": "base",
						"name": "string"
					},
					"documentation": "A short title like 'Retry', 'Open Log' etc."
				}
			]
		},

I think it would be more standard to have an optional data field of type LSPAny, like on the Diagnostic object.

Is there any way that we can make this aspect of MessageActionItem clear in the json spec so tools that consume metaModel.json can support it correctly?

Related:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the MessageActionItem entry in metaModel.json and compare it with the Diagnostic object and the linked LSP specification section. Review related issues 411 and pygls issue 518; done means the JSON model clearly communicates the support for arbitrary additional fields to consuming tools.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.