@azure-tools/typespec-azure-core 0.72.0-dev.2 → 0.72.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 +41 -0
- package/dist/generated-defs/Azure.Core.Legacy.d.ts +26 -0
- package/dist/generated-defs/Azure.Core.Legacy.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Legacy.js +2 -0
- package/dist/generated-defs/Azure.Core.Legacy.js.map +1 -0
- package/dist/generated-defs/Azure.Core.Legacy.ts-test.d.ts +2 -0
- package/dist/generated-defs/Azure.Core.Legacy.ts-test.d.ts.map +1 -0
- package/dist/generated-defs/Azure.Core.Legacy.ts-test.js +8 -0
- package/dist/generated-defs/Azure.Core.Legacy.ts-test.js.map +1 -0
- package/dist/src/decorators/override-api-version.d.ts +18 -0
- package/dist/src/decorators/override-api-version.d.ts.map +1 -0
- package/dist/src/decorators/override-api-version.js +63 -0
- package/dist/src/decorators/override-api-version.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib.d.ts +19 -4
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +11 -1
- package/dist/src/lib.js.map +1 -1
- package/dist/src/tsp-index.d.ts.map +1 -1
- package/dist/src/tsp-index.js +4 -0
- package/dist/src/tsp-index.js.map +1 -1
- package/lib/foundations.tsp +1 -1
- package/lib/legacy.tsp +23 -0
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -436,6 +436,47 @@ Identifies a property on _all_ non-error response models that serve as a linked
|
|
|
436
436
|
| ---- | ---------------- | --------------------------- |
|
|
437
437
|
| name | `valueof string` | Property name on the target |
|
|
438
438
|
|
|
439
|
+
### Azure.Core.Legacy
|
|
440
|
+
|
|
441
|
+
- [`@overrideApiVersion`](#@overrideapiversion)
|
|
442
|
+
|
|
443
|
+
#### `@overrideApiVersion`
|
|
444
|
+
|
|
445
|
+
Overrides the API-version wire value used for operations within a namespace or interface.
|
|
446
|
+
|
|
447
|
+
The value is opaque and does not need to be declared by the service version enum. The override
|
|
448
|
+
is inherited by enclosed namespaces, interfaces, and operations, with the nearest override taking
|
|
449
|
+
precedence.
|
|
450
|
+
|
|
451
|
+
This decorator is considered legacy functionality and should only be used to preserve
|
|
452
|
+
compatibility with an existing SDK.
|
|
453
|
+
|
|
454
|
+
```typespec
|
|
455
|
+
@Azure.Core.Legacy.overrideApiVersion(version: valueof string)
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
##### Target
|
|
459
|
+
|
|
460
|
+
The namespace or interface whose operations use the API-version override.
|
|
461
|
+
`Namespace | Interface`
|
|
462
|
+
|
|
463
|
+
##### Parameters
|
|
464
|
+
|
|
465
|
+
| Name | Type | Description |
|
|
466
|
+
| ------- | ---------------- | ------------------------------------- |
|
|
467
|
+
| version | `valueof string` | The non-empty API-version wire value. |
|
|
468
|
+
|
|
469
|
+
##### Examples
|
|
470
|
+
|
|
471
|
+
###### Override an interface API version
|
|
472
|
+
|
|
473
|
+
```typespec
|
|
474
|
+
@Azure.Core.Legacy.overrideApiVersion("2021-11-01")
|
|
475
|
+
interface Widgets {
|
|
476
|
+
get(): void;
|
|
477
|
+
}
|
|
478
|
+
```
|
|
479
|
+
|
|
439
480
|
### Azure.Core.Traits
|
|
440
481
|
|
|
441
482
|
- [`@trait`](#@trait)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { DecoratorContext, DecoratorValidatorCallbacks, Interface, Namespace } from "@typespec/compiler";
|
|
2
|
+
/**
|
|
3
|
+
* Overrides the API-version wire value used for operations within a namespace or interface.
|
|
4
|
+
*
|
|
5
|
+
* The value is opaque and does not need to be declared by the service version enum. The override
|
|
6
|
+
* is inherited by enclosed namespaces, interfaces, and operations, with the nearest override taking
|
|
7
|
+
* precedence.
|
|
8
|
+
*
|
|
9
|
+
* This decorator is considered legacy functionality and should only be used to preserve
|
|
10
|
+
* compatibility with an existing SDK.
|
|
11
|
+
*
|
|
12
|
+
* @param target The namespace or interface whose operations use the API-version override.
|
|
13
|
+
* @param version The non-empty API-version wire value.
|
|
14
|
+
* @example Override an interface API version
|
|
15
|
+
* ```typespec
|
|
16
|
+
* @Azure.Core.Legacy.overrideApiVersion("2021-11-01")
|
|
17
|
+
* interface Widgets {
|
|
18
|
+
* get(): void;
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export type OverrideApiVersionDecorator = (context: DecoratorContext, target: Namespace | Interface, version: string) => DecoratorValidatorCallbacks | void;
|
|
23
|
+
export type AzureCoreLegacyDecorators = {
|
|
24
|
+
overrideApiVersion: OverrideApiVersionDecorator;
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=Azure.Core.Legacy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Legacy.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Legacy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,2BAA2B,EAC3B,SAAS,EACT,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,2BAA2B,GAAG,CACxC,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,SAAS,GAAG,SAAS,EAC7B,OAAO,EAAE,MAAM,KACZ,2BAA2B,GAAG,IAAI,CAAC;AAExC,MAAM,MAAM,yBAAyB,GAAG;IACtC,kBAAkB,EAAE,2BAA2B,CAAC;CACjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Legacy.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Legacy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Legacy.ts-test.d.ts","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Legacy.ts-test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// An error in the imports would mean that the decorator is not exported or
|
|
2
|
+
// doesn't have the right name.
|
|
3
|
+
import { $decorators } from "@azure-tools/typespec-azure-core";
|
|
4
|
+
/**
|
|
5
|
+
* An error here would mean that the exported decorator is not using the same signature. Make sure to have export const $decName: DecNameDecorator = (...) => ...
|
|
6
|
+
*/
|
|
7
|
+
const _decs = $decorators["Azure.Core.Legacy"];
|
|
8
|
+
//# sourceMappingURL=Azure.Core.Legacy.ts-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Azure.Core.Legacy.ts-test.js","sourceRoot":"","sources":["../../generated-defs/Azure.Core.Legacy.ts-test.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,+BAA+B;AAE/B,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAG/D;;GAEG;AACH,MAAM,KAAK,GAA8B,WAAW,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Interface, Namespace, Operation, Program } from "@typespec/compiler";
|
|
2
|
+
import type { OverrideApiVersionDecorator } from "../../generated-defs/Azure.Core.Legacy.js";
|
|
3
|
+
export declare const $overrideApiVersion: OverrideApiVersionDecorator;
|
|
4
|
+
/**
|
|
5
|
+
* Returns the API-version override configured directly on a namespace or interface.
|
|
6
|
+
*
|
|
7
|
+
* @param program The TypeSpec program.
|
|
8
|
+
* @param target The directly decorated namespace or interface.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getApiVersionOverride(program: Program, target: Namespace | Interface): string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Returns the API-version override effective for a namespace, interface, or operation.
|
|
13
|
+
*
|
|
14
|
+
* @param program The TypeSpec program.
|
|
15
|
+
* @param target The namespace, interface, or operation to resolve.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getEffectiveApiVersionOverride(program: Program, target: Namespace | Interface | Operation): string | undefined;
|
|
18
|
+
//# sourceMappingURL=override-api-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-api-version.d.ts","sourceRoot":"","sources":["../../../src/decorators/override-api-version.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EACT,SAAS,EACT,SAAS,EACT,OAAO,EACR,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAQ7F,eAAO,MAAM,mBAAmB,EAAE,2BAcjC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAEpB;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GACxC,MAAM,GAAG,SAAS,CAoCpB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useStateMap } from "@typespec/compiler/utils";
|
|
2
|
+
import { AzureCoreStateKeys, reportDiagnostic } from "../lib.js";
|
|
3
|
+
const [getApiVersionOverrideState, setApiVersionOverrideState] = useStateMap(AzureCoreStateKeys.apiVersionOverride);
|
|
4
|
+
export const $overrideApiVersion = (context, target, version) => {
|
|
5
|
+
if (version.trim().length === 0) {
|
|
6
|
+
reportDiagnostic(context.program, {
|
|
7
|
+
code: "invalid-api-version-override",
|
|
8
|
+
target: context.decoratorTarget,
|
|
9
|
+
});
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
setApiVersionOverrideState(context.program, target, version);
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Returns the API-version override configured directly on a namespace or interface.
|
|
16
|
+
*
|
|
17
|
+
* @param program The TypeSpec program.
|
|
18
|
+
* @param target The directly decorated namespace or interface.
|
|
19
|
+
*/
|
|
20
|
+
export function getApiVersionOverride(program, target) {
|
|
21
|
+
return getApiVersionOverrideState(program, target);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Returns the API-version override effective for a namespace, interface, or operation.
|
|
25
|
+
*
|
|
26
|
+
* @param program The TypeSpec program.
|
|
27
|
+
* @param target The namespace, interface, or operation to resolve.
|
|
28
|
+
*/
|
|
29
|
+
export function getEffectiveApiVersionOverride(program, target) {
|
|
30
|
+
let namespace;
|
|
31
|
+
switch (target.kind) {
|
|
32
|
+
case "Namespace":
|
|
33
|
+
namespace = target;
|
|
34
|
+
break;
|
|
35
|
+
case "Interface": {
|
|
36
|
+
const override = getApiVersionOverride(program, target);
|
|
37
|
+
if (override !== undefined) {
|
|
38
|
+
return override;
|
|
39
|
+
}
|
|
40
|
+
namespace = target.namespace;
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
case "Operation": {
|
|
44
|
+
if (target.interface) {
|
|
45
|
+
const override = getApiVersionOverride(program, target.interface);
|
|
46
|
+
if (override !== undefined) {
|
|
47
|
+
return override;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
namespace = target.interface?.namespace ?? target.namespace;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
while (namespace) {
|
|
55
|
+
const override = getApiVersionOverride(program, namespace);
|
|
56
|
+
if (override !== undefined) {
|
|
57
|
+
return override;
|
|
58
|
+
}
|
|
59
|
+
namespace = namespace.namespace;
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=override-api-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-api-version.js","sourceRoot":"","sources":["../../../src/decorators/override-api-version.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,gB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qB,CAAC,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;gBAClE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;oBAC3B,OAAO,QAAQ,CAAC;gBAClB,CAAC;YACH,CAAC;YACD,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC;YAC5D,MAAM;QACR,CAAC;IACH,CAAC;IAED,OAAO,SAAS,EAAE,CAAC;QACjB,MAAM,QAAQ,GAAG,qBAAqB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC3D,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC;IAClC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { $linter } from "./linter.js";
|
|
|
4
4
|
export * from "./decorators.js";
|
|
5
5
|
export { extractLroStates } from "./decorators/lro-status.js";
|
|
6
6
|
export { getOperationLinks, type OperationLink, type OperationLinkMetadata, } from "./decorators/operation-link.js";
|
|
7
|
+
export { getApiVersionOverride, getEffectiveApiVersionOverride, } from "./decorators/override-api-version.js";
|
|
7
8
|
export { isPreviewVersion } from "./decorators/preview-version.js";
|
|
8
9
|
export { getArmResourceIdentifierConfig, type ArmResourceIdentifierConfig, } from "./decorators/private/arm-resource-identifier-config.js";
|
|
9
10
|
export { getAsEmbeddingVector, type EmbeddingVectorMetadata, } from "./decorators/private/embedding-vector.js";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,eAAe,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,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AAK,2BAA2B,GACjC,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,KAAK,uBAAuB,GAC7B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,wDAAwD,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1E,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { $linter } from "./linter.js";
|
|
|
4
4
|
export * from "./decorators.js";
|
|
5
5
|
export { extractLroStates } from "./decorators/lro-status.js";
|
|
6
6
|
export { getOperationLinks, } from "./decorators/operation-link.js";
|
|
7
|
+
export { getApiVersionOverride, getEffectiveApiVersionOverride, } from "./decorators/override-api-version.js";
|
|
7
8
|
export { isPreviewVersion } from "./decorators/preview-version.js";
|
|
8
9
|
export { getArmResourceIdentifierConfig, } from "./decorators/private/arm-resource-identifier-config.js";
|
|
9
10
|
export { getAsEmbeddingVector, } from "./decorators/private/embedding-vector.js";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,iBAAiB,GAGlB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,g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ChD,cAAc,oCAAoC,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/src/lib.d.ts
CHANGED
|
@@ -126,12 +126,15 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
|
|
126
126
|
"unique-items-invalid-type": {
|
|
127
127
|
readonly default: "@uniqueItems can only be applied to arrays and array-valued model properties.";
|
|
128
128
|
};
|
|
129
|
+
"invalid-api-version-override": {
|
|
130
|
+
readonly default: "The API version override must be a non-empty string.";
|
|
131
|
+
};
|
|
129
132
|
"experimental-feature": {
|
|
130
133
|
readonly default: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
131
134
|
readonly dangerous: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
132
135
|
};
|
|
133
|
-
}, Record<string, any>, "trait" | "lroStatus" | "lroSucceeded" | "lroCanceled" | "lroFailed" | "lroResult" | "lroErrorResult" | "pollingOperationParameter" | "pollingLocationInfo" | "finalLocations" | "finalLocationResults" | "finalStateOverride" | "needsRoute" | "ensureVerb" | "embeddingVector" | "armResourceIdentifierConfig" | "operationLink" | "requestParameter" | "responseParameter" | "resourceOperation" | "traitSource" | "traitContext" | "traitLocation" | "uniqueItems" | "parameterizedNextLinkConfig" | "previewVersion">;
|
|
134
|
-
export declare const reportDiagnostic: <C extends "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "lro-status-monitor-invalid-result-property" | "lro-status-monitor-invalid-result-property-type" | "invalid-polling-operation-parameter" | "invalid-final-state" | "no-operation-at-original-uri" | "bad-record-type" | "request-parameter-invalid" | "response-property-invalid" | "operation-link-parameter-invalid" | "operation-link-parameter-invalid-target" | "invalid-resource-type" | "polling-operation-return-model" | "polling-operation-no-status-monitor" | "polling-operation-no-lro-success" | "polling-operation-no-lro-failure" | "polling-operation-no-ref-or-link" | "invalid-final-operation" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "client-request-id-trait-missing" | "repeatable-requests-trait-missing" | "conditional-requests-trait-missing" | "expected-trait-diagnostic-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-object" | "verb-conflict" | "rpc-operation-needs-route" | "union-enums-multiple-kind" | "union-enums-invalid-kind" | "union-enums-circular" | "preview-version-invalid-enum-member" | "preview-version-last-member" | "unique-items-invalid-type" | "experimental-feature", M extends keyof {
|
|
136
|
+
}, Record<string, any>, "trait" | "lroStatus" | "lroSucceeded" | "lroCanceled" | "lroFailed" | "lroResult" | "lroErrorResult" | "pollingOperationParameter" | "pollingLocationInfo" | "finalLocations" | "finalLocationResults" | "finalStateOverride" | "needsRoute" | "ensureVerb" | "embeddingVector" | "armResourceIdentifierConfig" | "operationLink" | "requestParameter" | "responseParameter" | "resourceOperation" | "traitSource" | "traitContext" | "traitLocation" | "uniqueItems" | "parameterizedNextLinkConfig" | "previewVersion" | "apiVersionOverride">;
|
|
137
|
+
export declare const reportDiagnostic: <C extends "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "lro-status-monitor-invalid-result-property" | "lro-status-monitor-invalid-result-property-type" | "invalid-polling-operation-parameter" | "invalid-final-state" | "no-operation-at-original-uri" | "bad-record-type" | "request-parameter-invalid" | "response-property-invalid" | "operation-link-parameter-invalid" | "operation-link-parameter-invalid-target" | "invalid-resource-type" | "polling-operation-return-model" | "polling-operation-no-status-monitor" | "polling-operation-no-lro-success" | "polling-operation-no-lro-failure" | "polling-operation-no-ref-or-link" | "invalid-final-operation" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "client-request-id-trait-missing" | "repeatable-requests-trait-missing" | "conditional-requests-trait-missing" | "expected-trait-diagnostic-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-object" | "verb-conflict" | "rpc-operation-needs-route" | "union-enums-multiple-kind" | "union-enums-invalid-kind" | "union-enums-circular" | "preview-version-invalid-enum-member" | "preview-version-last-member" | "unique-items-invalid-type" | "invalid-api-version-override" | "experimental-feature", M extends keyof {
|
|
135
138
|
"lro-status-union-non-string": {
|
|
136
139
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
137
140
|
};
|
|
@@ -259,6 +262,9 @@ export declare const reportDiagnostic: <C extends "lro-status-union-non-string"
|
|
|
259
262
|
"unique-items-invalid-type": {
|
|
260
263
|
readonly default: "@uniqueItems can only be applied to arrays and array-valued model properties.";
|
|
261
264
|
};
|
|
265
|
+
"invalid-api-version-override": {
|
|
266
|
+
readonly default: "The API version override must be a non-empty string.";
|
|
267
|
+
};
|
|
262
268
|
"experimental-feature": {
|
|
263
269
|
readonly default: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
264
270
|
readonly dangerous: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
@@ -391,11 +397,14 @@ export declare const reportDiagnostic: <C extends "lro-status-union-non-string"
|
|
|
391
397
|
"unique-items-invalid-type": {
|
|
392
398
|
readonly default: "@uniqueItems can only be applied to arrays and array-valued model properties.";
|
|
393
399
|
};
|
|
400
|
+
"invalid-api-version-override": {
|
|
401
|
+
readonly default: "The API version override must be a non-empty string.";
|
|
402
|
+
};
|
|
394
403
|
"experimental-feature": {
|
|
395
404
|
readonly default: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
396
405
|
readonly dangerous: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
397
406
|
};
|
|
398
|
-
}, C, M>) => void, createDiagnostic: <C extends "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "lro-status-monitor-invalid-result-property" | "lro-status-monitor-invalid-result-property-type" | "invalid-polling-operation-parameter" | "invalid-final-state" | "no-operation-at-original-uri" | "bad-record-type" | "request-parameter-invalid" | "response-property-invalid" | "operation-link-parameter-invalid" | "operation-link-parameter-invalid-target" | "invalid-resource-type" | "polling-operation-return-model" | "polling-operation-no-status-monitor" | "polling-operation-no-lro-success" | "polling-operation-no-lro-failure" | "polling-operation-no-ref-or-link" | "invalid-final-operation" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "client-request-id-trait-missing" | "repeatable-requests-trait-missing" | "conditional-requests-trait-missing" | "expected-trait-diagnostic-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-object" | "verb-conflict" | "rpc-operation-needs-route" | "union-enums-multiple-kind" | "union-enums-invalid-kind" | "union-enums-circular" | "preview-version-invalid-enum-member" | "preview-version-last-member" | "unique-items-invalid-type" | "experimental-feature", M extends keyof {
|
|
407
|
+
}, C, M>) => void, createDiagnostic: <C extends "lro-status-union-non-string" | "lro-status-property-invalid-type" | "lro-status-missing" | "lro-status-monitor-invalid-result-property" | "lro-status-monitor-invalid-result-property-type" | "invalid-polling-operation-parameter" | "invalid-final-state" | "no-operation-at-original-uri" | "bad-record-type" | "request-parameter-invalid" | "response-property-invalid" | "operation-link-parameter-invalid" | "operation-link-parameter-invalid-target" | "invalid-resource-type" | "polling-operation-return-model" | "polling-operation-no-status-monitor" | "polling-operation-no-lro-success" | "polling-operation-no-lro-failure" | "polling-operation-no-ref-or-link" | "invalid-final-operation" | "invalid-trait-property-count" | "invalid-trait-property-type" | "invalid-trait-context" | "trait-property-without-location" | "expected-trait-missing" | "client-request-id-trait-missing" | "repeatable-requests-trait-missing" | "conditional-requests-trait-missing" | "expected-trait-diagnostic-missing" | "invalid-parameter" | "expected-success-response" | "lro-polling-data-missing-from-operation-response" | "no-object" | "verb-conflict" | "rpc-operation-needs-route" | "union-enums-multiple-kind" | "union-enums-invalid-kind" | "union-enums-circular" | "preview-version-invalid-enum-member" | "preview-version-last-member" | "unique-items-invalid-type" | "invalid-api-version-override" | "experimental-feature", M extends keyof {
|
|
399
408
|
"lro-status-union-non-string": {
|
|
400
409
|
readonly default: import("@typespec/compiler").CallableMessage<["type"]>;
|
|
401
410
|
};
|
|
@@ -523,6 +532,9 @@ export declare const reportDiagnostic: <C extends "lro-status-union-non-string"
|
|
|
523
532
|
"unique-items-invalid-type": {
|
|
524
533
|
readonly default: "@uniqueItems can only be applied to arrays and array-valued model properties.";
|
|
525
534
|
};
|
|
535
|
+
"invalid-api-version-override": {
|
|
536
|
+
readonly default: "The API version override must be a non-empty string.";
|
|
537
|
+
};
|
|
526
538
|
"experimental-feature": {
|
|
527
539
|
readonly default: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
528
540
|
readonly dangerous: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
@@ -655,9 +667,12 @@ export declare const reportDiagnostic: <C extends "lro-status-union-non-string"
|
|
|
655
667
|
"unique-items-invalid-type": {
|
|
656
668
|
readonly default: "@uniqueItems can only be applied to arrays and array-valued model properties.";
|
|
657
669
|
};
|
|
670
|
+
"invalid-api-version-override": {
|
|
671
|
+
readonly default: "The API version override must be a non-empty string.";
|
|
672
|
+
};
|
|
658
673
|
"experimental-feature": {
|
|
659
674
|
readonly default: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
660
675
|
readonly dangerous: import("@typespec/compiler").CallableMessage<["feature"]>;
|
|
661
676
|
};
|
|
662
|
-
}, C, M>) => import("@typespec/compiler").Diagnostic, AzureCoreStateKeys: Record<"trait" | "lroStatus" | "lroSucceeded" | "lroCanceled" | "lroFailed" | "lroResult" | "lroErrorResult" | "pollingOperationParameter" | "pollingLocationInfo" | "finalLocations" | "finalLocationResults" | "finalStateOverride" | "needsRoute" | "ensureVerb" | "embeddingVector" | "armResourceIdentifierConfig" | "operationLink" | "requestParameter" | "responseParameter" | "resourceOperation" | "traitSource" | "traitContext" | "traitLocation" | "uniqueItems" | "parameterizedNextLinkConfig" | "previewVersion", symbol>;
|
|
677
|
+
}, C, M>) => import("@typespec/compiler").Diagnostic, AzureCoreStateKeys: Record<"trait" | "lroStatus" | "lroSucceeded" | "lroCanceled" | "lroFailed" | "lroResult" | "lroErrorResult" | "pollingOperationParameter" | "pollingLocationInfo" | "finalLocations" | "finalLocationResults" | "finalStateOverride" | "needsRoute" | "ensureVerb" | "embeddingVector" | "armResourceIdentifierConfig" | "operationLink" | "requestParameter" | "responseParameter" | "resourceOperation" | "traitSource" | "traitContext" | "traitLocation" | "uniqueItems" | "parameterizedNextLinkConfig" | "previewVersion" | "apiVersionOverride", symbol>;
|
|
663
678
|
//# sourceMappingURL=lib.d.ts.map
|
package/dist/src/lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yiBA6Tf,CAAC;AAEH,eAAO,MAAQ,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDAAa,kBAAkB,kiBAAS,CAAC"}
|
package/dist/src/lib.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createTypeSpecLibrary, paramMessage } from "@typespec/compiler";
|
|
1
|
+
import { createTypeSpecLibrary, fileRef, paramMessage } from "@typespec/compiler";
|
|
2
2
|
export const $lib = createTypeSpecLibrary({
|
|
3
3
|
name: "@azure-tools/typespec-azure-core",
|
|
4
4
|
diagnostics: {
|
|
@@ -252,6 +252,13 @@ export const $lib = createTypeSpecLibrary({
|
|
|
252
252
|
default: `@uniqueItems can only be applied to arrays and array-valued model properties.`,
|
|
253
253
|
},
|
|
254
254
|
},
|
|
255
|
+
"invalid-api-version-override": {
|
|
256
|
+
docs: fileRef.fromPackageRoot("src/diagnostics/invalid-api-version-override.md"),
|
|
257
|
+
severity: "error",
|
|
258
|
+
messages: {
|
|
259
|
+
default: "The API version override must be a non-empty string.",
|
|
260
|
+
},
|
|
261
|
+
},
|
|
255
262
|
"experimental-feature": {
|
|
256
263
|
severity: "warning",
|
|
257
264
|
messages: {
|
|
@@ -293,6 +300,9 @@ export const $lib = createTypeSpecLibrary({
|
|
|
293
300
|
previewVersion: {
|
|
294
301
|
description: "Data for `@previewVersion` decorator",
|
|
295
302
|
},
|
|
303
|
+
apiVersionOverride: {
|
|
304
|
+
description: "Data for `@overrideApiVersion` decorator",
|
|
305
|
+
},
|
|
296
306
|
},
|
|
297
307
|
// AzureCoreStateKeys.traitLocation
|
|
298
308
|
});
|
package/dist/src/lib.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"lib.js","sourceRoot":"","sources":["../../src/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElF,MAAM,CAAC,MAAM,IAAI,GAAG,qBAAqB,CAAC;IACxC,IAAI,EAAE,kCAAkC;IACxC,WAAW,EAAE;QACX,6BAA6B,EAAE;YAC7B,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,wCAAwC,MAAM,GAAG;aACvE;SACF;QACD,kCAAkC,EAAE;YAClC,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,sDAAsD;aAChE;SACF;QACD,oBAAoB,EAAE;YACpB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,uDAAuD,QAAQ,GAAG;aACxF;SACF;QACD,4CAA4C,EAAE;YAC5C,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,mCAAmC,YAAY,0BAA0B,WAAW,+EAA+E;aACzL;SACF;QACD,iDAAiD,EAAE;YACjD,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,aAAa,cAAc,+EAA+E,UAAU,6DAA6D;aACvM;SACF;QACD,qCAAqC,EAAE;YACrC,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE;gBACR,OAAO,EAAE,YAAY,CAAA,mCAAmC,MAAM,kEAAkE;aACjI;SACF;QACD,qBAAqB,EAAE;YACrB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE;gBACR,QAAQ,EAAE,YAAY,CAAA,g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.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tsp-index.d.ts","sourceRoot":"","sources":["../../src/tsp-index.ts"],"names":[],"mappings":"AA8CA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/src/tsp-index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { $lroResult } from "./decorators/lro-result.js";
|
|
|
9
9
|
import { $lroStatus } from "./decorators/lro-status.js";
|
|
10
10
|
import { $lroSucceeded } from "./decorators/lro-succeeded.js";
|
|
11
11
|
import { $operationLink } from "./decorators/operation-link.js";
|
|
12
|
+
import { $overrideApiVersion } from "./decorators/override-api-version.js";
|
|
12
13
|
import { $pollingLocation } from "./decorators/polling-location.js";
|
|
13
14
|
import { $pollingOperationParameter } from "./decorators/polling-operation-parameter.js";
|
|
14
15
|
import { $pollingOperation } from "./decorators/polling-operation.js";
|
|
@@ -62,6 +63,9 @@ export const $decorators = {
|
|
|
62
63
|
defaultFinalStateVia: $defaultFinalStateVia,
|
|
63
64
|
parameterizedNextLinkConfig: parameterizedNextLinkConfigDecorator,
|
|
64
65
|
},
|
|
66
|
+
"Azure.Core.Legacy": {
|
|
67
|
+
overrideApiVersion: $overrideApiVersion,
|
|
68
|
+
},
|
|
65
69
|
"Azure.Core.Traits": {
|
|
66
70
|
trait: $trait,
|
|
67
71
|
traitAdded: $traitAdded,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsp-index.js","sourceRoot":"","sources":["../../src/tsp-index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tsp-index.js","sourceRoot":"","sources":["../../src/tsp-index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM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AK,EAAE,MAAM;QACb,UAAU,EAAE,WAAW;QACvB,YAAY,EAAE,aAAa;QAC3B,aAAa,EAAE,cAAc;KACM;IAErC,2BAA2B,EAAE;QAC3B,kBAAkB,EAAE,mBAAmB;QACvC,oBAAoB,EAAE,qBAAqB;QAC3C,qBAAqB,EAAE,sBAAsB;QAC7C,kBAAkB,EAAE,mBAAmB;QACvC,WAAW,EAAE,YAAY;QACzB,mBAAmB,EAAE,oBAAoB;KACC;CAC7C,CAAC"}
|
package/lib/foundations.tsp
CHANGED
|
@@ -353,7 +353,7 @@ op GetOperationStatus<
|
|
|
353
353
|
op ResourceOperation<
|
|
354
354
|
Resource extends TypeSpec.Reflection.Model,
|
|
355
355
|
Parameters extends TypeSpec.Reflection.Model,
|
|
356
|
-
Response,
|
|
356
|
+
Response, // No constraint here on purpose, some responses are unions
|
|
357
357
|
Traits extends TypeSpec.Reflection.Model = {},
|
|
358
358
|
ErrorResponse = Azure.Core.Foundations.ErrorResponse
|
|
359
359
|
> is Operation<Foundations.ItemKeysOf<Resource> & Parameters, Response, Traits, ErrorResponse>;
|
package/lib/legacy.tsp
CHANGED
|
@@ -2,6 +2,29 @@ using TypeSpec.Reflection;
|
|
|
2
2
|
|
|
3
3
|
namespace Azure.Core.Legacy;
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Overrides the API-version wire value used for operations within a namespace or interface.
|
|
7
|
+
*
|
|
8
|
+
* The value is opaque and does not need to be declared by the service version enum. The override
|
|
9
|
+
* is inherited by enclosed namespaces, interfaces, and operations, with the nearest override taking
|
|
10
|
+
* precedence.
|
|
11
|
+
*
|
|
12
|
+
* This decorator is considered legacy functionality and should only be used to preserve
|
|
13
|
+
* compatibility with an existing SDK.
|
|
14
|
+
*
|
|
15
|
+
* @param target The namespace or interface whose operations use the API-version override.
|
|
16
|
+
* @param version The non-empty API-version wire value.
|
|
17
|
+
*
|
|
18
|
+
* @example Override an interface API version
|
|
19
|
+
* ```typespec
|
|
20
|
+
* @Azure.Core.Legacy.overrideApiVersion("2021-11-01")
|
|
21
|
+
* interface Widgets {
|
|
22
|
+
* get(): void;
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
extern dec overrideApiVersion(target: Namespace | Interface, version: valueof string);
|
|
27
|
+
|
|
5
28
|
/**
|
|
6
29
|
* A scalar type representing a next link that requires formatting with parameters to be used.
|
|
7
30
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-core",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Core library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"!dist/test/**"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@typespec/compiler": "^1.
|
|
51
|
-
"@typespec/
|
|
52
|
-
"@typespec/
|
|
50
|
+
"@typespec/compiler": "^1.16.0",
|
|
51
|
+
"@typespec/rest": "^0.86.0",
|
|
52
|
+
"@typespec/http": "^1.16.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^26.3.0",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"rimraf": "^6.1.3",
|
|
59
59
|
"typescript": "~6.0.2",
|
|
60
60
|
"vitest": "^4.1.11",
|
|
61
|
-
"@typespec/compiler": "^1.
|
|
62
|
-
"@typespec/http": "^1.
|
|
63
|
-
"@typespec/
|
|
64
|
-
"@typespec/rest": "^0.
|
|
65
|
-
"@typespec/
|
|
66
|
-
"@typespec/versioning": "^0.
|
|
67
|
-
"@typespec/tspd": "^0.77.
|
|
61
|
+
"@typespec/compiler": "^1.16.0",
|
|
62
|
+
"@typespec/http": "^1.16.0",
|
|
63
|
+
"@typespec/openapi": "^1.16.0",
|
|
64
|
+
"@typespec/rest": "^0.86.0",
|
|
65
|
+
"@typespec/library-linter": "^0.86.0",
|
|
66
|
+
"@typespec/versioning": "^0.86.0",
|
|
67
|
+
"@typespec/tspd": "^0.77.1"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"clean": "rimraf ./dist ./temp",
|