Skip to content

OpenAPI import: send header parameters, read path-item parameters - #883

Merged
keysersoft merged 2 commits into
mainfrom
keysersoft/openapi-header-and-path-params
Oct 5, 2026
Merged

keysersoft merged 2 commits into
mainfrom
keysersoft/openapi-header-and-path-params

Conversation

@keysersoft

Copy link
Copy Markdown
Contributor

Closes #868 (thanks for the precise report).

  • Header parameters were put in the tool's input schema (even in required) but never in endpointMapping.headers, so the value the model supplied was dropped. Now mapped as $name; RestEngine already resolves $param headers and omits the header when the argument is absent, so a connector-level header of the same name still applies.
  • Path-item parameters (declared next to get/post) were ignored: /users/{userId} produced a tool without userId and the literal {userId} in the URL. They are merged into every operation under the path; the operation's own entry wins on the same name + in.

Existing connectors keep their tools until they are re-imported or re-synced.

Tests: 3 new/extended cases in openapi.parser.spec.ts (header mapping asserted on endpointMapping, the reporter's two specs). Backend suite green.

Reported in #868: the schema the model saw and the request the engine
sent disagreed in two places.

- Header parameters went into the tool's input schema (even as required)
  but never into endpointMapping.headers, so the value was dropped. They
  are now mapped as `$name`, which the REST engine already resolves and
  leaves out when the argument is not given.
- Parameters declared on the path item (next to get/post) were ignored,
  so `/users/{userId}` had no input for userId and the literal
  `{userId}` went out in the URL. They are now merged into every
  operation, the operation's own entry winning on the same name + in.

Closes #868
@keysersoft
keysersoft enabled auto-merge (squash) October 5, 2026 11:49
@keysersoft
keysersoft merged commit df46b68 into main Oct 5, 2026
13 checks passed
@keysersoft
keysersoft deleted the keysersoft/openapi-header-and-path-params branch October 5, 2026 11:52
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAPI import: header params are required in the schema but never sent; path-item parameters are dropped

1 participant