@azure-tools/typespec-azure-resource-manager 0.70.0 → 0.71.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -704,7 +704,7 @@ model ContosoApplianceProperties is AgentPropertiesAppliance<ContosoApplianceDef
|
|
|
704
704
|
|
|
705
705
|
// The @azureBaseType decorator marks the resource as conforming to the Agent base type.
|
|
706
706
|
// (The Agent template applies this automatically, but it can also be applied directly.)
|
|
707
|
-
@azureBaseType(#{ baseType:
|
|
707
|
+
@azureBaseType(#{ baseType: BaseType.Agent, version: "2024-06-01" })
|
|
708
708
|
model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
|
|
709
709
|
...ResourceNameParameter<ContosoApplianceAgent>;
|
|
710
710
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DecoratorContext, DecoratorValidatorCallbacks, Model } from "@typespec/compiler";
|
|
2
2
|
export interface BaseTypeInfo {
|
|
3
|
-
readonly baseType: string;
|
|
3
|
+
readonly baseType: "Agent" | "Relationship" | string;
|
|
4
4
|
readonly version: string;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
@@ -22,7 +22,7 @@ export interface BaseTypeInfo {
|
|
|
22
22
|
*
|
|
23
23
|
* // The @azureBaseType decorator marks the resource as conforming to the Agent base type.
|
|
24
24
|
* // (The Agent template applies this automatically, but it can also be applied directly.)
|
|
25
|
-
* @azureBaseType(#{ baseType:
|
|
25
|
+
* @azureBaseType(#{ baseType: BaseType.Agent, version: "2024-06-01" })
|
|
26
26
|
* model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
|
|
27
27
|
* ...ResourceNameParameter<ContosoApplianceAgent>;
|
|
28
28
|
* }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Azure.ResourceManager.BaseTypes.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.BaseTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE/F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Azure.ResourceManager.BaseTypes.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.ResourceManager.BaseTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE/F,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,MAAM,CAAC;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,KAAK,EACb,QAAQ,EAAE,YAAY,KACnB,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,uCAAuC,GAAG;IACpD,aAAa,EAAE,sBAAsB,CAAC;CACvC,CAAC"}
|
package/lib/base-types/agent.tsp
CHANGED
|
@@ -399,7 +399,7 @@ model ResponseInstructionsProperty {
|
|
|
399
399
|
* Applies the Agent base type decorator automatically.
|
|
400
400
|
* @template Properties RP-specific properties for the agent (must extend AgentProperties)
|
|
401
401
|
*/
|
|
402
|
-
@azureBaseType(#{ baseType:
|
|
402
|
+
@azureBaseType(#{ baseType: BaseType.Agent, version: "2024-06-01" })
|
|
403
403
|
model Agent<Properties extends AgentProperties> is TrackedResource<Properties>;
|
|
404
404
|
|
|
405
405
|
/**
|
|
@@ -2,14 +2,29 @@ using Reflection;
|
|
|
2
2
|
|
|
3
3
|
namespace Azure.ResourceManager.BaseTypes;
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* The set of Azure base types a resource may declare conformance to via the
|
|
7
|
+
* `@azureBaseType` decorator. Modeled as an extensible (open) enum so additional
|
|
8
|
+
* base types can be introduced without a breaking change.
|
|
9
|
+
*/
|
|
10
|
+
union BaseType {
|
|
11
|
+
/** The Agent base type. */
|
|
12
|
+
Agent: "Agent",
|
|
13
|
+
|
|
14
|
+
/** The Relationship base type. */
|
|
15
|
+
Relationship: "Relationship",
|
|
16
|
+
|
|
17
|
+
string,
|
|
18
|
+
}
|
|
19
|
+
|
|
5
20
|
/**
|
|
6
21
|
* An ARM-managed base type descriptor identifying the schema contract a resource conforms to.
|
|
7
22
|
* Used as a parameter to the `@azureBaseType` decorator to indicate which
|
|
8
23
|
* base types a resource conforms to.
|
|
9
24
|
*/
|
|
10
25
|
model BaseTypeInfo {
|
|
11
|
-
/** The base type identifier
|
|
12
|
-
baseType:
|
|
26
|
+
/** The base type identifier. */
|
|
27
|
+
baseType: BaseType;
|
|
13
28
|
|
|
14
29
|
/** The schema version of the base type. */
|
|
15
30
|
version: string;
|
|
@@ -36,7 +51,7 @@ model BaseTypeInfo {
|
|
|
36
51
|
*
|
|
37
52
|
* // The @azureBaseType decorator marks the resource as conforming to the Agent base type.
|
|
38
53
|
* // (The Agent template applies this automatically, but it can also be applied directly.)
|
|
39
|
-
* @azureBaseType(#{ baseType:
|
|
54
|
+
* @azureBaseType(#{ baseType: BaseType.Agent, version: "2024-06-01" })
|
|
40
55
|
* model ContosoApplianceAgent is TrackedResource<ContosoApplianceProperties> {
|
|
41
56
|
* ...ResourceNameParameter<ContosoApplianceAgent>;
|
|
42
57
|
* }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.71.0-dev.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -47,29 +47,29 @@
|
|
|
47
47
|
"pluralize": "^8.0.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
+
"@azure-tools/typespec-azure-core": "^0.70.0 || >=0.71.0-dev <0.71.0",
|
|
50
51
|
"@typespec/compiler": "^1.14.0",
|
|
51
|
-
"@azure-tools/typespec-azure-core": "^0.70.0",
|
|
52
52
|
"@typespec/http": "^1.14.0",
|
|
53
|
+
"@typespec/rest": "^0.84.0 || >=0.85.0-dev <0.85.0",
|
|
53
54
|
"@typespec/openapi": "^1.14.0",
|
|
54
|
-
"@typespec/
|
|
55
|
-
"@typespec/versioning": "^0.84.0"
|
|
55
|
+
"@typespec/versioning": "^0.84.0 || >=0.85.0-dev <0.85.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
+
"@azure-tools/typespec-azure-core": "^0.70.0 || >=0.71.0-dev <0.71.0",
|
|
58
59
|
"@types/node": "^26.0.0",
|
|
59
60
|
"@types/pluralize": "^0.0.33",
|
|
61
|
+
"@typespec/compiler": "^1.14.0",
|
|
62
|
+
"@typespec/http": "^1.14.0",
|
|
63
|
+
"@typespec/library-linter": "^0.84.0 || >=0.85.0-dev <0.85.0",
|
|
64
|
+
"@typespec/rest": "^0.84.0 || >=0.85.0-dev <0.85.0",
|
|
65
|
+
"@typespec/tspd": "^0.76.0 || >=0.77.0-dev <0.77.0",
|
|
66
|
+
"@typespec/versioning": "^0.84.0 || >=0.85.0-dev <0.85.0",
|
|
67
|
+
"@typespec/openapi": "^1.14.0",
|
|
60
68
|
"@vitest/coverage-v8": "^4.1.3",
|
|
61
69
|
"@vitest/ui": "^4.1.3",
|
|
62
70
|
"rimraf": "^6.1.3",
|
|
63
71
|
"typescript": "~6.0.2",
|
|
64
|
-
"vitest": "^4.1.3"
|
|
65
|
-
"@azure-tools/typespec-azure-core": "^0.70.0",
|
|
66
|
-
"@typespec/compiler": "^1.14.0",
|
|
67
|
-
"@typespec/http": "^1.14.0",
|
|
68
|
-
"@typespec/library-linter": "^0.84.0",
|
|
69
|
-
"@typespec/rest": "^0.84.0",
|
|
70
|
-
"@typespec/tspd": "^0.76.0",
|
|
71
|
-
"@typespec/versioning": "^0.84.0",
|
|
72
|
-
"@typespec/openapi": "^1.14.0"
|
|
72
|
+
"vitest": "^4.1.3"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|
|
75
75
|
"clean": "rimraf ./dist ./temp",
|