Skip to content

[Azure Mgmt Generator] Visitor changes the name of a type but its corresponding deserialization method's name is not changed #54249

@ArcturusZhang

Description

@ArcturusZhang

I am generating ACR using new generator, in the generated code, I saw this method was generated in ContainerRegistryPrivateEndpointConnectionData class:

internal static ContainerRegistryPrivateEndpointConnectionData DeserializeContainerRegistryPrivateEndpointConnection(JsonElement element, ModelReaderWriterOptions options)

but we are invoking the method using a different name, which causes compilation errors:

array.Add(ContainerRegistryPrivateEndpointConnectionData.DeserializeContainerRegistryPrivateEndpointConnectionData(item, options));

I saw our visitor is implemented to both change the name of the type, and the name of the deserialization method.

But I suspect that when this RP is generating, we somehow touched its serialization provider first therefore its serialization method has the wrong name already.

maybe when we change the serialization provider of this type, we should call Reset to refresh everything?

Metadata

Metadata

Assignees

No one assigned

    Labels

    CodeGenIssues that relate to code generationMgmtThis issue is related to a management package.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions