redhat-developer / yaml-language-server

Language Server for YAML Files
MIT License
1.09k stars 264 forks source link

[BUG] Syntax Highlighting for Ansible URI module, Body in data format throws syntax error #103

Open kenmaglio opened 6 years ago

kenmaglio commented 6 years ago

if in an ansible playbook, you specify and use the URI module, and specify the body as a data format, the syntax highlighting throws an error stating 'String' expected.

This will produce an error

body_format: json
body:
  dl:
    table_type: dl
    date: "{{ lookup('pipe', 'date -d ' + date_variance + ' +\"%Y-%m-%d\"') }}"
JPinkney commented 6 years ago

Out of curiosity which schema are you using for validation? Or do you have the vscode-ansible extension installed?

kenmaglio commented 6 years ago

I tried with simply the out of box YAML integration. Then also installed the MSFT ansible module and it did not make a difference.

The file type did stay YAML ( and is a .yaml, not .yml ).

JPinkney commented 6 years ago

Just one more thing, was the file created under a folder name tasks? I'm only wondering because we use schema store to match well-known file types to schemas. My suspicion is that the schema in the schema store is wrong and thus creating an error.