Skip to content

Fix: status bar updates when editing inline $schema in YAML files#1263

Merged
datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-status-bar-update
Jul 6, 2026
Merged

Fix: status bar updates when editing inline $schema in YAML files#1263
datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-status-bar-update

Conversation

@shin19991207

@shin19991207 shin19991207 commented Jun 30, 2026

Copy link
Copy Markdown
Member

What does this PR do?

  1. Before: status bar didn't update when you added inline $schema object to a YAML file
    Fix: status bar shows the schema immediately when you type it

  2. Before: status bar only updated if you pasted the entire schema association line (modeline / inline $schema object) at once
    Fix: status bar updates as you type character-by-character

What issues does this PR fix or reference?

Fixes a bug from redhat-developer/yaml-language-server#970
Related to redhat-developer/yaml-language-server#1290

Is it tested? How?

  • New automated test
  • Tested manually with Fix: yaml/get/all/jsonSchemas returns schema association declared with inline $schema yaml-language-server#1290:
    • Create a schema file schema.json:
      {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "$schema": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          }
        },
        "required": ["firstName"],
        "additionalProperties": false
      }
    • In YAML file, type the $schema object character-by-character:
      $schema: ./schema.json
      firstName: d
    • Verify that status bar updates after typing the schema path

Signed-off-by: Morgan Chang <shin19991207@gmail.com>

@datho7561 datho7561 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and fixes the issue. Thanks, Morgan!

@datho7561 datho7561 merged commit b90473b into redhat-developer:main Jul 6, 2026
5 checks passed
@github-project-automation github-project-automation Bot moved this from Pending review to Done in Java Tooling Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants