microsoft / microsoft/debug-adapter-protocol

Issue with how responses are defined

Open
#33 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
1.8k
Forks
173
Avg merge
7d 7h
Merged PRs (30d)
2

Description

In your json, you have responses simply as extending generic response + description, which is incorrect because response has to have same command value as request. So it should be marked in same was as responses are, ie with constant enum for command. What I would propose is to fix those to this:

"LaunchResponse": {
		"allOf": [ { "$ref": "#/definitions/Response" }, {
			"type": "object",
			"description": "Response to 'launch' request. This is just an acknowledgement, so no body field is required.",
			"properties": {
				"command": {
					"type": "string",
					"enum": [ "launch" ]
				}
			},
			"required": [ "command"  ]
		}]
	}

Contributor guide

Open the contributing guide

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

No file or test is named in the issue. Start by locating the JSON protocol definitions and the response schemas, then compare their command properties with the request schemas; done means each response constrains command to the matching constant enum and validation covers the updated definitions.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.