Skip to content

[MPG] Treat fixed-name child resources sharing parent model as singleton resources #59322

@live1206

Description

@live1206

Problem

The management-plane generator currently emits a public collection type/accessor for fixed-name child resource paths that behave as singleton resources and return the parent resource model. For example, Container Apps detector properties use fixed paths such as:

  • /containerApps/{containerAppName}/detectorProperties/rootApi
  • /managedEnvironments/{environmentName}/detectorProperties/rootApi

These operations return the parent resource data model (ContainerAppData / ContainerAppManagedEnvironmentData), but generation treats the child path as a non-singleton resource and emits public collection types such as ContainerAppDetectorPropertyCollection and ContainerAppManagedEnvironmentDetectorResourcePropertyCollection.

Expected behavior

For fixed-name child paths that share the parent resource model and have no list/enumeration semantics, the generator should treat the child as a singleton resource. It should avoid exposing the intermediate collection accessor publicly and should generate/allow a singleton resource accessor shape instead.

Current SDK workaround

The AppContainers SDK uses custom code to internalize the generated collection and suppress the public collection accessor for these detector property resources.

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions