Use annotation from the model to create OpenApiInfo
还没有人认领这个 Issue。
评估
调研方向
首先检查主 schema 对 Core.Description 和 Core.SchemaVersion 的 ODL 支持,然后检查当前的 OpenApiInfo 生成逻辑。支持这些注解后,使用它们设置标题、版本和描述;如果不存在注解,则保留默认值。
由索引模型根据 Issue 内容生成。
描述
The OASIS OData to OpenApi v3.0 says:
4.2.1 Field title
The value of title is the value of the unqualified annotation Core.Description (see [OData-VocCore]) of the main schema or the entity container of the OData service.
If no Core.Description is present, a default title has to be provided as this is a required OpenAPI field.
4.2.2 Field version
The value of version is the value of the annotation Core.SchemaVersion (see [OData-VocCore]) of the main schema.
If no Core.SchemaVersion is present, a default version has to be provided as this is a required OpenAPI field.
4.2.3 Field description
The value of description is the value of the annotation Core.LongDescription (see [OData-VocCore]) of the main schema or the entity container.
While this field is optional, it prominently appears in OpenAPI exploration tools, so a default description should be provided if no Core.LongDescription annotation is present.
However, the ODL doesn't support "Core.Description" on main schema and Core.SchemaVersion. Once it supports, please update using the annotation.
- 主要语言
- C#
- 星标
- 240
- 派生
- 70
- 平均合并
- 7 小时 59 分钟
- 30 天内合并 PR
- 13
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/OpenAPI.NET.OData 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
microsoft/OpenAPI.NET.OData#661 ·
-
难度 3/5 1-2 天 新手友好度 58/100
microsoft/OpenAPI.NET.OData#852 ·
-
难度 4/5 3-5 天 新手友好度 45/100
microsoft/OpenAPI.NET.OData#833 ·
-
status:needs-more-information
难度 4/5 3-5 天 新手友好度 42/100
microsoft/OpenAPI.NET.OData#723 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 45/100
microsoft/OpenAPI.NET.OData#720 ·
查看 microsoft/OpenAPI.NET.OData 的全部 Issue
相似的 Issue
-
bug
难度 1/5 1 小时以内 新手友好度 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
难度 2/5 1-3 小时 新手友好度 72/100
azurenoops/spin_agent#975 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
难度 2/5 1-3 小时 新手友好度 92/100
dotnet/AspNetCore.Docs#37699 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
SubtitleEdit/subtitleedit#15108 · 1 条评论 ·