Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect docs for metrics endpoints to new docs site #1346

Merged
merged 2 commits into from
Jul 11, 2024

Conversation

apaskulin
Copy link
Contributor

@apaskulin apaskulin commented Jul 2, 2024

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
Copy link
Contributor Author

@nosmo would you be able to help with this?

@nosmo
Copy link
Contributor

nosmo commented Jul 9, 2024

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 nosmo self-requested a review July 9, 2024 16:02
@apaskulin
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@nosmo nosmo merged commit 7b49fb6 into wikimedia:master Jul 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants