Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,6 @@ testRule('xgen-IPA-110-collections-response-define-results-array', [
},
},
},
errors: [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Renamed rule removes errors?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no functionality change but tests changed. Just check if that is ok

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is test case for exceptions, there should be no errors

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah.. so reason why they were errors was wrong name. PR already approved. Thank you for clarification

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the rule_name in rule implementation was incorrect, it didn't trigger properly, so errors were expected

{
code: 'xgen-IPA-110-collections-response-define-results-array',
message: 'The response for collections must define an array of results containing the paginated resource.',
path: ['paths', '/resources', 'get', 'responses', '200', 'content', 'application/json'],
severity: DiagnosticSeverity.Warning,
},
],
errors: [],
},
]);
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { resolveObject } from './utils/componentUtils.js';
import { schemaIsPaginated } from './utils/schemaUtils.js';

const RULE_NAME = 'xgen-IPA-110-collections-use-paginated-schema';
const RULE_NAME = 'xgen-IPA-110-collections-response-define-results-array';
const ERROR_MESSAGE = 'The response for collections must define an array of results containing the paginated resource.';

export default (input, _, { path, documentInventory }) => {
Expand Down
Loading