microsoft / typespec

https://typespec.io/
MIT License
4.54k stars 220 forks source link

http-client-java, fix duplicate Error model #5087

Closed weidongxu-microsoft closed 1 week ago

weidongxu-microsoft commented 1 week ago

Main change is to avoid duplicating the Error model from Azure.Core.

The schema comes from 2 places. One is from Azure.Core.Foundations.Error via typespec source. Another is from the PollOperationDetailsSchema we created for mapping to Java azure-core class (on its error property).

They should be the same model, but here we created it twice. Due to a bug, in some test case, the deduplicate logic changed one of them to Error1 (deduplicate should not apply to models in azure-core).


A minor change is to restore the partialupdate test. It was broken (partial-updated code not included in java file) when the module migrate to microsoft/typespec.

azure-sdk commented 1 week ago

No changes needing a change description found.

azure-sdk commented 1 week ago

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs