Skip to content

Commit 4146038

Browse files
committed
fix(spec-selector): isMediaTypeSchemaPropertiesEqual case same
should return true in case of comparing same media types.
1 parent ab7cefd commit 4146038

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/plugins/spec/selectors.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@ export const getOAS3RequiredRequestBodyContentType = (state, pathMethod) => {
515515
}
516516

517517
export const isMediaTypeSchemaPropertiesEqual = ( state, pathMethod, currentMediaType, targetMediaType) => {
518+
if((currentMediaType || targetMediaType) && currentMediaType === targetMediaType ) {
519+
return true
520+
}
518521
let requestBodyContent = state.getIn(["resolvedSubtrees", "paths", ...pathMethod, "requestBody", "content"], fromJS([]))
519522
if (requestBodyContent.size < 2 || !currentMediaType || !targetMediaType) {
520523
// nothing to compare

0 commit comments

Comments
 (0)