vscode-yaml
vscode-yaml copied to clipboard
Feature request: add "Copy YAML JSONPath" command
Is your enhancement related to a problem? Please describe.
My situation is that I work with OpenAPI specs frequently, and they are often described with YAML. We have tooling that lets us point at specific parts of the spec using a JSON Path.
When the spec is defined in JSON, I use the copy-json-path extension's Copy Json Path command to copy something like components.schemas.Foo to my clipboard.
Describe the solution you would like
A command like Copy YAML JSONPath, similar to the one mentioned above. I am not opinionated on the format, naming, etc.
The breadcrumbs at the top of the screen you already display are basically what I want, so just joining that with a . or something (and calling it something other than a "jsonpath", like perhaps "Copy YAML key path", if this would be meaningfully different from a compliant jsonpath) would be all that I really want/need.
Describe alternatives you have considered
- https://marketplace.visualstudio.com/items?itemName=b-shan.jsonyamlkeynavigator (I haven't tried this extension, because it has so few downloads, and I would prefer this functionality to come from your extension, which is well-supported and already installed on my & my colleagues' machines).
Additional context
https://github.com/vmware-labs/yaml-jsonpath might be a useful library to help with this, if you don't already use it.