Skip to content

Commit 4d22b78

Browse files
fix
1 parent a32c152 commit 4d22b78

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ export default (input, _, { path, documentInventory }) => {
2323

2424
if (contentPerMediaType.schema) {
2525
const schema = contentPerMediaType.schema;
26-
if (schema.$ref && !schema.$ref.endsWith('Request')) {
26+
if(!schema.$ref) {
2727
return collectAndReturnViolation(path, RULE_NAME, ERROR_MESSAGE);
2828
}
29-
if(!schema.$ref) {
29+
30+
if (!schema.$ref.endsWith('Request')) {
3031
return collectAndReturnViolation(path, RULE_NAME, ERROR_MESSAGE);
3132
}
3233
}

0 commit comments

Comments
 (0)