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

bug in versioning/removed/mockapi.ts case #734

Open
weidongxu-microsoft opened this issue Sep 30, 2024 · 1 comment
Open

bug in versioning/removed/mockapi.ts case #734

weidongxu-microsoft opened this issue Sep 30, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@weidongxu-microsoft
Copy link
Member

Request should be correct to versioning/removed/api-version:v2preview/v3 with enumMemberV2Preview. But rejected by mockapi

[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"}}"
@weidongxu-microsoft
Copy link
Member Author

Commented by Crystal, the expected request body should only include id=123, no enumProp as it is removed in v2preview.

@archerzz archerzz added the bug Something isn't working label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants