Skip to content

Add IgnoreResponseTypes option to OpenApiSpecGeneratorPlugin#1266

Merged
waldekmastykarz merged 6 commits intodotnet:mainfrom
bartizan:1104_add-option-to-ignore-response-types
Jul 2, 2025
Merged

Add IgnoreResponseTypes option to OpenApiSpecGeneratorPlugin#1266
waldekmastykarz merged 6 commits intodotnet:mainfrom
bartizan:1104_add-option-to-ignore-response-types

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 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)

Copy link
Collaborator

@waldekmastykarz waldekmastykarz left a comment

Choose a reason for hiding this comment

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

Perfect! Nothing to add 👏

@waldekmastykarz waldekmastykarz merged commit 03d242d into dotnet:main Jul 2, 2025
4 checks passed
@bartizan bartizan deleted the 1104_add-option-to-ignore-response-types branch July 2, 2025 14:13
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

4 participants