microsoft / microsoft/OpenAPI.NET.OData

[Feature Request] Standardize operationIds to ensure uniqueness

Open
#361 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority:p3 type:enhancement
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 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.