microsoft / microsoft/OpenAPI.NET.OData

[Feature Request] Standardize operationIds to ensure uniqueness

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

还没有人认领这个 Issue。

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

描述

We should consider standardizing the naming convention of operationIds to what we currently have in DevX API (PowerShell style) - https://github.com/microsoftgraph/microsoft-graph-devx-api/blob/dev/OpenAPIService/PowershellFormatter.cs? For example:

  • Remove hash suffix values from operationIds for function all paths.
  • Add '_' to separate verb (action) in an operationId. This typically the last . or second from last . for OData cast paths.
  • PUT operations should have Set as the verb in an operationId {xxx}_Set{yyy}.

In PowerShell, we use operationIds to form command names.

As part of this exercise, we should add validation to ensure operationIds are unique for a given document.

Edit: This is a continuation of https://github.com/microsoft/OpenAPI.NET.OData/pull/338#discussion_r1097802458.

贡献指南

打开贡献指南

从这里开始

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

调研方向

从引用的 OpenAPIService/PowershellFormatter.cs 和 pull request 338 中链接的讨论开始,以了解现有的 operationId 约定。跟踪 OData 路径的 operationIds 在哪里生成,然后确定文档验证入口;完成的标准是应用所请求的命名规则,并拒绝重复的 operationIds。

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

评估

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

把新 issue 发到你的邮箱

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