Open CommitsVortex opened 2 years ago
We're not running metagov as a co-located server anymore, so that may explain the 404. If we want to keep hosting this (it's the swagger interface, right?) we may need to expose it via policykit.
@mashton Hi Miriam, do you remember what the "OpenAPI Reference" link in the docs was pointing to? Was this the Swagger page?
@thelastjosh it was the OpenAPI documentation, which was being served up as a swagger page at /swagger
and a redoc page at /redoc
Perfect, thanks Miriam!
On Tue, Mar 1, 2022 at 11:55 AM Miriam Ashton @.***> wrote:
@thelastjosh https://github.com/thelastjosh it was the OpenAPI documentation, which was being served up as a swagger page at /swagger and a redoc page at /redoc
— Reply to this email directly, view it on GitHub https://github.com/metagov/gateway/issues/190#issuecomment-1055648671, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHA5PEYOSBGN72RR6QTBD3U5ZDXFANCNFSM5OIKCEYQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Essentially, what needs to happen is we need to move code from this urls.py in Gateway:
https://github.com/metagov/gateway/blob/maste/metagov/metagov/httpwrapper/urls.py#L101
Into the policykit urls.py:
https://github.com/policykit/policykit/blob/master/policykit/policykit/urls.py
I'm not sure precisely what code needs to be moved over, since DRF is doing some fairly complex stuff here.
@shaunagm that's what's required technically, but it raises some flags for me (Though I may have missed some arch changes!). I don't understand why PolicyKit should expose the OpenAPI docs. Metagov Gateway is a layer under PolicyKit, and the PolicyKit authoring API for accessing these services is different from the Metagov Gateway API (as we discussed on Slack last week re: the voting method). People who are using PolicyKit should reference documentation that works for Policykit. What purpose does it serve to serve the Gateway OpenAPI docs from PolicyKit?
I think the OpenAPI docs are correctly located in the http-wrapper
package because they will be exposed alongside the "public metagov service" (not sure if that exists yet). If the problem is that there is no deployment of http-wrapper yet, one idea is to set up a minimal one that only exposes the documentation endpoints but has all other endpoints turned off.
If the problem is that there is no deployment of http-wrapper yet, one idea is to set up a minimal one that only exposes the documentation endpoints but has all other endpoints turned off.
That is the problem I believe. After checking with the requester this doesn't seem to be an urgent issue, so I think we're okay to go with the longer term fix of:
http-wrapper
to expose them again, and adding that new link to the docs
Description
All links to "OpenAPI Reference" & "Metagov API" in docs lead to a 400 Bad Request error page.
This is the link currently being used: https://metagov.policykit.org/redoc/
Files
https://github.com/metagov/gateway/blob/master/docs/index.rst https://github.com/metagov/gateway/blob/master/docs/readme.rst