Skip to content

Conversation

@weidongxu-microsoft
Copy link
Member

fix #1313

case of the parameter not in method signature already fixed in #1311

this PR fix the case of the parameter in method signature (usually path parameter and body parameter).

@weidongxu-microsoft weidongxu-microsoft changed the title llc, fix example generation with x-ms-client-name LLC, fix example generation with x-ms-client-name Jan 20, 2022
@weidongxu-microsoft weidongxu-microsoft marked this pull request as ready for review January 20, 2022 08:46
Comment on lines +258 to +263
Map<String, ProxyMethodParameter> proxyMethodParameterByClientParameterName = proxyMethod.getParameters().stream()
.collect(Collectors.toMap(p -> CodeNamer.getEscapedReservedClientMethodParameterName(p.getName()), Function.identity()));
List<ProxyMethodParameter> proxyMethodParameters = new ArrayList<>();
for (ClientMethodParameter clientMethodParameter : clientMethodParameters) {
ProxyMethodParameter proxyMethodParameter = proxyMethodParameterByClientParameterName.get(clientMethodParameter.getName());
proxyMethodParameters.add(proxyMethodParameter);
Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we should put requestParameterLocation to client method parameter, instead of making the mapping.

@weidongxu-microsoft weidongxu-microsoft merged commit 450a25d into Azure:main Jan 21, 2022
@weidongxu-microsoft weidongxu-microsoft deleted the llc_example-fix branch January 21, 2022 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LLC, fix bug on example generation

2 participants