Skip to content

Have standardized template/function for ArmCustomPatchSync to define optional patch model based original one #3914

Closed as duplicate

Description

@MaryGao

Clear and concise description of the problem

With this issue discussed, in custom patch we have to re-construct a new model because Azure.ResourceManager.Foundations.ResourceUpdateModel<Employee, EmployeeProperties> does not recursively change the typegraph to include only updateable properties and make them optional. This is not ideal because we have to duplicate every properties based existing ones and we may forget to update them when new properties are added to original one.

So we could have another either template or function to standardize the way to define patch model for better maintenance.

Checklist

  • Follow our Code of Conduct
  • Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the TypeSpec repo
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Activity

  1. changed the title [-]Have another template/function for ArmCustomPatchSync to define optional patch model based original one[/-] [+]Have standardized template/function for ArmCustomPatchSync to define optional patch model based original one[/+] on Feb 10, 2026
  2. MaryGao commented on Feb 10, 2026

    @MaryGao
    MemberAuthor

    I know it may be duplicated with this #2643, but i still wonder if we could provide a template/function tentatively before everything in PATCH design is ready. Reconstructing is bad for us it is also hard to update existings specs if we want when design ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions