Skip to content

Add IgnoreResponseTypes option to OpenApiSpecGeneratorPlugin #1266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bartizan
Copy link
Contributor

@bartizan bartizan marked this pull request as ready for review June 24, 2025 07:59
@bartizan bartizan requested a review from a team as a code owner June 24, 2025 07:59
@garrytrinder garrytrinder requested a review from Copilot June 24, 2025 14:36
Copy link
Contributor

@Copilot 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 a new IgnoreResponseTypes option to the OpenApiSpecGeneratorPlugin to allow users to ignore response types when generating their OpenAPI spec.

  • Adds a new boolean property "ignoreResponseTypes" in the JSON schema.
  • Introduces the corresponding IgnoreResponseTypes property in the plugin configuration and utilizes it to conditionally modify response processing in the plugin.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
schemas/v0.29.0/openapispecgeneratorplugin.schema.json Adds the new ignoreResponseTypes configuration in the OpenAPI schema.
DevProxy.Plugins/Generation/OpenApiSpecGeneratorPlugin.cs Implements the corresponding property and its branch in the response processing logic.
Comments suppressed due to low confidence (1)

DevProxy.Plugins/Generation/OpenApiSpecGeneratorPlugin.cs:420

  • Consider adding unit tests to verify that the IgnoreResponseTypes branch correctly returns the expected minimal response object when enabled.
            if (Configuration.IgnoreResponseTypes)

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.

Extend OpenApiSpecGeneratorPlugin with the option to ignore response types
3 participants