Page MenuHomePhabricator

REST: make module definition files compatible with OpenAPI specs
Closed, ResolvedPublic

Description

REST API route definition files are conceptually similar to OpenAPI spec files, but so far they use a different structure. We should make the structure more like OpenAPI files, and make use of any additional information included in these files when generation OPenAPI specs (T323786).

Note that we probably don't want to manually maintain full OpenAPI specs manually. The module definition files would be partial OpenAPI specs, with the blanks filled it by automatically generating information about supported parameters and so on.

Ideally, we'll support referencing external schema definitions, so these can easily be shared between endpoints and modules. These schemas would have to be accessible through a REST endpoint as well, so they can be used in the generated OpenAPI specs.

Event Timeline

Change #1005589 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/core@master] REST: add OpenApiModule

https://gerrit.wikimedia.org/r/1005589

Given that this has a patch against it, I'm moving it to In Progress

daniel changed the task status from Open to In Progress.May 30 2024, 3:40 PM
daniel triaged this task as Medium priority.