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 importer and how it handles path parameter required, then align it with the OpenAPI rule that path params are always required.

  3. Assistant

    Implementing the fix: path parameters default to required per OpenAPI, and adding focused importer and projection tests.

  4. Assistant

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

    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 required field is omitted (or incorrectly set to false)
    • Query/header/cookie parameters: unchanged — default to optional unless required: true is set explicitly

    Version bump

    OPENAPI_IMPORTER_VERSION is bumped from openapi-v2 to openapi-v3 so existing materialized v4 sources are flagged for re-add and pick up the corrected semantics.

    Tests

    • importer_treats_omitted_path_parameters_as_required — importer-level coverage for path vs query requiredness
    • projection_marks_omitted_path_parameters_as_required_filters — projection/filter coverage confirming path inputs surface as required filters, not optional ones

    All 221 coral-spec tests pass.

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