Skip to content

Conversation

@lovisaberggren
Copy link
Collaborator

Proposed changes

Adds rule xgen-IPA-107-update-method-response-is-get-method-response and tests. Also drive-by to correct the test for IPA106CreateMethodResponseIsGetMethodResponse.test.js where there were request bodies validated instead of response contents.

Jira ticket: CLOUDP-304945

One violation currently. Will do combined follow-up PR to add exceptions for multiple "update method" related IPAs.

- Paths with `x-xgen-IPA-exception` for this rule are excluded from validation
message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-107-update-method-response-is-get-method-response'
severity: warn
given: '$.paths[*][put,patch].responses.200.content'
Copy link
Collaborator Author

@lovisaberggren lovisaberggren Mar 18, 2025

Choose a reason for hiding this comment

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

Realized we can do $.paths[*][put,patch] to cover multiple operations. In follow-up CLOUDP-307110 I will do the same for the rules above to not have multiple rules covering the same thing.

@lovisaberggren lovisaberggren marked this pull request as ready for review March 18, 2025 14:42
@lovisaberggren lovisaberggren requested a review from a team as a code owner March 18, 2025 14:42
testRule('xgen-IPA-106-create-method-response-is-get-method-response', [
{
name: 'valid create requests',
name: 'valid create responses',
Copy link
Collaborator

Choose a reason for hiding this comment

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

❤️

Copy link
Collaborator

@yelizhenden-mdb yelizhenden-mdb 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 981b3c8 into main Mar 18, 2025
8 checks passed
@lovisaberggren lovisaberggren deleted the CLOUDP-304945 branch March 18, 2025 15:05
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.

2 participants