Fix test failure#1893
Conversation
There was a problem hiding this comment.
Pull request overview
Updates OpenAPI generator test fixtures to match current YAML output formatting/content and adjusts test cleanup to remove an additional generated file, addressing CI test failures in openapi-cli.
Changes:
- Refreshed multiple
expected_genOpenAPI YAML fixtures (indentless sequences, updated schema descriptions, and added ZoneOffset documentation/constraints). - Updated interceptor-related expected outputs for request/response interceptor scenarios.
- Ensured
service_type.balis deleted during test cleanup inOpenAPICmdTest.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors10.yaml | Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates). |
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors09.yaml | Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates). |
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors08.yaml | Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates). |
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors07.yaml | Updates expected OpenAPI YAML output for response interceptor scenario (formatting adjustments). |
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/response_interceptors/interceptors06.yaml | Updates expected OpenAPI YAML output for response interceptor scenario (formatting + schema description updates). |
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/interceptors/request_interceptors/interceptors11.yaml | Updates expected OpenAPI YAML output for request interceptor scenario (formatting + schema description updates). |
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/data_type/table_types.yaml | Updates expected YAML for table type generation (formatting + schema description updates). |
| openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint-negative/negative_date.yaml | Updates expected YAML for negative constraint test (formatting + schema description updates). |
| openapi-cli/src/test/java/io/ballerina/openapi/cmd/OpenAPICmdTest.java | Deletes service_type.bal during cleanup to avoid leftover generated artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| File serviceTypeFile = new File(folderPath.resolve("service_type.bal").toString()); | ||
| File utilFile = new File(folderPath.resolve("utils.bal").toString()); | ||
| serviceTypeFile.delete(); | ||
| utilFile.delete(); |
|
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 (5)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughUpdates a test cleanup helper, refreshes generated OpenAPI expected YAML fixtures, and bumps OpenAPI tool package and dependency metadata. ChangesOpenAPI CLI test fixture updates
OpenAPI tool version metadata
Estimated code review effort: 2 (Simple) | ~15 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ 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 |
|



Purpose
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning
Fixed test cleanup in
OpenAPICmdTestso generatedservice_type.balis removed when service-type generation is enabled, addressing the failing test behavior.Refreshed multiple OpenAPI expected YAML fixture files to align with updated generator output, including schema description/constraint text updates and YAML formatting normalization (date and time zone offset related cases).
Updated
openapi-tool/Ballerina tool package versions and associated dependency JAR references to newer snapshots foropenapi-cli,openapi-core,ballerina-to-openapi, and related tooling.