Page MenuHomePhabricator

Add linting rules for operations and paths
Closed, ResolvedPublic3 Estimated Story Points

Description

Operations are the core functionality of any API and their correct documentation is critical to empowering API users. This set of rules completes the functionality for verification of the operation object in the linter.

Conditions of acceptance

  • Validate that the operation has a description (severity: error) - example
  • Validate that the operation has an operationId (severity: error) - example
    • Validate that the value in the operationId field is unique among all operationId fields present in the description (severity: error)
  • Validate that if the OAD has a top-level tags object, the operation has a tags field (severity: warn) - example #1, example #2
  • Validate that the operation has an externalDocs field (severity: hint) - example
  • Validate that the path has a summary (severity: hint) - example
  • Validate that the path has a description (severity: hint)

Extra resources

Event Timeline

BPirkle triaged this task as Medium priority.Apr 7 2026, 10:11 PM
BPirkle moved this task from Incoming (Needs Triage) to Backlog on the MW-Interfaces-Team board.

Flagging that I believe we already completed much of the parameter work: https://phabricator.wikimedia.org/T410397

I noticed this morning that the spreadsheet wasn't updated, but that part should be done! :)

KBach renamed this task from Add linting rules for operations and parameters to Add linting rules for operations and paths.Apr 8 2026, 9:22 AM
KBach updated the task description. (Show Details)

I updated the task title and description - adding path and removing parameter validation. Validation of parameter examples (currently crossed out in the description) is awaiting review in this merge request.

Validation of parameter examples is now merged and removed from the scope of this task.

HCoplin-WMF set the point value for this task to 3.

Flagging that I believe we already completed much of the parameter work: https://phabricator.wikimedia.org/T410397

I noticed this morning that the spreadsheet wasn't updated, but that part should be done! :)

@HCoplin-WMF , what is the spreadsheet you mean here?

This spreadsheet! :D https://docs.google.com/spreadsheets/d/1nxGsWvpu_GXD28Fw19A8WWJa5cumWNke2E9m-22Qxu4/edit?gid=0#gid=0

It is/was our original tracker for figuring out rules and which rules were implemented. Apologies for missing the link originally!

Of the comments I posted in my draft Merge Request, I realized that this one may be relevant for you to opine on, @KBach . This thought is a supplementary one beyond the above requirements.

Edit:
Never mind - I was being silly. The subset test I asked about exists here already. 🎊

aaron changed the task status from Open to In Progress.Apr 29 2026, 3:28 PM

@KBach , @AGhirelli-WMF perceptively made this comment in reviewing my code. In response, I softened this language in my most recent commit, to better align with the task description of severity: "warn". May you confirm if "Validate that if the OAD has a top-level tags object, the operation has a tags field" deserves severity: "warn" or severity: "error"?

@KineticPelagic @AGhirelli-WMF thank you for bringing this up. Severity: warn is correct in this case, and the new message looks good to me.