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

Change or fix links to OpenAPI Reference and Metagov API #190

Open
CommitsVortex opened this issue Feb 13, 2022 · 7 comments
Open

Change or fix links to OpenAPI Reference and Metagov API #190

CommitsVortex opened this issue Feb 13, 2022 · 7 comments
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation priority: medium medium priority

Comments

@CommitsVortex
Copy link
Collaborator

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

@shaunagm shaunagm added priority: medium medium priority bug Something isn't working documentation Improvements or additions to documentation labels Feb 28, 2022
@shaunagm
Copy link
Collaborator

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.

@thelastjosh
Copy link
Member

@mashton Hi Miriam, do you remember what the "OpenAPI Reference" link in the docs was pointing to? Was this the Swagger page?

@gigxz
Copy link
Collaborator

gigxz commented Mar 1, 2022

@thelastjosh it was the OpenAPI documentation, which was being served up as a swagger page at /swagger and a redoc page at /redoc

@thelastjosh
Copy link
Member

thelastjosh commented Mar 1, 2022 via email

@shaunagm
Copy link
Collaborator

shaunagm commented Mar 9, 2022

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.

@gigxz
Copy link
Collaborator

gigxz commented Mar 9, 2022

@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.

@shaunagm
Copy link
Collaborator

shaunagm commented Mar 12, 2022

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:

  • removing the broken link from the docs
  • setting up a separate deployment with http-wrapper to expose them again, and adding that new link to the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation priority: medium medium priority
Projects
None yet
Development

No branches or pull requests

5 participants