diff --git a/lint_function/camara-casing-convention.js b/lint_function/camara-casing-convention.js index 4b9eecf0a9..092dd0b4d1 100644 --- a/lint_function/camara-casing-convention.js +++ b/lint_function/camara-casing-convention.js @@ -1,23 +1,12 @@ // lint_function/camara-casing-convention.js - export default async function (input) { const errors = []; const suggestions = []; - for (const path in input.paths) { - console.log(path); - for (const method in input.paths[path]) { - const operation = input.paths[path][method]; - if (operation.operationId) { - const operationId = operation.operationId; - if (!isCamelCase(operationId)) { - errors.push(operationId); - suggestions.push(`OperationId '${operationId}' should be in camelCase.`); - } - } else { - errors.push('OperationId missing'); - suggestions.push(`OperationId is missing for the ${method} operation on path '${path}'.`); - } + for (const operationId of input) { + if (!isCamelCase(operationId)) { + errors.push(operationId); + suggestions.push(`OperationId '${operationId}' should be in camelCase.`); } }