Skip to content

feat(ipa): forbid custom methods on Operations endpoints - #1446

Merged
julius-jogela merged 1 commit into
mainfrom
feat-ipa-132-no-custom-methods
Aug 21, 2026
Merged

julius-jogela merged 1 commit into
mainfrom
feat-ipa-132-no-custom-methods

Conversation

@julius-jogela

@julius-jogela julius-jogela commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes

This PR adds the IPA-132 rule forbidding custom methods on Operations endpoints. The Operations resource is read-only, and control actions require mutating methods, so any :customMethod path attached to an Operations endpoint is a violation.

Jira ticket: CLOUDP-435356

Rules added

At warn severity, given $.paths with @key:

Rule Checks
xgen-IPA-132-operations-endpoint-must-not-define-custom-methods Any custom method path (:customMethod) whose resource identifier is an Operations endpoint — the Operations collection (.../operations) or a single Operation (.../operations/{operationId}) — is a violation

Paths with x-xgen-IPA-exception for the rule are excluded from validation. The rule name matches the guideline added in mongodb/ipa#126.

Testing

  • Valid Operations endpoints, custom methods on non-Operations resources (ignored), custom methods on the Operations collection and on a single Operation in both the collection-scoped and instance-scoped forms (flagged with exact message and path), and violation-with-exception (suppressed). There is no compliant-with-exception case: every path the rule selects is a violation by definition.
  • Full suite: 129 suites / 811 tests pass. gen-ipa-docs, prettier and eslint clean.
  • spectral lint openapi/.raw/v2.yaml with the full ruleset: 0 xgen-IPA-132-* findings — no custom methods exist on Operations endpoints in the current spec.

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Add xgen-IPA-132-operations-endpoint-must-not-define-custom-methods:
custom method paths whose resource identifier is an Operations endpoint
are violations. Control actions such as cancel require mutating
methods, which the read-only Operations resource does not allow.

The rule name matches the guideline proposed in mongodb/ipa#126.
@julius-jogela
julius-jogela force-pushed the feat-ipa-132-no-custom-methods branch from 0c7450c to 32a2415 Compare August 21, 2026 13:30
@julius-jogela
julius-jogela marked this pull request as ready for review August 21, 2026 13:32
@julius-jogela
julius-jogela requested a review from a team as a code owner August 21, 2026 13:32
@julius-jogela
julius-jogela merged commit 507d743 into main Aug 21, 2026
11 checks passed
@julius-jogela
julius-jogela deleted the feat-ipa-132-no-custom-methods branch August 21, 2026 14:08
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