Define a security scheme and error responses in the OpenAPI spec

未关闭 适合新手
#7 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
75/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
openapi, yaml
领域
api, documentation

调研方向

阅读 spec/oqp-v1.0.0.yaml 和 docs/getting-started.md,检查现有路径、响应定义和 bearer token 示例。添加共享的 bearer 安全方案,将其应用于受保护的端点,同时保持 GET /.well-known/oqp 为公开端点。为所要求的响应定义并引用共享的 Error schema。完成标准是 YAML 符合有效的 OpenAPI 3.1,并且入门指南说明了认证模型。

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

描述

enhancement good first issue

docs/getting-started.md shows a request with Authorization: Bearer YOUR_TOKEN, but spec/oqp-v1.0.0.yaml has no securitySchemes and no security requirement. The spec also defines only success responses (plus a 404 on the workflow context path). There are no 400, 401, or 5xx schemas.

What to do

  • Add a bearer securitySchemes entry and reference it on the endpoints that need it. GET /.well-known/oqp can stay public.
  • Add a shared Error schema under components and reference it from 400, 401, and 404 responses.
  • Mention the auth model in docs/getting-started.md.

Keep the YAML valid OpenAPI 3.1.

主要语言
没有语言数据
星标
18
派生
3
平均合并
1 小时 14 分钟
30 天内合并 PR
3

环境准备

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

从这里开始

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

OrangeproAI/open-qa-protocol 的其他 Issue

查看 OrangeproAI/open-qa-protocol 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

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