microsoft / microsoft/OpenAPI.NET.OData
[Feature Request] Standardize operationIds to ensure uniqueness
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 240
- Forks
- 70
- Avg merge
- 7h 59m
- Merged PRs (30d)
- 13
Description
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
functionall 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced OpenAPIService/PowershellFormatter.cs and the discussion linked from pull request 338 to understand the existing operationId conventions. Trace where operationIds are generated for OData paths, then identify the document validation entry point; done means the requested naming rules are applied and duplicate operationIds are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100