restbase icon indicating copy to clipboard operation
restbase copied to clipboard

Redirect docs for metrics endpoints to new docs site

Open apaskulin opened this issue 1 year ago • 1 comments

As part of the project to replace the RESTBase /metrics endpoints (AQS 1.0) with a new set of services (AQS 2.0), we've created a new documentation site for the /metrics endpoints that uses OpenAPI specs generated by the new AQS 2.0 services.

My goal is to redirect users viewing the old docs (https://wikimedia.org/api/rest_v1/#/) to the new docs (https://doc.wikimedia.org/analytics-api), without breaking RESTBase or making the other portions of its docs unusable.

Ideally, I'd like to be able to keep as much of the old structure as possible (the sections headings and endpoint titles) and replace the content with a link to the new docs site. Or, we could just remove the /metrics endpoints from being listed on https://wikimedia.org/api/rest_v1/#/. But I wasn't able to find a way to do either of these options without breaking RESTBase's CI. Is there an easy way to do something like this without breaking things?

This PR adds a note to the intro section of https://wikimedia.org/api/rest_v1/#/ with a link to the new docs site.

Bug: https://phabricator.wikimedia.org/T368973

apaskulin avatar Jul 02 '24 19:07 apaskulin

@nosmo would you be able to help with this?

apaskulin avatar Jul 02 '24 21:07 apaskulin

This change lgtm at the base. Unfortunately I don't know enough about the internals to comment on the solutions beyond this but it'd be good to remove the metrics paths at least so there's less confusion. Does OpenAPI accept absolute urls for things like the x-modules path parameter?

nosmo avatar Jul 09 '24 16:07 nosmo

That's a good question. If I understand correctly, x-modules are a custom setup and not something standard to OpenAPI, so I'm not sure what the limitations are. If it works for you, let's merge this as-is, and I'll open a separate PR that tries to remove the metrics paths.

apaskulin avatar Jul 09 '24 16:07 apaskulin

Also I don't have merge access, so you'll need to merge for me. Thanks!

apaskulin avatar Jul 09 '24 16:07 apaskulin