Skip to content

Commit 281b54c

Browse files
prettier fix
1 parent 7cc8e06 commit 281b54c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tools/spectral/ipa/rulesets/functions/IPA114ErrorResponsesReferToApiError.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ const RULE_NAME = 'xgen-IPA-114-error-responses-refer-to-api-error';
1818
* @param {object} context - The context object containing path and document information
1919
*/
2020
export default (input, _, { path, documentInventory }) => {
21-
const oas = documentInventory.unresolved;
22-
const apiResponseObject = resolveObject(oas, path);
23-
const errorCode = path[path.length - 1];
21+
const oas = documentInventory.unresolved;
22+
const apiResponseObject = resolveObject(oas, path);
23+
const errorCode = path[path.length - 1];
2424

25-
// Check for exception at response level
26-
if (hasException(apiResponseObject, RULE_NAME)) {
27-
collectException(apiResponseObject, RULE_NAME, path);
28-
return;
29-
}
25+
// Check for exception at response level
26+
if (hasException(apiResponseObject, RULE_NAME)) {
27+
collectException(apiResponseObject, RULE_NAME, path);
28+
return;
29+
}
3030

31-
const errors = checkViolationsAndReturnErrors(apiResponseObject, oas, path, errorCode);
32-
if (errors.length !== 0) {
33-
return collectAndReturnViolation(path, RULE_NAME, errors);
34-
}
31+
const errors = checkViolationsAndReturnErrors(apiResponseObject, oas, path, errorCode);
32+
if (errors.length !== 0) {
33+
return collectAndReturnViolation(path, RULE_NAME, errors);
34+
}
3535

36-
collectAdoption(path, RULE_NAME);
36+
collectAdoption(path, RULE_NAME);
3737
};
3838

3939
function checkViolationsAndReturnErrors(apiResponseObject, oas, path, errorCode) {

0 commit comments

Comments
 (0)