Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@azure-tools/typespec-azure-resource-manager"
---

Fix `@azureBaseType` doc example to reference a real resource model instead of non-existent spreads
14 changes: 10 additions & 4 deletions packages/typespec-azure-resource-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,12 +602,18 @@ multiple base types. Duplicate entries are ignored.
##### Examples

```typespec
@azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
model MyAgentProperties {
...AgentProperties;
...AgentToolProperty;
// Agent definition and properties using the Appliance deployment model
model ContosoApplianceDefinition is AgentDefinitionAppliance<true, true>;
model ContosoApplianceProperties is AgentPropertiesAppliance<ContosoApplianceDefinition> {
...DefaultProvisioningStateProperty;
}

// The @azureBaseType decorator marks the resource as conforming to the Agent base type.
// (The Agent template applies this automatically, but it can also be applied directly.)
@azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
...ResourceNameParameter<ContosoApplianceAgent>;
}
```

### Azure.ResourceManager.Legacy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ export interface BaseTypeInfo {
* @param baseType The base type specification this resource implements.
* @example
* ```typespec
* @azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
* model MyAgentProperties {
* ...AgentProperties;
* ...AgentToolProperty;
* // Agent definition and properties using the Appliance deployment model
* model ContosoApplianceDefinition is AgentDefinitionAppliance<true, true>;
* model ContosoApplianceProperties is AgentPropertiesAppliance<ContosoApplianceDefinition> {
* ...DefaultProvisioningStateProperty;
* }
*
* // The @azureBaseType decorator marks the resource as conforming to the Agent base type.
* // (The Agent template applies this automatically, but it can also be applied directly.)
* @azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
* model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
* ...ResourceNameParameter<ContosoApplianceAgent>;
* }
* ```
*/
export type AzureBaseTypeDecorator = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@ model BaseTypeInfo {
* @example
*
* ```typespec
* @azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
* model MyAgentProperties {
* ...AgentProperties;
* ...AgentToolProperty;
* // Agent definition and properties using the Appliance deployment model
* model ContosoApplianceDefinition is AgentDefinitionAppliance<true, true>;
* model ContosoApplianceProperties is AgentPropertiesAppliance<ContosoApplianceDefinition> {
* ...DefaultProvisioningStateProperty;
* }
*
* // The @azureBaseType decorator marks the resource as conforming to the Agent base type.
* // (The Agent template applies this automatically, but it can also be applied directly.)
* @azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
* model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
* ...ResourceNameParameter<ContosoApplianceAgent>;
* }
* ```
*/
extern dec azureBaseType(target: Model, baseType: valueof BaseTypeInfo);
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,18 @@ multiple base types. Duplicate entries are ignored.
#### Examples

```typespec
@azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
model MyAgentProperties {
...AgentProperties;
...AgentToolProperty;
// Agent definition and properties using the Appliance deployment model
model ContosoApplianceDefinition is AgentDefinitionAppliance<true, true>;
model ContosoApplianceProperties is AgentPropertiesAppliance<ContosoApplianceDefinition> {
...DefaultProvisioningStateProperty;
}

// The @azureBaseType decorator marks the resource as conforming to the Agent base type.
// (The Agent template applies this automatically, but it can also be applied directly.)
@azureBaseType(#{ baseType: "Agent", version: "2024-06-01" })
model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
...ResourceNameParameter<ContosoApplianceAgent>;
}
```

## Azure.ResourceManager.Legacy
Expand Down
Loading