[typescript-fetch] Document request-parameter interfaces and fix parameter isDeprecated - #24510
Merged
macjohnny merged 1 commit intoJul 29, 2026
Conversation
4 tasks
babariviere
force-pushed
the
fix-ts-fetch-param-deprecated
branch
from
July 28, 2026 12:28
77417ba to
6bef685
Compare
Contributor
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
babariviere
force-pushed
the
fix-ts-fetch-param-deprecated
branch
2 times, most recently
from
July 28, 2026 14:00
ca29bc5 to
c46e7d4
Compare
macjohnny
reviewed
Jul 28, 2026
babariviere
force-pushed
the
fix-ts-fetch-param-deprecated
branch
from
July 29, 2026 07:02
c46e7d4 to
9e69677
Compare
…Deprecated The ExtendedCodegenParameter copy constructor omitted isDeprecated, so '@deprecated' never rendered for operation parameters even when the spec marks them deprecated. Copy the field through, and add JSDoc (description, @type, @memberof, @deprecated) to the request-parameter interfaces that are generated when useSingleRequestParameter is enabled. Adds a TypeScriptFetchClientCodegenTest#testDeprecatedParameter test and regenerates the typescript-fetch samples. Fixes OpenAPITools#24511
babariviere
force-pushed
the
fix-ts-fetch-param-deprecated
branch
from
July 29, 2026 07:06
9e69677 to
69e0630
Compare
macjohnny
approved these changes
Jul 29, 2026
macjohnny
left a comment
Member
There was a problem hiding this comment.
thanks for the contribution
3 tasks
macjohnny
pushed a commit
that referenced
this pull request
Jul 29, 2026
Drop the @type and @memberof JSDoc annotations from the generated model interfaces and regenerate the samples. This is a follow-up of this comment: #24510 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #24511
What is this PR about?
When
useSingleRequestParameteris enabled,typescript-fetchbundles an operation's parameters into a generatedXxxRequestinterface. Those interfaces were emitted with bare properties: no JSDoc descriptions, and no@deprecatedeven when a parameter is markeddeprecated: truein the spec.#11522 / #11523 previously added
@deprecatedfor operations and model properties, but operation parameters were never covered, and a copy-constructor bug made parameter deprecation impossible to detect regardless of template.This PR does two things:
isDeprecatedalways being false on parameters.DefaultCodegen.fromParametercorrectly setsCodegenParameter.isDeprecatedfrom the OpenAPIdeprecatedfield, butTypeScriptFetchClientCodegen.ExtendedCodegenParameter's copy constructor wrapped the parameter and copied ~70 fields while omittingisDeprecated, silently resetting it tofalse. (ThevendorExtensionsfield is copied, which is why only vendor-extension workarounds surfaced deprecation before.) The one-line fix copiesisDeprecatedthrough, matching what the operation and model wrappers already do.apis.mustachewith JSDoc (descriptionand@deprecatedwhen the parameter is deprecated), consistent with the model interface template.Example
Given a query parameter marked
deprecated: true:Before:
After:
PR checklist
./bin/generate-samples.sh bin/configs/typescript-fetch-*.yamlto update the samples (additive JSDoc only).TypeScriptFetchClientCodegenTest#testDeprecatedParameter).cc typescript-fetch technical committee: @macjohnny @topce @amakhrov @davidgamero @joscha
Summary by cubic
Fixes missing deprecation flags and adds JSDoc to request-parameter interfaces in
typescript-fetchwhenuseSingleRequestParameteris enabled. Deprecated parameters now render@deprecated, and generated request interfaces include descriptions; samples were regenerated to reflect the changes.Bug Fixes
isDeprecatedintoExtendedCodegenParameterso deprecated params inXxxRequestinterfaces include@deprecated; addsTypeScriptFetchClientCodegenTest#testDeprecatedParameter.New Features
XxxRequestinterfaces viaapis.mustache(description and@deprecatedwhen applicable); regeneratestypescript-fetchsamples.Written for commit 69e0630. Summary will update on new commits.