Skip to content

Add yaml.is_valid builtin#150

Draft
Aayush10016 wants to merge 1 commit into
open-policy-agent:mainfrom
Aayush10016:issue-144-yaml-is-valid
Draft

Add yaml.is_valid builtin#150
Aayush10016 wants to merge 1 commit into
open-policy-agent:mainfrom
Aayush10016:issue-144-yaml-is-valid

Conversation

@Aayush10016

Copy link
Copy Markdown

Summary

  • adds the yaml.is_valid builtin to opa-builtins-json
  • validates YAML strings with the existing Jackson YAML mapper
  • adds focused tests for registration, valid YAML, and invalid YAML

Closes #144.

Verification

  • JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 .\gradlew.bat --no-daemon --console=plain :opa-builtins:opa-builtins-json:test
  • JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 .\gradlew.bat --no-daemon --console=plain :opa-builtins:opa-builtins-json:check

Note: On this Windows environment, the first Gradle run without explicit UTF-8 failed while compiling existing Unicode box-drawing characters in MetricsPrinter.java using Windows-1252. Rerunning with UTF-8 completed successfully.

Signed-off-by: Aayush Tiwari <aayushtiwari1001@gmail.com>
@Aayush10016
Aayush10016 force-pushed the issue-144-yaml-is-valid branch from 970e376 to 3d243f6 Compare July 12, 2026 12:28
@sspaink

sspaink commented Jul 16, 2026

Copy link
Copy Markdown
Member

@Aayush10016 did you mean to open this as a draft?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement yaml.is_valid builtin

2 participants