Azure-rest-api-specs: [ContainerRegistry] TaskStepProperties's type is incorrectly marked as read-only

Created on 12 Apr 2021  路  5Comments  路  Source: Azure/azure-rest-api-specs

The containerregistry_build spec (I'm looking at the version 2019-04-01) marks the type property of the TaskStepProperties schema as read-only: https://github.com/Azure/azure-rest-api-specs/blob/73d51f188ceba91939355c8e1d4d74dd38173c13/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2019-04-01/containerregistry_build.json#L1287

This looks wrong to me because the client is supposed to set this value to "Docker"/"EncodedTask"/"FileTask" depending on which derived type they want to use.

Container Registry Service Attention question

Most helpful comment

@mikhailshilkov thank you very much for reporting the issue. It is fixed in our most recent GA version now.
https://github.com/Azure/azure-rest-api-specs/pull/13971

All 5 comments

Indeed, as the spec is using swagger 2.0 that field needs to be readOnly: true , otherwise the polymorphism cannot be properly resolved as the discriminator requires it for such purpose.

This is breaking functionality on the endpoint.

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @yugangw-MSFT.


Issue Details

The containerregistry_build spec (I'm looking at the version 2019-04-01) marks the type property of the TaskStepProperties schema as read-only: https://github.com/Azure/azure-rest-api-specs/blob/73d51f188ceba91939355c8e1d4d74dd38173c13/specification/containerregistry/resource-manager/Microsoft.ContainerRegistry/stable/2019-04-01/containerregistry_build.json#L1287

This looks wrong to me because the client is supposed to set this value to "Docker"/"EncodedTask"/"FileTask" depending on which derived type they want to use.

Author: mikhailshilkov
Assignees: leni-msft, raych1
Labels: `Container Registry`, `Service Attention`, `needs-triage`, `question`
Milestone: -

Oh, that's good to know! Do you know when the next stable (non-preview) version is going to be published?

@mikhailshilkov thank you very much for reporting the issue. It is fixed in our most recent GA version now.
https://github.com/Azure/azure-rest-api-specs/pull/13971

Was this page helpful?
0 / 5 - 0 ratings