-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolves operationId
and tag
names for OData cast paths
#338
Conversation
SonarCloud Quality Gate failed. |
/// <param name="navigationSource">The <see cref="IEdmNavigationSource"/> of the target path.</param> | ||
/// <param name="prefix">Identifier indicating whether it is a collection-valued non-indexed navigation property.</param> | ||
/// <returns>The operation id name.</returns> | ||
internal static string GenerateNavigationPropertyPathOperationId(ODataPath path, IEdmNavigationSource navigationSource, string prefix = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we standardize the naming convention of operationIds to what we have in DevX API - https://github.com/microsoftgraph/microsoft-graph-devx-api/blob/dev/OpenAPIService/PowershellFormatter.cs?
For example:
- Remove hash suffix values from operationIds of function paths.
- Add '_' to separate verb (action) in an operationId. This typically the last
.
or second.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comments at #324 (comment) on operationIds and tags for count and complex property paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we standardize the naming convention of operationIds to what we have in DevX API - https://github.com/microsoftgraph/microsoft-graph-devx-api/blob/dev/OpenAPIService/PowershellFormatter.cs? For example:
- Remove hash suffix values from operationIds of function paths.
- Add '_' to separate verb (action) in an operationId. This typically the last
.
or second.
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.
There are other clients who rely on the operation ids, not sure it will be a good idea to handle that in this library. See this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are also using AutoREST in the referenced issue - microsoftgraph/msgraph-metadata#289. Standardizing the operationIds here and ensuring uniqueness will have the net effect of fixing their issue.
To unblock this change, I've created an issue at #361 for us to discuss this further.
Kudos, SonarCloud Quality Gate passed! |
Fixes #324
This PR:
operationId
andtag
names for OData cast paths to conform with other no non-OData cast paths.NB: The PR is currently in draft because:
$count
paths currently don't have tags generated for them. We need to agree on a format before these can be updated into this fix. The discussion can be found here.