Skip to content

feat: support deprecated query param#34

Merged
Brendan Le Glaunec (Ullaakut) merged 2 commits intomainfrom
add-deprecated-param
Nov 18, 2025
Merged

feat: support deprecated query param#34
Brendan Le Glaunec (Ullaakut) merged 2 commits intomainfrom
add-deprecated-param

Conversation

@Ullaakut
Copy link
Copy Markdown
Member

Goal of this PR

  • Adds support for deprecated operations using .Deprecated()
  • Adds support for deprecated query params using DeprecatedQueryParameter
  • Updates tests to showcase those two features

Fixes #33

How did I test it?

  • Updated and ran unit tests

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 deprecated field to Parameter and Operation structs
  • Implemented DeprecatedQueryParameter() constructor and Deprecated() method on OpBuilder
  • 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.

@Ullaakut Brendan Le Glaunec (Ullaakut) merged commit 1e321c8 into main Nov 18, 2025
21 checks passed
@Ullaakut Brendan Le Glaunec (Ullaakut) deleted the add-deprecated-param branch November 18, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support declaring deprecated parameters

4 participants