Skip to content

fix: handle text refs in strict echo handler - #2077

Closed
mtandersson wants to merge 1 commit into
oapi-codegen:mainfrom
mtandersson:fix-strict-echo-text-ref
Closed

mtandersson wants to merge 1 commit into
oapi-codegen:mainfrom
mtandersson:fix-strict-echo-text-ref

Conversation

@mtandersson

@mtandersson mtandersson commented Sep 4, 2025

Copy link
Copy Markdown

Fixes a problem where the server generated code did not compile for strict echo.

Also adds a test case to trigger the problem and then verify the update

fixes #2076

Fixes a problem where the server generated code did not compile
for strict echo.

Also adds a test case to trigger the problem and then verify the
update
@mtandersson
mtandersson requested a review from a team as a code owner September 4, 2025 11:36
@kusari-inspector

Copy link
Copy Markdown

Kusari Inspector

Kusari Analysis Results:

Proceed with these changes

✅ No Flagged Issues Detected
All values appear to be within acceptable risk parameters.

No pinned version dependency changes, code issues or exposed secrets detected!

@kusari-inspector rerun - Trigger a re-analysis of this PR
@kusari-inspector feedback [your message] - Send feedback to our AI and team
See Kusari's documentation for setup and configuration.
Commit: 64bf531, performed at: 2025-09-04T11:36:07Z

Found this helpful? Give it a 👍 or 👎 reaction!

@mromaszewicz

Copy link
Copy Markdown
Member

Thank you for submitting this PR, @mtandersson — but we need to close it because the same fix (extending the Multipart special-case in strict-interface.tmpl to also cover Text responses, generating a named type alias instead of a struct embedding) was merged via #2225 (commit 091742e8). A repro confirms $ref text/plain responses now compile. Issue #2190 was the canonical duplicate that drove the merged fix.

Thanks for the contribution.

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.

Strict server generates error for text/plain response types

2 participants