feat: support deprecated query param#34
Merged
Brendan Le Glaunec (Ullaakut) merged 2 commits intomainfrom Nov 18, 2025
Merged
Conversation
Copilot started reviewing on behalf of
Brendan Le Glaunec (Ullaakut)
November 18, 2025 10:26
View session
There was a problem hiding this comment.
Pull Request Overview
This PR adds deprecation support for operations and query parameters in OpenAPI specification generation. The implementation allows marking entire operations as deprecated via .Deprecated() and individual query parameters as deprecated through DeprecatedQueryParameter().
Key changes:
- Added
deprecatedfield toParameterandOperationstructs - Implemented
DeprecatedQueryParameter()constructor andDeprecated()method onOpBuilder - Updated generator to output deprecation flags in OpenAPI spec
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| op.go | Added deprecated field to Parameter and Operation structs, implemented DeprecatedQueryParameter() function and Deprecated() method on OpBuilder, updated Merge() to handle deprecation |
| gen.go | Modified parameter and operation generation to include deprecated field in OpenAPI output |
| gen_test.go | Added test coverage for deprecated operations and parameters |
| testdata/spec.json | Updated golden file with expected output for deprecated operation and parameter |
| testdata/spec-pkgseg0.json | Updated golden file with expected output for deprecated operation and parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Christian R (antiphp)
approved these changes
Nov 18, 2025
Nicholas Wiersma (nrwiersma)
approved these changes
Nov 18, 2025
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.
Goal of this PR
.Deprecated()DeprecatedQueryParameterFixes #33
How did I test it?