Interest in taking Schema description from Schema.__doc__ docstring
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- openapi, python
- 领域
- api, documentation
调研方向
从 src/apispec/ext/marshmallow/openapi.py 中现有的 Meta.description 处理附近开始。检查 schema 描述是如何生成的,以及所引用的 flask-smorest 格式是否适用;完成标准是:当 Meta.description 不存在时,Schema.doc 可以提供描述,同时不会替换显式指定的 Meta.description。
由索引模型根据 Issue 内容生成。
描述
You take the object description from Meta.description in https://github.com/marshmallow-code/apispec/blob/8cbbbeb1630ff4d5732f2287b4985df84681af47/src/apispec/ext/marshmallow/openapi.py#L260
Do you have interest in a pull request to also get it from the Schema docstring? Something like:
if hasattr(Meta, "description"):
jsonschema["description"] = Meta.description
elif schema.__doc__:
jsonschema["description"] = schema.__doc__
You can do the same formating as in https://flask-smorest.readthedocs.io/en/latest/openapi.html#add-summary-and-description.
Makes sense?
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 210
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
marshmallow-code/apispec 的其他 Issue
-
DateTime(format="timestamp") generates invalid OpenAPI schema using min instead of minimum可能已有人在做 @Sanjays2402 于 103 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
marshmallow-code/apispec#1064 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
marshmallow-code/apispec#750 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 30/100
marshmallow-code/apispec#1033 ·
维护者通常 1 天内回复
-
`apispec` ignores `oneOf` from `marshmallow-oneofschema`可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 4/5 3-5 天 新手友好度 38/100
marshmallow-code/apispec#1012 · 6 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
marshmallow-code/apispec#981 · 2 条评论 ·
维护者通常 1 天内回复
查看 marshmallow-code/apispec 的全部 Issue
相似的 Issue
-
documentation good first issue priority: P2 status: ready
难度 1/5 1 小时以内 新手友好度 88/100
RhinoLink-Tech/data-fabric#500 ·
维护者通常 1 天内回复
-
backlog
难度 2/5 1-3 小时 新手友好度 78/100
EchoTools/nevr-runtime#2384 ·
维护者通常 1 天内回复
-
[Bug]: The H2 series' and the H3C's fan 3 is labelled "Chamber Fan", Bambu calls it the exhaust fan未关闭area:ui
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
btclib-org/btclib#3062 ·
维护者通常 1 天内回复
-
area:evals area:infra enhancement
难度 2/5 1-3 小时 新手友好度 74/100
jse-avl/support-bot#4 · 1 条评论 ·