Skip to content

Commit 8b2ef26

Browse files
address the comments
1 parent 4786f50 commit 8b2ef26

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

tools/spectral/ipa/rulesets/IPA-121.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ rules:
1616
- $.components.schemas..properties[*]
1717
- $.paths..requestBody..schema..properties[*]
1818
- $.paths..responses..schema..properties[*]
19+
resolved: false
1920
severity: warn
2021
then:
2122
function: IPA121DateTimeFieldsMentionISO8601

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
import { hasException } from './utils/exceptions.js';
22
import { collectAdoption, collectAndReturnViolation, collectException } from './utils/collectionUtils.js';
3-
import { resolveObject } from './utils/componentUtils.js';
43

54
const RULE_NAME = 'xgen-IPA-121-date-time-fields-mention-iso-8601';
65
const ERROR_MESSAGE =
76
'API producers must use ISO 8601 date-time format in UTC for all timestamps. Fields must note ISO 8601 and UTC in their description.';
87

9-
export default (input, options, { path, documentInventory }) => {
10-
const oas = documentInventory.unresolved;
11-
const propertyObject = resolveObject(oas, path);
8+
export default (input, options, { path }) => {
129
const fieldType = path[path.length - 2];
13-
// Not to duplicate the check for referenced schemas
14-
if (!propertyObject) {
15-
return;
16-
}
1710

1811
if (hasException(input, RULE_NAME)) {
1912
collectException(input, RULE_NAME, path);

0 commit comments

Comments
 (0)