Fix test failure due to double quotes#1891
Conversation
There was a problem hiding this comment.
Pull request overview
Updates OpenAPI integration-test expected outputs to match the current YAML quoting emitted by the toolchain, and bumps the Ballerina language dependency patch version used by the build.
Changes:
- Update multiple
result*.yamlfixtures to use double quotes for$refvalues (e.g.,"#/components/...") to prevent assertion diffs. - Bump
ballerinaLangVersionfrom2201.13.0to2201.13.4ingradle.properties.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_with_included_test/result.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_examples/result.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_1.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| openapi-integration-tests/src/test/resources/ballerina_sources/project_openapi_bal_ext/result_0.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| openapi-integration-tests/src/test/resources/ballerina_sources/project_non_openapi_annotation/result.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| openapi-integration-tests/src/test/resources/ballerina_sources/project_non_openapi_annotation_without_base_path/result.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| openapi-integration-tests/src/test/resources/ballerina_sources/project_non_openapi_annotation_with_base_path/result.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| openapi-integration-tests/src/test/resources/ballerina_sources/examples/response_example/result.yaml | Updates $ref quoting in expected OpenAPI output fixture. |
| gradle.properties | Bumps Ballerina language dependency patch version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
@coderabbitai please review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughBumps ChangesBallerina lang version bump and OpenAPI fixture alignment
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get PR details
gh pr view 1891 --repo ballerina-platform/openapi-tools --json title,body,files,additions,deletions,commits
echo "---DIFF---"
gh pr diff 1891 --repo ballerina-platform/openapi-toolsLength of output: 21164 🏁 Script executed: #!/bin/bash
# Check if there are any remaining result.yaml files that still use single-quoted $ref
rg --type yaml "'\`#/components/`" openapi-integration-tests/ -lLength of output: 1499
Review Summary
|
TharmiganK
left a comment
There was a problem hiding this comment.
Changes looks good to me. Please update the PR with proper title and description
b635761
into
ballerina-platform:master



Purpose
The quoting style change (' → " for $ref values) is coming from SnakeYAML — a transitive dependency of swagger-core. The ballerinaLangVersion bump from 2201.13.0 → 2201.13.4 and latest likely pulled in a newer version of SnakeYAML (or jackson-dataformat-yaml) transitively, which changed how strings starting with # get quoted in YAML output.
This is needed to sync the 2201.13.x PR to master(ballerina-platform/ballerina-lang#44602)
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning
Summary
This PR fixes test failures related to quote handling in OpenAPI schema references by standardizing the formatting of JSON Pointer references across test resource files.
Changes
Dependency Update:
gradle.propertiesto upgrade the Ballerina language version from2201.13.0to2201.13.4Test Resource Updates:
$refvalues in OpenAPI YAML test resources across multiple test cases by converting single-quoted JSON Pointer references to double-quoted formatresponse_example/result.yamlproject_non_openapi_annotation/result.yamlproject_non_openapi_annotation_with_base_path/result.yamlproject_non_openapi_annotation_without_base_path/result.yamlproject_openapi_bal_ext/result_0.yamlandresult_1.yamlproject_openapi_examples/result.yamlproject_openapi_with_included_test/result.yamlThe quote formatting changes ensure consistency in how schema references are represented across the generated OpenAPI YAML outputs and resolve the underlying test failures.