Skip to content

Fix OpenApiFilterService.CreateFilteredDocument failing when the Components field is missing.#1734

Merged
andrueastman merged 2 commits into
microsoft:vnextfrom
kanales:kanales/fix-null-pointer-error-CreateFilteredDocument
Jul 22, 2024
Merged

Fix OpenApiFilterService.CreateFilteredDocument failing when the Components field is missing.#1734
andrueastman merged 2 commits into
microsoft:vnextfrom
kanales:kanales/fix-null-pointer-error-CreateFilteredDocument

Conversation

@kanales
Copy link
Copy Markdown

@kanales kanales commented Jul 19, 2024

Closes #1732.

Summary

Before this, callingOpenApiFilterService.CreateFilteredDocument on a document that does not contain the optional field OpenApiDocument.Components produces a NullReferenceException.

Iván Canales Martín added 2 commits July 18, 2024 17:32
Without a null check this method will fail if the optional components field is missing.
@kanales
Copy link
Copy Markdown
Author

kanales commented Jul 19, 2024

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Copy Markdown
Contributor

@andrueastman andrueastman left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @kanales

@andrueastman andrueastman merged commit b873da7 into microsoft:vnext Jul 22, 2024
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.

OpenApiFilterService.CreateFilteredDocument fails if the document is missing the "components" field

2 participants