Azure / typespec-azure

About TypeSpec Azure Libraries
https://azure.github.io/typespec-azure/
MIT License
15 stars 41 forks source link

[Bug] Extensions not copied over to derived XXUpdateModel #256

Open allenjzhang opened 9 months ago

allenjzhang commented 9 months ago

Describe the bug The x-ms-identifier extensions are not on the derived Update model.

model NetworkProfile {
  /** Gets or sets the list of network interfaces associated with the virtual machine. */
  @extension("x-ms-identifiers", ["name", "nicId"])
  networkInterfaces?: NetworkInterface[];
}
"NetworkProfile": {
  "description": "Defines the resource properties.",
  "properties": {
    "networkInterfaces": {
      "description": "Gets or sets the list of network interfaces associated with the virtual machine.",
      "items": {
        "$ref": "#/definitions/NetworkInterface"
      },
      "type": "array",
      "x-ms-identifiers": [
        "name",
        "nicId"
      ]
    }
  },
  "type": "object"
},
"NetworkProfileUpdate": {
  "description": "Defines the resource properties.",
  "properties": {
    "networkInterfaces": {
      "description": "Gets or sets the list of network interfaces associated with the virtual machine.",
      "items": {
        "$ref": "#/definitions/NetworkInterfaceUpdate"
      },
      "type": "array",
      "x-ms-identifiers": []
    }
  },
  "type": "object"
},


**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
markcowl commented 8 months ago

@allenjzhang Cannot repro this in playground Can you link a repro?