Skip to content

Fix enum and const validation for nested boolean values - #1323

Merged
datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-enum-const-nested-boolean
Aug 13, 2026
Merged

Fix enum and const validation for nested boolean values#1323
datho7561 merged 1 commit into
redhat-developer:mainfrom
shin19991207:fix-enum-const-nested-boolean

Conversation

@shin19991207

@shin19991207 shin19991207 commented Aug 13, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Updates getNodeValue() to return the parsed value for boolean nodes instead of their raw YAML source

Previously, booleans nested inside object or array enum/const values were reconstructed as strings. For example, the YAML value:

parameter:
  required: true

was compared as { "required": "true" } against the schema value { "required": true }. This caused the diagnostic Value is not accepted. Valid values: {"required":true}..

What issues does this PR fix or reference?

Fixes #1320

Is it tested? How?

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 specific case you mentioned. Thanks, Morgan!

@datho7561 datho7561 added the bug label Aug 13, 2026
@datho7561 datho7561 added this to the 1.25.0 milestone Aug 13, 2026
@datho7561
datho7561 merged commit 30e7275 into redhat-developer:main Aug 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

getNodeValue() reads raw source text for booleans, breaking const/enum validation (e.g. enum: [true] rejects a valid true)

2 participants