Resolve OpenAPI $ref response objects during DSL v4 import Problem DSL v4 OpenAPI import…
- User
Resolve OpenAPI $ref response objects during DSL v4 import
Problem
DSL v4 OpenAPI import currently misses valid response objects that are expressed as
$refs.import_responsecallsselect_json_response, andselect_json_responselooks forcontentdirectly on each response object without first resolving$ref.Code references:
crates/coral-spec/src/v4/mod.rs:972crates/coral-spec/src/v4/mod.rs:1290
A valid OpenAPI shape like this is treated as if the operation has no JSON response:
responses: '200': $ref: '#/components/responses/Foo' components: responses: Foo: content: application/json: schema: type: array items: type: objectImpact
The importer falls through to
OutputCardinality::None, which causes otherwise valid read operations to be hidden/dropped from the generated projection catalog. This can make major portions of a real OpenAPI descriptor disappear from DSL v4 sources.Acceptance criteria
- Response
$refs under operation responses are resolved before selecting JSON responses. - Missing or external response refs produce diagnostics consistent with existing schema/parameter ref diagnostics.
- A regression test covers a
200response that references#/components/responses/...and verifies the projection is published.
Interface
No new interfaces are introduced.
- Assistant
I’ll trace the existing schema/parameter reference resolution and v4 import tests, then implement response resolution using the same diagnostic conventions and run the focused tests plus the repository Rust gate.
- Assistant
The importer already has a shared
resolve_refhelper that emitsOPENAPI_REF_NOT_FOUNDandOPENAPI_EXTERNAL_REF_UNSUPPORTED. I found the response selector is the only layer bypassing it; I’ll route each successful response candidate through that helper and preserve the existing 200-first selection behavior. - Assistant
The focused regression now passes, including explicit checks that missing and external response references reuse the existing diagnostic codes. I’m reviewing artifact-version expectations and the final diff before running the full required Rust checks.
- Assistant
The implementation and focused tests are clean. The full
make rust-checksgate is still running through the workspace; formatting and the changed crate’s Clippy compilation have passed so far. - Assistant
The repository gate reached its test phase but the environment lacks the required
cargo-nextestbinary. Clippy passed with all features and warnings denied; I’m substituting the equivalent workspacecargo testinvocation, then I’ll run the gate’s documentation check separately. - Assistant
The fallback workspace test run is still compiling the all-feature dependency graph; no failures have appeared. The focused
coral-specsuite already completed successfully, so this remaining work is broad regression verification. - Assistant
The all-workspace fallback found two unrelated
coral-apppermission-failure tests that cannot induce write failures when run as root; all 59 other tests in that integration target passed. I’ll finish the required rustdoc check and re-run the changed crate’s full test suite as the authoritative scope check.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.