Skip to content

Omit null OpenAPI response descriptions - #3077

Draft
Vincent Biret (baywet) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-description-null-issue
Draft

Omit null OpenAPI response descriptions#3077
Vincent Biret (baywet) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-description-null-issue

Conversation

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Description

OpenAPI response descriptions must be strings when present. Responses with no description were serialized as "description": null, which Swagger Editor rejects.

"200": {}

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Related Issue(s)

Changes Made

  • Serialization
    • Omit description from OpenApiResponse when Description is null.
  • Coverage
    • Added response serialization coverage for OpenAPI 2.0, 3.0, 3.1, and 3.2.
  • Expectations
    • Updated affected operation serialization baselines.

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All existing tests pass

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Versions applicability

  • My change applies to the version 1.X of the library, if so PR link:
  • My change applies to the version 2.X of the library, if so PR link:
  • My change applies to the version 3.X of the library, if so PR link:
  • I have evaluated the applicability of my change against the other versions above.

Additional Notes

None.

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue of null description in OpenApi response Omit null OpenAPI response descriptions Sep 10, 2026
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.

Description in Response cannot be null

2 participants