redhat-developer / redhat-developer/yaml-language-server

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

Open
#103 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.5k
Forks
352
Avg merge
2d 7h
Merged PRs (30d)
11

Description

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\"') }}"

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

Start by reproducing the reported Ansible URI example in the YAML language server and inspect the syntax-highlighting or validation path that reports “String” expected. Compare the behavior with equivalent YAML body data and add a regression test for the shown playbook structure; done means valid Ansible data no longer receives a syntax error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.