Skip to content

Conversation

@lovisaberggren
Copy link
Collaborator

@lovisaberggren lovisaberggren commented Mar 11, 2025

Proposed changes

Adding new rule 'xgen-IPA-105-list-method-response-code-is-200 and tests. No offenders.

Jira ticket: CLOUDP-271992

@lovisaberggren lovisaberggren marked this pull request as ready for review March 11, 2025 09:57
@lovisaberggren lovisaberggren requested a review from a team as a code owner March 11, 2025 09:57
Comment on lines +41 to +48
if (!responses['200']) {
return [{ path, message: ERROR_MESSAGE }];
}

// If there are other 2xx responses that are not 200, return a violation
if (Object.keys(responses).some((key) => key.startsWith('2') && key !== '200')) {
return [{ path, message: ERROR_MESSAGE }];
}
Copy link
Member

@wtrocki wtrocki Mar 11, 2025

Choose a reason for hiding this comment

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

Nit: consider merging those violations into array of 2 errors.
Think of someone waiting 40 minutes for the build to pass only to get yet another error etc.

Copy link
Member

@wtrocki wtrocki left a comment

Choose a reason for hiding this comment

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

LGTM

@lovisaberggren lovisaberggren merged commit 698e772 into main Mar 11, 2025
13 checks passed
@lovisaberggren lovisaberggren deleted the CLOUDP-271992 branch March 11, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants