Skip to content
TheChatArchiveThe Chat Archive
composer-2.5· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

Treat OpenAPI path parameters as required in v4 import This tracks unresolved feedback…

  1. User

    Treat OpenAPI path parameters as required in v4 import This tracks unresolved feedback identified by cubic on PR #1149: https://github.com/withcoral/coral/pull/1149#discussion_r3347190640

    Context: This appears to be pre-existing DSL v4 behavior surfaced by the refactor review, not a regression from the module split.

    Problem: OpenAPI path parameters are imported as optional when required is omitted, even though path parameters are required by OpenAPI. This can misclassify required path inputs as optional SQL filters.

    Acceptance criteria: Import path parameters as required regardless of an omitted required field, preserve explicit behavior for non-path parameters, and add focused importer/projection coverage.

    Interface

    No new interfaces are introduced.

  2. Assistant

    I'll locate the v4 OpenAPI import logic and how path parameters are classified as required vs optional.

  3. Assistant

    Implementing the fix and adding focused tests.

  4. Assistant

    The projection test failed — checking how the operation ID and inputs are normalized.

  5. Assistant

    Singleton responses expose path params as function args, not filters. Updating the projection test to use a list response.

  6. Assistant

    Path parameters are now always imported as required in the v4 OpenAPI importer, matching the OpenAPI spec when required is omitted.

    Change

    In operations.rs, parameter requiredness is resolved through a new parameter_required helper:

    fn parameter_required(
        location: OpenApiParameterLocation,
        parameter_obj: &Map<String, Value>,
    ) -> bool {
        if location == OpenApiParameterLocation::Path {
            return true;
        }
        parameter_obj
            .get("required")
            .and_then(Value::as_bool)
            .unwrap_or(false)
    }
    
    • Path parameters: always required: true, even when the field is omitted (or explicitly false).
    • Query/header/cookie parameters: unchanged — default to optional when required is omitted; honor explicit required: true.

    Tests

    1. importer_treats_path_parameters_as_required_when_required_is_omitted — importer-level coverage for omitted required on path vs query params.
    2. projection_marks_omitted_path_parameters_as_required_filters — projection/filter coverage confirming required path inputs propagate into SQL filter specs.

    All 24 v4 tests pass.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.