Skip to content

fix: preserve declared response headers in operation metadata - #14

Open
sansynx wants to merge 1 commit into
cloudflare:mainfrom
sansynx:fix/preserve-response-headers
Open

sansynx wants to merge 1 commit into
cloudflare:mainfrom
sansynx:fix/preserve-response-headers

Conversation

@sansynx

@sansynx sansynx commented Oct 6, 2026 •

Copy link
Copy Markdown

Summary

Preserve declared response headers in the OpenAPI resolver, including referenced responses, referenced headers, and header schema references

While investigating cloudflare/forge#20, I found that the Stream TUS operation correctly declares its upload URL in the Location response header. extractResponses currently drops the entire headers map, so downstream generators cannot discover it

This adds optional header metadata without changing the shape of responses that have no declared headers. The CLI integration is separate, this change alone does not fix the command

Validation

  • Added a regression test and observed it fail before the resolver change
  • Forge package tests: 38 passed after rebasing onto current main
  • Forge package typecheck passed
  • Targeted Oxfmt check and package Oxlint passed
  • Independent read-only code review found no actionable issues

AI assistance was used for implementation and validation

Copilot AI balanced review requested due to automatic review settings October 6, 2026 03:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sansynx
sansynx force-pushed the fix/preserve-response-headers branch from 8212ae8 to 43e0087 Compare October 7, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants