Open weidongxu-microsoft opened 2 months ago
Request should be correct to versioning/removed/api-version:v2preview/v3 with enumMemberV2Preview. But rejected by mockapi
versioning/removed/api-version:v2preview/v3
enumMemberV2Preview
[ForkJoinPool-1-worker-1] INFO com.versioning.removed.implementation.RemovedClientImpl$RemovedClientService.modelV3Sync - {"az.sdk.message":"HTTP request","method":"POST","url":"http://localhost:3000/versioning/removed/api-version:v2preview/v3","tryCount":1,"Date":"Mon, 30 Sep 2024 02:10:20 GMT","Content-Type":"application/json","x-ms-client-request-id":"5d87308e-055b-45fa-83a4-e375c4f8d42d","Accept":"application/json","User-Agent":"azsdk-java-${project.artifactId}/${project.version} (21.0.3; Windows 11; 10.0)","content-length":45,"body":"{\"id\":\"123\",\"enumProp\":\"enumMemberV2Preview\"}"} [ForkJoinPool-1-worker-1] INFO com.versioning.removed.implementation.RemovedClientImpl$RemovedClientService.modelV3Sync - {"az.sdk.message":"HTTP response","statusCode":400,"url":"http://localhost:3000/versioning/removed/api-version:v2preview/v3","durationMs":6,"content-length":160,"Date":"Mon, 30 Sep 2024 02:10:20 GMT","Connection":"keep-alive","ETag":"W/\"a0-7pCSm5UxU05anpeENBbPPWfTNCY\"","Content-Type":"application/json; charset=utf-8","redactedHeaders":"Keep-Alive,X-Powered-By","content-length":160,"body":"{\"message\":\"Body provided doesn't match expected body\",\"expected\":{\"id\":\"123\",\"enumProp\":\"enumMemberV1\"},\"actual\":{\"id\":\"123\",\"enumProp\":\"enumMemberV2Preview\"}}"} com.azure.core.exception.HttpResponseException: Status code 400, "{"message":"Body provided doesn't match expected body","expected":{"id":"123","enumProp":"enumMemberV1"},"actual":{"id":"123","enumProp":"enumMemberV2Preview"}}"
Commented by Crystal, the expected request body should only include id=123, no enumProp as it is removed in v2preview.
id=123
enumProp
Request should be correct to
versioning/removed/api-version:v2preview/v3
withenumMemberV2Preview
. But rejected by mockapi