Skip to content

Conversation

@yelizhenden-mdb
Copy link
Collaborator

@yelizhenden-mdb yelizhenden-mdb commented Mar 18, 2025

Proposed changes

Jira ticket: CLOUDP-304948

  Custom methods must be defined using a colon followed by the method name.

  ##### Implementation details
  Rule checks for the following conditions:
    - Identifies paths containing a colon (potential custom methods)
    - Validates that the path follows proper custom method format
    - Does not validate after the colon (xgen-IPA-109-custom-method-must-use-camel-case rule validates the method name)
    - Fails if a slash appears before a colon
    - Fails if multiple colons appear in the path
    - Fails if other than an alphabetical character or a closing curly brace appears before a colon

(Includes existing Spectral rule no-slash-before-custom-method)

No violations found.

Checklist

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

Changes to Spectral

  • I have read the README file for Spectral Updates

Further comments

…n(:) character followed by the custom method name
@yelizhenden-mdb yelizhenden-mdb marked this pull request as ready for review March 18, 2025 14:54
@yelizhenden-mdb yelizhenden-mdb requested a review from a team as a code owner March 18, 2025 14:54
Copy link
Collaborator

@lovisaberggren lovisaberggren left a comment

Choose a reason for hiding this comment

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

Ty!

@yelizhenden-mdb yelizhenden-mdb merged commit a167f9b into main Mar 18, 2025
8 checks passed
@yelizhenden-mdb yelizhenden-mdb deleted the CLOUDP-304948 branch March 18, 2025 16:18
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