Skip to content
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

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

Conversation

kanales
Copy link

@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
Author

kanales commented Jul 19, 2024

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

Copy link
Member

@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
6 checks passed
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