Skip to content

Conversation

@lovisaberggren
Copy link
Collaborator

@lovisaberggren lovisaberggren commented Mar 14, 2025

Proposed changes

Adds rules xgen-IPA-107-put-must-not-have-query-params and xgen-IPA-107-patch-must-not-have-query-params. Same validation function, but two rules covering patch and put respectively.

Also added ignoredValues (envelope and pretty) to the existing similar rule xgen-IPA-106-create-method-should-not-have-query-parameters and updated the error message, example:

Update operations must not have query parameters. Found [filter]. http://go/ipa-spectral#IPA-107
Create operations should not have query parameters. Found [filter]. http://go/ipa-spectral#IPA-106

Currently 8 violations for the put/patch rule.

Added tests.

Jira ticket: CLOUDP-271995

@lovisaberggren lovisaberggren marked this pull request as ready for review March 14, 2025 15:19
@lovisaberggren lovisaberggren requested a review from a team as a code owner March 14, 2025 15:19
* Create operations should not have query parameters.
*
* @param {object} input - The create operation object
* @param {{ignoredValues: string[]}} opts - Array of ignored query parameters
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the drive-by ❤️

@lovisaberggren lovisaberggren merged commit 3cd6df5 into main Mar 14, 2025
13 checks passed
@lovisaberggren lovisaberggren deleted the CLOUDP-271995 branch March 14, 2025 16:11
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