Treat OpenAPI path parameters as required in v4 import This tracks unresolved feedback…
- 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
requiredis 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
requiredfield, preserve explicit behavior for non-path parameters, and add focused importer/projection coverage.Interface
No new interfaces are introduced.
- Assistant
Now I'll make the fix — path parameters are always required per the OpenAPI spec:
- Assistant
Now I'll add the importer test:
- Assistant
Now the projection test:
- Assistant
Done. Summary of the fix:
Change
crates/coral-spec/src/v4/surfaces/openapi/operations.rs— inimport_parameters, the input'srequiredflag now forcestruefor path parameters (OpenAPI mandates path parameters be required), while non-path parameters keep the previous behavior of reading the explicitrequiredfield with afalsedefault:rust
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.