Skip to content

Commit

Permalink
Address first comment
Browse files Browse the repository at this point in the history
  • Loading branch information
blva committed Aug 2, 2023
1 parent f78b754 commit c812334
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions checker/check-request-property-became-not-nuallable.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,28 @@ func RequestPropertyBecameNotNullableCheck(diffReport *diff.Diff, operationsSour
continue
}

if mediaTypeDiff.SchemaDiff.NullableDiff != nil && mediaTypeDiff.SchemaDiff.NullableDiff.From == true {
result = append(result, ApiChange{
Id: requestBodyBecameNotNullableId,
Level: ERR,
Text: config.i18n(requestBodyBecameNotNullableId),
Operation: operation,
Path: path,
Source: source,
OperationId: operationItem.Revision.OperationID,
})
} else if mediaTypeDiff.SchemaDiff.NullableDiff != nil && mediaTypeDiff.SchemaDiff.NullableDiff.To == true {
result = append(result, ApiChange{
Id: requestBodyBecameNullableId,
Level: INFO,
Text: config.i18n(requestBodyBecameNullableId),
Operation: operation,
Path: path,
Source: source,
OperationId: operationItem.Revision.OperationID,
})
if mediaTypeDiff.SchemaDiff.NullableDiff != nil {
if mediaTypeDiff.SchemaDiff.NullableDiff.From == true {
result = append(result, ApiChange{
Id: requestBodyBecameNotNullableId,
Level: ERR,
Text: config.i18n(requestBodyBecameNotNullableId),
Operation: operation,
Path: path,
Source: source,
OperationId: operationItem.Revision.OperationID,
})
} else if mediaTypeDiff.SchemaDiff.NullableDiff.To == true {
result = append(result, ApiChange{
Id: requestBodyBecameNullableId,
Level: INFO,
Text: config.i18n(requestBodyBecameNullableId),
Operation: operation,
Path: path,
Source: source,
OperationId: operationItem.Revision.OperationID,
})
}
}

CheckModifiedPropertiesDiff(
Expand Down

0 comments on commit c812334

Please sign in to comment.