Page MenuHomePhabricator

Fix linter issues discovered during implementation of the OAD example
Closed, ResolvedPublic5 Estimated Story Points

Description

Linting the current version of the OAD example (GitLab, T410087) returns five distinct errors (listed in sections below) that are likely false positives and shouldn't be reported. Please investigate and modify the linter to address these.

To replicate, run the OAD through https://wmf-openapi-linter.toolforge.org/. Please feel free to split individual errors to sub-tasks if necessary.

wikimedia-paths-parameter-in (lines 0-0)

The 'in' property of a parameter must be set set and have a valid value: query, header, path, or cookie.

When a link with parameters is present, the linter expects an incorrect data structure in the link's parameters property. Specifically, it requires a structure like in parameters under an operation, while the parameters property for links is different (it's a map rather than an array, and it doesn't contain the "in" property). Compare the parameters property in the Operation object with parameters in the Link object.

wikimedia-description-length (lines 4-62)

A short description is required.

High level description is too long according to the linter's rules, which require max 256 characters. As discussed in the OAD example document, this limit should apply to the summary field, not the description.

wikimedia-paths-parameter-description-enums (lines 592-603)

The 'description' property of a parameter must be set set and have a valid value

(This error is new and wasn't previously listed or discussed in the OAD example document)

The description of the parameter doesn't include the explanations of different enum values. Instead, these explanations are present in a separate data structure in a proposed extension. Depending on whether the proposal is accepted, we might need to remove this part of description validation.

oas3-valid-schema-example (line 621 and others)

"example" property must match format "date"

The linter converts dates in YAML to date-time under the hood. If the field that got converted is a date, then the linter reports an error. It's a common behavior (Swagger Editor does that too), but it seems incorrect. You can test this by comparing the schema for startDate and endDate parameters in the YAML input with the same parameters in Linter Results after running the linter.

oas3-schema (line 938)

"operationRef" property must match format "uri-reference".

The oas3-schema rule reports that "operationRef" property must match format "uri-reference" but the format used in the example is permitted in OAS 3.0.0.

Details

Other Assignee
aaron

Event Timeline

aaron triaged this task as Unbreak Now! priority.Jan 23 2026, 5:22 AM
aaron lowered the priority of this task from Unbreak Now! to Needs Triage.
aaron triaged this task as Medium priority.Jan 23 2026, 5:26 AM
aaron moved this task from Bugs & Chores to To Refine on the MW-Interfaces-Team board.
BPirkle set the point value for this task to 5.Feb 19 2026, 4:30 PM
BPirkle subscribed.

There's uncertainty in effort level on some of these fixes. If the implementation goes beyond the estimated size, then we should break off the more challenging parts into separate tasks and estimate them separately.

We no longer consider wikimedia-paths-parameter-description-enums a false positive, so I'm removing it from the scope of this task.

Swagger UI doesn't support the x-enumDescriptions extension field and the OAD example now contains enum value descriptions in the parameter description. It makes sense to leave the rule as it is for now, until we have support for the x-enumDescriptions field in the sandbox/explorer.