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

Respect additionalProperties false during v4 OpenAPI schema import This tracks…

  1. User

    Respect additionalProperties false during v4 OpenAPI schema import This tracks unresolved feedback identified by cubic on PR #1149: https://github.com/withcoral/coral/pull/1149#discussion_r3347190658

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

    Problem: The schema importer treats the presence of additionalProperties as map-like, so additionalProperties: false can be imported as a free-form map instead of a closed object.

    Acceptance criteria: Handle boolean additionalProperties: false as a closed object, preserve schema-valued additionalProperties behavior, and add focused schema import coverage.

    Interface

    No new interfaces are introduced.

  2. Assistant

    I'll locate where v4 OpenAPI schema import handles additionalProperties and fix boolean false so closed objects aren't imported as maps.

  3. Assistant

    Checking current behavior and whether map-like schemas are tested elsewhere:

  4. Assistant

    Implementing the fix: boolean additionalProperties: false should import as a closed object, not a map.

  5. Assistant

    Fixed OpenAPI schema import so boolean additionalProperties: false is treated as a closed object instead of a free-form map.

    Problem

    In schemas.rs, any presence of additionalProperties triggered map import. For additionalProperties: false, the importer called import_schema on the boolean false, which produced a Map with a JSON value type instead of a closed Object.

    Fix

                        } else if let Some(additional) = resolved.get("additionalProperties") {
                            if additional.as_bool() == Some(false) {
                                IrTypeShape::Object { fields: vec![] }
                            } else if additional.is_object() || additional.get("$ref").is_some() {
                                let value_type_ref = self
                                    .import_schema(
                                        additional,
                                        &format!("{type_id}_value"),
                                        operation_id,
                                        diagnostics,
                                    )
                                    .unwrap_or_else(|| "json".to_string());
                                IrTypeShape::Map { value_type_ref }
                            } else {
                                IrTypeShape::Json
                            }
    
    • additionalProperties: false → closed Object (empty when no properties)
    • Schema-valued additionalProperties (inline object or $ref) → Map (unchanged)
    • additionalProperties: true → Json (open object; no longer misclassified as a map)

    Objects with both properties and additionalProperties: false were already handled via the properties branch.

    Tests

    Added importer_treats_additional_properties_false_as_closed_object covering:

    1. Closed empty object (additionalProperties: false only)
    2. Closed object with declared fields
    3. Map import for schema-valued additionalProperties: { type: string }

    All 13 OpenAPI importer tests pass.

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