-
Notifications
You must be signed in to change notification settings - Fork 82
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
tsp, bug fix multiple content-type + json-patch+json #2870
tsp, bug fix multiple content-type + json-patch+json #2870
Conversation
return map(parameter, false); | ||
} | ||
|
||
public ClientMethodParameter map(Parameter parameter, boolean isProtocolMethod) { |
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.
I added a isProtocolMethod
boolean and the logic here.
@haolingdong-msft
I am not sure about the background that we add this CustomClientParameterMapper
. Is it purely for json-merge-patch?
Can we merge it with ClientParameterMapper
, or extract the shared logic (I assume at least half of the logic here is duplicated)?
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.
Ah, sorry, this one is application/json-patch+json
That's ancient code path.
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.
I can merge CustomClientParameterMapper
with ClientParameterMapper
, as there seems to be only one block of code diff (about array).
But there is CustomProxyParameterMapper
as well... Guess I would wait the background of these classes first.
.../main/java/com/cadl/multicontenttypes/implementation/MultipleContentTypesOnRequestsImpl.java
Outdated
Show resolved
Hide resolved
…ttps://github.com/weidongxu-microsoft/autorest.java into tsp_bug-fix-multiple-content-type-json-merge-patch
source is appconfiguration
https://github.com/Azure/azure-rest-api-specs/blob/c65e8cbbb18fc9d79165f12291d38d91eb340f0f/specification/appconfiguration/AppConfiguration/routes.tsp#L323-L336
which generates a
PutKeyValueRequestContentType contentType
, where it should beString contentType
, for WithResponse API.