src/plugins/validate-semantic/validators/helpers.js
Function checkForDefinition
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function checkForDefinition(paramName, pathItem) {
const pathItemParameters = pathItem.parameters
const operationsInPathItem = (Object.keys(pathItem) || [])
.filter(key => operationKeys.indexOf(key) > -1)
.map(key => {
Consider simplifying this complex logical expression. Open
Open
if(!res.found && operationsInPathItem.length) {
operationsInPathItem
.forEach(op => {
const inThisOperation = (op.parameters || [])
.some(param => param.name === paramName && param.in === "path")