kumahq / kuma-website

🐻 The official website for Kuma, the control plane for modern service connectivity.
https://kuma.io
Apache License 2.0
104 stars 87 forks source link

Generate Kuma REST API documentation #573

Open jpeach opened 2 years ago

jpeach commented 2 years ago

It's tedious to manually update the reference documentation for the Kuma REST API, but there are a lot of REST API documentation generators available. It would be great to adopt something like OpenAPI so that we can guarantee the REST API documentation is always accurate and timely for each Kuma version.

xref #572 #553

Bradamant3 commented 2 years ago

Agree +100. But (partly from Slack conversation):

only way to "guarantee" is to generate from code. We can do whatever we want with an OpenAPI definition (in this case, generate the docs from it), but since we don't design the API first, we need to generate it (yes, some people write it by hand, which pretty much moots the point of always being accurate ...). I haven't been able to find a go tool that does this. There are plenty of tools to generate go clients or servers from OpenAPI, but vice versa not so much. There's go-swagger but it supports only Swagger 2.0.

I thought OpenAPI 3.x had better doc support ... but it does not, it's pretty much the same as Swagger 2.0, so if docs are what we want, Swagger 2.0 might be sufficient. But if we're going to go to the trouble of generating Swagger/OpenAPI in the first place, might be nice for users to give them the definition file too, in which case current version would be better UX.

What I know about go tooling would fit in a thimble, though, so maybe someone else has better ideas. 🤞

github-actions[bot] commented 2 years ago

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

lahabana commented 2 years ago

This has a Kuma ticket for generating openapi spec.

github-actions[bot] commented 2 years ago

This issue was inactive for 30 days it will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant please comment on it promptly or attend the next triage meeting.

github-actions[bot] commented 1 year ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.

lahabana commented 1 year ago

This is something in progress as new policies have openAPIv2 specs.

github-actions[bot] commented 1 year ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.

github-actions[bot] commented 1 year ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.

github-actions[bot] commented 11 months ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.

github-actions[bot] commented 8 months ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.

lahabana commented 8 months ago

Some stuff has been done in this area and we now have: https://github.com/kumahq/kuma/blob/master/docs/generated/openapi.yaml

We'd likely want to add this to https://docs.konghq.com/api/ as it's very straightforward.

Some docs here: https://docs.google.com/document/d/1RUzNV6Pt8XN3jnqE82EGr7YrkE70af4_LIQIzNz2reE/edit

github-actions[bot] commented 5 months ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.

lahabana commented 4 months ago

As a note a lot of this has been started with new resources working and recent apis using openapi. I'd love to find a way to backfill APIs for old policies in a semi-automatic way (even if payloads are incomplete). This will cover a good set of cases at least

github-actions[bot] commented 1 month ago

This issue was inactive for 90 days. It will be reviewed in the next triage meeting and might be closed. If you think this issue is still relevant, please comment on it or attend the next triage meeting.