Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit b65ec57

Browse files
committed
refactor(oas2): use provided index from forEach
1 parent b95481f commit b65ec57

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/fury-adapter-swagger/lib/parser.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,12 +1629,11 @@ class Parser {
16291629
}
16301630

16311631
validateContentTypes(contentTypes) {
1632-
contentTypes.forEach((contentType) => {
1632+
contentTypes.forEach((contentType, index) => {
16331633
try {
16341634
const { type } = contentTypeModule.parse(contentType);
16351635
mediaTyper.parse(type);
16361636
} catch (e) {
1637-
const index = contentTypes.indexOf(contentType);
16381637
this.withPath(index, () => {
16391638
this.createAnnotation(
16401639
annotations.VALIDATION_WARNING, this.path,

0 commit comments

Comments
 (0)