Azure / autorest.java

Extension for AutoRest (https://github.com/Azure/autorest) that generates Java code
MIT License
32 stars 80 forks source link

tsp, visibility to m4 x-ms-mutable #2786

Closed weidongxu-microsoft closed 1 month ago

weidongxu-microsoft commented 1 month ago

Codegen for fluent uses the x-ms-mutable, as code in create flow and update flow is separate and could be different. Therefore, emitter need to fill it (from @visibility). https://github.com/Azure/autorest/blob/main/docs/extensions/readme.md#x-ms-mutability

However, the change would not affect generated code, as typespec-azure-resource-manager lib already filtered these properties (and separate the properties for update to ##UpdateProperties). https://github.com/Azure/typespec-azure/blob/typespec-azure%400.42.0/packages/typespec-azure-resource-manager/lib/arm.foundations.tsp#L91-L119

1st and 2nd commit just to see if we can flatten the ##UpdateProperties <-- yes, we can

code https://github.com/Azure/autorest.java/pull/2786/commits/fe751ce11216898029c1b9fdca984b2dbc9c95ac