Skip to content
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

Include verb in gRPC JSON transcoding swagger path #47165

Merged
merged 1 commit into from
Mar 13, 2023
Merged

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Mar 12, 2023

Follow up to #47123

During manual testing I found the verb also needs to be included in the swagger (OpenAPI) path.

@JamesNK JamesNK added the area-grpc Includes: GRPC wire-up, templates label Mar 12, 2023
@JamesNK JamesNK changed the title Include verb in swagger path Include verb in gRPC JSON transcoding swagger path Mar 12, 2023
@@ -182,6 +182,11 @@ private static string ResolvePath(HttpRoutePattern httpRoutePattern, Dictionary<
sb.Append(httpRoutePattern.Segments[i]);
}
}
if (httpRoutePattern.Verb != null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
if (httpRoutePattern.Verb != null)
if (!string.IsNullOrEmpty(httpRoutePattern.Verb))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purposefully using != null for trailing colon. (i.e. empty verb)

@JamesNK JamesNK merged commit 09e9ed7 into main Mar 13, 2023
@JamesNK JamesNK deleted the jamesnk/swagger-verb branch March 13, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-grpc Includes: GRPC wire-up, templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants