Page MenuHomePhabricator

Enable Swagger UI for REST API on Cloud instances
Open, Needs TriagePublic

Description

Separated from T362769

Before we are ready to pick this up we should estimate the Level of Effort to do this

Event Timeline

I believe I heard that the WMF has decided against swagger UI citing security and maintenance concerns?
(I have nothing to point to beyond overhearing this at the hackathon)
So it might be "best" to go for something else?

CC @HCoplin-WMF as I expect you know what I overheard!

Indeed! Thanks for tagging me in. I can confirm that although we are currently using it in multiple documentation solutions (eg: REST Sandbox, Wikibase API), we intend to move away from it within the next year or so, for a few reasons:

  1. SwaggerUI currently has non-compliant license handling within the package, meaning it is not compliant with Debian standards. Although we have it within MediaWiki Core to support the REST Sandbox, we have been manually removing it from each release and are actively in the process of relocating it to an extension to reduce the risk and need for manual removal.
  2. It does not allow for translation. Although we are translating the main content of our OpenAPI specs (eg: REST Sandbox for French Wikipedia), the UI itself cannot be translated within OpenAPI, which causes a confusing and disjointed experience. We therefore want to be more in control of the documentation rendering experience so that we can make it more consistent and seamless for non-English speakers.
  3. It has a few issues that came up during the package security review.

In terms of what will replace it, we are currently gathering requirements and doing initial design work for transforming developer.wikimedia.org into something a little more fully featured, including a custom API Explorer built using
Codex. Happy to discuss more and what that might mean for your project!