fix(#2364): Add support for passing parameters to @ApiOperation#2365
Merged
drwpow merged 2 commits intoopenapi-ts:mainfrom Aug 11, 2025
Merged
fix(#2364): Add support for passing parameters to @ApiOperation#2365drwpow merged 2 commits intoopenapi-ts:mainfrom
drwpow merged 2 commits intoopenapi-ts:mainfrom
Conversation
…tion This commit introduces the ability to pass parameters directly to the @apioperation decorator, allowing developers to define path parameters within the decorator itself. This simplifies OpenAPI schema generation and improves developer experience by reducing boilerplate code. Changes include: - Added `parameters` option to ApiOperationOptions type - Updated OperationMetadata to include parameters property - Modified @apioperation decorator to accept and store parameter metadata - Added tests to verify parameter handling This change aligns with common usage patterns for OpenAPI specifications and provides a more intuitive way to define API operations with required parameters. #closes openapi-ts#2364
✅ Deploy Preview for openapi-ts ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: 3539d83 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This commit fixes issue openapi-ts#2364 by enabling developers to specify parameters directly within the @apioperation decorator. This streamlines OpenAPI schema generation and improves developer experience with a more concise syntax for defining API operations that require specific input parameters.
drwpow
approved these changes
Aug 11, 2025
Contributor
drwpow
left a comment
There was a problem hiding this comment.
Great addition, and good tests! Thank you!
Merged
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.
This commit introduces the ability to pass parameters directly to the @apioperation decorator, allowing developers to define path parameters within the decorator itself. This simplifies OpenAPI schema generation and improves developer experience by reducing boilerplate code.
Changes include:
parametersoption to ApiOperationOptions typeThis change aligns with common usage patterns for OpenAPI specifications and provides a more intuitive way to define API operations with required parameters.
Changes
closes #2364
How to Review
How can a reviewer review your changes? What should be kept in mind for this review?
Checklist
docs/updated (if necessary)pnpm run update:examplesrun (only applicable for openapi-typescript)