fix(spec-selector): isMediaTypeSchemaPropertiesEqual should handle case where literal media-types are equal. (#6820)
* fix(spec-selector): isMediaTypeSchemaPropertiesEqual case same should return true in case of comparing same media types. * test(spec-selector): isMediaTypeSchemaPropertiesEqual tests
This commit is contained in:
@@ -515,6 +515,9 @@ export const getOAS3RequiredRequestBodyContentType = (state, pathMethod) => {
|
||||
}
|
||||
|
||||
export const isMediaTypeSchemaPropertiesEqual = ( state, pathMethod, currentMediaType, targetMediaType) => {
|
||||
if((currentMediaType || targetMediaType) && currentMediaType === targetMediaType ) {
|
||||
return true
|
||||
}
|
||||
let requestBodyContent = state.getIn(["resolvedSubtrees", "paths", ...pathMethod, "requestBody", "content"], fromJS([]))
|
||||
if (requestBodyContent.size < 2 || !currentMediaType || !targetMediaType) {
|
||||
// nothing to compare
|
||||
|
||||
Reference in New Issue
Block a user