Skip to content

Conversation

@lovisaberggren
Copy link
Collaborator

Proposed changes

Adds rule xgen-IPA-107-update-method-request-body-is-get-method-response and tests.

Reused the same comparison logic as xgen-IPA-106-create-method-request-body-is-get-method-response and moved it to a common validation function in validations.js.

13 violations currently.

Jira ticket: CLOUDP-304942

);

const errors = checkViolationsAndReturnErrors(
const errors = checkRequestResponseResourceEqualityAndReturnErrors(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Created common function to be reused

@lovisaberggren lovisaberggren marked this pull request as ready for review March 19, 2025 11:51
@lovisaberggren lovisaberggren requested a review from a team as a code owner March 19, 2025 11:51
@lovisaberggren lovisaberggren merged commit 170820f into main Mar 19, 2025
8 checks passed
@lovisaberggren lovisaberggren deleted the CLOUDP-304942 branch March 19, 2025 12:02
mediaType
);

const errors = checkRequestResponseResourceEqualityAndReturnErrors(
Copy link
Collaborator

Choose a reason for hiding this comment

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

The Create method checks for equality across all fields except those marked as readOnly or writeOnly. Should we apply the same equality check for the Update method?

The description also refers to this as "the resource or parts of the resource returned by the Get method."

Copy link
Collaborator

Choose a reason for hiding this comment

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

Discussed offline: IaC tools require Update request schemas to follow the same requirements as Create request schemas

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