Skip to content

Commit

Permalink
Add missing nil checkers to check-response-mediatype-enum-value-remove (
Browse files Browse the repository at this point in the history
  • Loading branch information
blva authored Apr 4, 2023
1 parent e696d71 commit 6ce4743
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions checker/check-response-mediatype-enum-value-removed.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ func ResponseMediaTypeEnumValueRemovedCheck(diffReport *diff.Diff, operationsSou
}
source := (*operationsSources)[operationItem.Revision]
for _, responseItems := range operationItem.ResponsesDiff.Modified {
if responseItems.ContentDiff == nil {
continue
}

if responseItems.ContentDiff.MediaTypeModified == nil {
continue
}
for mediaType, mediaTypeItem := range responseItems.ContentDiff.MediaTypeModified {
if mediaTypeItem.SchemaDiff == nil {
continue
Expand Down

3 comments on commit 6ce4743

@blva
Copy link
Contributor Author

@blva blva commented on 6ce4743 Apr 4, 2023

Choose a reason for hiding this comment

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

@reuvenharrison could this commit be released into a new version so I can unblock our development? thanks

@reuvenharrison
Copy link
Collaborator

Choose a reason for hiding this comment

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

@blva
Copy link
Contributor Author

@blva blva commented on 6ce4743 Apr 4, 2023

Choose a reason for hiding this comment

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

Thank you 🙏

Please sign in to comment.