Skip to content

Instantly share code, notes, and snippets.

@victornoel
Created August 12, 2018 13:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victornoel/3f1ca3ef85cbd15e92f45f619dff6009 to your computer and use it in GitHub Desktop.
Save victornoel/3f1ca3ef85cbd15e92f45f619dff6009 to your computer and use it in GitHub Desktop.
yaml language server logs for redhat-developer/yaml-language-server#80
[Trace - 15:39:06] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file:///home/victor/a/test.yaml",
"languageId": "yaml",
"version": 1,
"text": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: app\nspec:\n selector:\n matchLabels:\n app: app\n replicas: 1\n template:\n metadata:\n labels:\n app: app\n spec:\n containers:\n - name: app\n image: nginx\n volumes:\n - name: config-volume\n configMap:\n name: app-config\n---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: app-config\ndata:\n config: some config\n"
}
}
[Trace - 15:39:06] Sending request 'textDocument/documentSymbol - (2)'.
Params: {
"textDocument": {
"uri": "file:///home/victor/a/test.yaml"
}
}
[Trace - 15:39:06] Received response 'textDocument/documentSymbol - (2)' in 16ms.
Result: [
{
"name": "apiVersion",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 19
}
}
}
},
{
"name": "kind",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 1,
"character": 0
},
"end": {
"line": 1,
"character": 16
}
}
}
},
{
"name": "metadata",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 2,
"character": 0
},
"end": {
"line": 3,
"character": 11
}
}
}
},
{
"name": "name",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 3,
"character": 2
},
"end": {
"line": 3,
"character": 11
}
}
},
"containerName": "metadata"
},
{
"name": "spec",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 4,
"character": 0
},
"end": {
"line": 21,
"character": 0
}
}
}
},
{
"name": "selector",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 5,
"character": 2
},
"end": {
"line": 7,
"character": 14
}
}
},
"containerName": "spec"
},
{
"name": "matchLabels",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 6,
"character": 4
},
"end": {
"line": 7,
"character": 14
}
}
},
"containerName": "spec.selector"
},
{
"name": "app",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 7,
"character": 6
},
"end": {
"line": 7,
"character": 14
}
}
},
"containerName": "spec.selector.matchLabels"
},
{
"name": "replicas",
"kind": 16,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 8,
"character": 2
},
"end": {
"line": 8,
"character": 13
}
}
},
"containerName": "spec"
},
{
"name": "template",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 9,
"character": 2
},
"end": {
"line": 21,
"character": 0
}
}
},
"containerName": "spec"
},
{
"name": "metadata",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 10,
"character": 4
},
"end": {
"line": 12,
"character": 16
}
}
},
"containerName": "spec.template"
},
{
"name": "labels",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 11,
"character": 6
},
"end": {
"line": 12,
"character": 16
}
}
},
"containerName": "spec.template.metadata"
},
{
"name": "app",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 12,
"character": 8
},
"end": {
"line": 12,
"character": 16
}
}
},
"containerName": "spec.template.metadata.labels"
},
{
"name": "spec",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 13,
"character": 4
},
"end": {
"line": 21,
"character": 0
}
}
},
"containerName": "spec.template"
},
{
"name": "containers",
"kind": 18,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 14,
"character": 6
},
"end": {
"line": 17,
"character": 6
}
}
},
"containerName": "spec.template.spec"
},
{
"name": "name",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 15,
"character": 10
},
"end": {
"line": 15,
"character": 19
}
}
},
"containerName": "spec.template.spec.containers"
},
{
"name": "image",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 16,
"character": 10
},
"end": {
"line": 16,
"character": 22
}
}
},
"containerName": "spec.template.spec.containers"
},
{
"name": "volumes",
"kind": 18,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 17,
"character": 6
},
"end": {
"line": 21,
"character": 0
}
}
},
"containerName": "spec.template.spec"
},
{
"name": "name",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 18,
"character": 10
},
"end": {
"line": 18,
"character": 29
}
}
},
"containerName": "spec.template.spec.volumes"
},
{
"name": "configMap",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 19,
"character": 10
},
"end": {
"line": 20,
"character": 28
}
}
},
"containerName": "spec.template.spec.volumes"
},
{
"name": "name",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 20,
"character": 12
},
"end": {
"line": 20,
"character": 28
}
}
},
"containerName": "spec.template.spec.volumes.configMap"
},
{
"name": "apiVersion",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 22,
"character": 0
},
"end": {
"line": 22,
"character": 14
}
}
}
},
{
"name": "kind",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 23,
"character": 0
},
"end": {
"line": 23,
"character": 15
}
}
}
},
{
"name": "metadata",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 24,
"character": 0
},
"end": {
"line": 25,
"character": 18
}
}
}
},
{
"name": "name",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 25,
"character": 2
},
"end": {
"line": 25,
"character": 18
}
}
},
"containerName": "metadata"
},
{
"name": "data",
"kind": 2,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 26,
"character": 0
},
"end": {
"line": 27,
"character": 21
}
}
}
},
{
"name": "config",
"kind": 15,
"location": {
"uri": "file:///home/victor/a/test.yaml",
"range": {
"start": {
"line": 27,
"character": 2
},
"end": {
"line": 27,
"character": 21
}
}
},
"containerName": "data"
}
]
[Trace - 15:39:06] Received request 'custom/schema/request - (196)'.
Params: "file:///home/victor/a/test.yaml"
[Trace - 15:39:06] Sending response 'custom/schema/request - (196)'. Processing request took 1ms
Result: "kubernetes://schema/apps/v1@deployment+v1@configmap"
[Trace - 15:39:06] Received request 'custom/schema/content - (197)'.
Params: "kubernetes://schema/apps/v1@deployment+v1@configmap"
[Trace - 15:39:06] Sending response 'custom/schema/content - (197)'. Processing request took 3ms
Result: "{\"oneOf\":[{\"$ref\":\"kubernetes://schema/apps/v1@deployment\"},{\"$ref\":\"kubernetes://schema/v1@configmap\"}]}"
[Trace - 15:39:06] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///home/victor/a/test.yaml",
"diagnostics": [
{
"severity": 1,
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 1
}
},
"message": "Matches multiple schemas when only one must validate."
},
{
"severity": 1,
"range": {
"start": {
"line": 22,
"character": 0
},
"end": {
"line": 22,
"character": 1
}
},
"message": "Matches multiple schemas when only one must validate."
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment