Better user-centric API documentation

未关闭
#3,280 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
文档
描述清晰度
需要澄清
活跃度
停滞
领域
api, documentation

调研方向

首先查看当前的 VirtualService API 文档和链接的既有实践示例,尤其是 HTTPRouteDestination、HTTPRewrite 和 rewrite 部分。定义面向用户的 YAML 结构,包含直接的字段链接、整合后的描述,以及与 API 一致的验证细节。当生成的文档更易于根据 YAML 示例构建,并且准确体现验证行为时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Currently, our API docs (https://istio.io/latest/docs/reference/config/networking/virtual-service/) are not well suited for human consumption IMO.

The structure of the docs is based on proto. Users interacting with Istio, however, do not use proto - they use YAML. Something like HTTPRouteDestination is confusing -- a user literally never sees this! The primary way a user can construct an actual YAML is by copying examples and tweaking them, as the docs themselves only loosely correlate to the YAML.

Additionally, we end up with multiple docs. For example, HTTPRewrite object has one description, and the field rewrite has a different one -- to a user, logically these are the same.

Another minor issue is I cannot link to an individual field (hence I could not link to rewrite directly).

We have one column for "required" or not, but its not always accurate, and doesn't fully represent the api validation logic.


Prior art (not saying these are good or bad necessarily, just some examples(:

https://doc.crds.dev/github.com/istio/api/extensions.istio.io/WasmPlugin/[email protected]

https://developer.hashicorp.com/consul/docs/connect/config-entries/ingress-gateway

https://linkerd.io/2.15/reference/httproute/

https://gateway-api.sigs.k8s.io/reference/spec/#gateway.networking.k8s.io/v1.HTTPRoute

https://github.com/kubernetes-sigs/gateway-api/pull/3204

https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/listener/v3/listener_components.proto

主要语言
Go
星标
523
派生
623
平均合并
5 天 20 小时
30 天内合并 PR
4

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

istio/api 的其他 Issue

查看 istio/api 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。