Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate getAzureResources and define resolveAzureResources to handle multi-path resource operations #1876

Open
markcowl opened this issue Nov 18, 2024 · 1 comment
Assignees
Labels
deprecation A previously supported feature will now report a warning and eventually be removed feature New feature or request lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library
Milestone

Comments

@markcowl
Copy link
Member

  • Add a new public operation, resolveArmResources that returns new resource metadata

      export interface ResourceMetadata {
        /** The model type for the resource */
        type: Model;
        /** The kind of resource (extension | tracked | proxy | virtual) */
        kind: ArmResourceKind;
        /** The provider namespace */
        providerNamespace: string;
      }
    
      export interface ResolvedResource extends ResourceMetadata {
        /** The set of resolved operations for a resource.  For most 
            resources there will be 1 returned record */
        operations?: ResolvedOperations[];
      }
    
      export interface ResolvedOperations {
        /** The resource type (The actual respource type strign will be "${provider}/${types.join("/")}) */
        resourceType: ResourceType;
        /** The path to the instance of a resource */
        resourceInstancePath: string;
        /** The operations using this resourceInstancePath */
        operations: ArmResourceOperations;
      }
      
      export interface ResourceType {
        provider: string;
        types: string[];
      }
    
      export function resolveArmResources(program: Progam): ResolvedResource[];
      export function resolveArmResourceOperations(program: Progam, resourceType: Model): ResolvedOperations[];
  • Deprecate getArmResources, resolveResourceOperations

  • Relax constraints in @armResourceOperations to allow multiple sets of operations for a specific resource type

  • Add test to verify correct generation of a multi-path resource

Implementation issue for #234 and in this gist

@markcowl markcowl added deprecation A previously supported feature will now report a warning and eventually be removed feature New feature or request lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library labels Nov 18, 2024
@markcowl
Copy link
Member Author

est: 8

@markcowl markcowl added this to the [2024] December milestone Nov 19, 2024
@AlitzelMendez AlitzelMendez self-assigned this Dec 12, 2024
@markcowl markcowl modified the milestones: [2025] February, Backlog Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A previously supported feature will now report a warning and eventually be removed feature New feature or request lib:azure-resource-manager Issues for @azure-tools/typespec-azure-core library
Projects
None yet
Development

No branches or pull requests

2 participants