Skip to content

Commit 10faa72

Browse files
Remove unresolved oas
1 parent 1b57fa3 commit 10faa72

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
import { hasException } from './utils/exceptions.js';
22
import { collectAdoption, collectAndReturnViolation, collectException } from './utils/collectionUtils.js';
33
import { isCustomMethodIdentifier } from './utils/resourceEvaluation.js';
4-
import { resolveObject } from './utils/componentUtils.js';
54

65
const RULE_NAME = 'xgen-IPA-106-create-method-should-not-have-query-parameters';
76
const ERROR_MESSAGE = 'Create operations should not have query parameters.';
87

9-
export default (input, _, { path, documentInventory }) => {
10-
const oas = documentInventory.unresolved;
8+
export default (input, _, { path }) => {
119
const resourcePath = path[1];
1210

1311
if (isCustomMethodIdentifier(resourcePath)) {
1412
return;
1513
}
1614

17-
const postMethod = resolveObject(oas, path);
15+
const postMethod = input;
1816
if (!postMethod.parameters || postMethod.parameters.length === 0) {
1917
return;
2018
}

0 commit comments

Comments
 (0)