microsoft / microsoft/OpenAPI.NET.OData

Use annotation from the model to create OpenApiInfo

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

还没有人认领这个 Issue。

blocked dependency:odata priority:p3 status:waiting-for-dependency type:enhancement
主要语言
C#
星标
240
派生
70
平均合并
7 小时 59 分钟
30 天内合并 PR
13

描述

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.

贡献指南

打开贡献指南

从这里开始

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

调研方向

首先检查主 schema 对 Core.Description 和 Core.SchemaVersion 的 ODL 支持,然后检查当前的 OpenApiInfo 生成逻辑。支持这些注解后,使用它们设置标题、版本和描述;如果不存在注解,则保留默认值。

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

评估

技术栈
csharp
领域
api
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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