Skip to content

Commit fd50ff3

Browse files
authored
Upgrade typespec compiler to v0.63 and cadl ranch spec to the latest (#2942)
* upgrade-cadl-ranch-spec * update unit case * update unit case * update ut * update ut * update * fix ci * update package version * fix ci * update package version * update compiler version
1 parent a94e7ee commit fd50ff3

17 files changed

Lines changed: 367 additions & 426 deletions

File tree

common/config/rush/pnpm-lock.yaml

Lines changed: 230 additions & 161 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/typespec-test/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
"type": "module",
55
"dependencies": {
66
"@azure-tools/typespec-ts": "workspace:^0.35.0",
7-
"@typespec/openapi": ">=0.62.0 <1.0.0",
8-
"@azure-tools/typespec-autorest": ">=0.48.0 <1.0.0",
9-
"@typespec/openapi3": ">=0.62.0 <1.0.0",
10-
"@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0",
11-
"@azure-tools/typespec-client-generator-core": ">=0.48.3 <1.0.0",
12-
"@azure-tools/typespec-azure-resource-manager": ">=0.48.0 <1.0.0",
13-
"@azure-tools/typespec-azure-rulesets": ">=0.48.0 <1.0.0",
14-
"@typespec/compiler": ">=0.62.0 <1.0.0",
15-
"@typespec/http": ">=0.62.0 <1.0.0",
16-
"@typespec/rest": ">=0.62.0 <1.0.0",
17-
"@typespec/versioning": ">=0.62.0 <1.0.0",
7+
"@typespec/openapi": ">=0.63.0 <1.0.0",
8+
"@azure-tools/typespec-autorest": ">=0.49.0 <1.0.0",
9+
"@typespec/openapi3": ">=0.63.0 <1.0.0",
10+
"@azure-tools/typespec-azure-core": ">=0.49.0 <1.0.0",
11+
"@azure-tools/typespec-client-generator-core": ">=0.49.0 <1.0.0",
12+
"@azure-tools/typespec-azure-resource-manager": ">=0.49.0 <1.0.0",
13+
"@azure-tools/typespec-azure-rulesets": ">=0.49.0 <1.0.0",
14+
"@typespec/compiler": ">=0.63.0 <1.0.0",
15+
"@typespec/http": ">=0.63.0 <1.0.0",
16+
"@typespec/rest": ">=0.63.0 <1.0.0",
17+
"@typespec/versioning": ">=0.63.0 <1.0.0",
1818
"prettier": "^3.1.0"
1919
},
2020
"devDependencies": {

packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/sdk/test/arm-test/review/arm-networkanalytics.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ export interface NetworkAnalyticsClientOptionalParams extends ClientOptions {
426426

427427
// @public
428428
export interface Operation {
429-
actionType?: ActionType;
430-
readonly display?: OperationDisplay;
429+
readonly actionType?: ActionType;
430+
display?: OperationDisplay;
431431
readonly isDataAction?: boolean;
432432
readonly name?: string;
433433
readonly origin?: Origin;

packages/typespec-test/test/NetworkAnalytics.Management/generated/typespec-ts/sdk/test/arm-test/src/models/models.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,11 +1292,11 @@ export interface Operation {
12921292
/** Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure Resource Manager/control-plane operations. */
12931293
readonly isDataAction?: boolean;
12941294
/** Localized display information for this particular operation. */
1295-
readonly display?: OperationDisplay;
1295+
display?: OperationDisplay;
12961296
/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" */
12971297
readonly origin?: Origin;
12981298
/** Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */
1299-
actionType?: ActionType;
1299+
readonly actionType?: ActionType;
13001300
}
13011301

13021302
export function operationDeserializer(item: any): Operation {

packages/typespec-test/test/anomalyDetector/spec/multivariate/models.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ model ModelList {
341341
maxCount: int32;
342342

343343
@doc("The link to fetch more models.")
344-
@Azure.Core.nextLink
344+
@TypeSpec.nextLink
345345
nextLink?: string;
346346
}
347347

packages/typespec-test/test/batch_modular/spec/models.tsp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ model ApplicationListResult {
586586

587587
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
588588
@doc("The URL to get the next set of results.")
589-
@Azure.Core.nextLink
589+
@TypeSpec.nextLink
590590
`odata.nextLink`?: string;
591591
}
592592

@@ -642,7 +642,7 @@ model PoolListUsageMetricsResult {
642642

643643
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
644644
@doc("The URL to get the next set of results.")
645-
@Azure.Core.nextLink
645+
@TypeSpec.nextLink
646646
`odata.nextLink`?: string;
647647
}
648648

@@ -673,7 +673,7 @@ model AccountListSupportedImagesResult {
673673

674674
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
675675
@doc("The URL to get the next set of results.")
676-
@Azure.Core.nextLink
676+
@TypeSpec.nextLink
677677
`odata.nextLink`?: string;
678678
}
679679

@@ -738,7 +738,7 @@ model PoolNodeCountsListResult {
738738

739739
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
740740
@doc("The URL to get the next set of results.")
741-
@Azure.Core.nextLink
741+
@TypeSpec.nextLink
742742
`odata.nextLink`?: string;
743743
}
744744

@@ -1001,7 +1001,7 @@ model CertificateListResult {
10011001

10021002
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
10031003
@doc("The URL to get the next set of results.")
1004-
@Azure.Core.nextLink
1004+
@TypeSpec.nextLink
10051005
`odata.nextLink`?: string;
10061006
}
10071007

@@ -1017,7 +1017,7 @@ model NodeFileListResult {
10171017

10181018
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
10191019
@doc("The URL to get the next set of results.")
1020-
@Azure.Core.nextLink
1020+
@TypeSpec.nextLink
10211021
`odata.nextLink`?: string;
10221022
}
10231023

@@ -2228,7 +2228,7 @@ model BatchJobScheduleListResult {
22282228

22292229
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
22302230
@doc("The URL to get the next set of results.")
2231-
@Azure.Core.nextLink
2231+
@TypeSpec.nextLink
22322232
`odata.nextLink`?: string;
22332233
}
22342234

@@ -2461,7 +2461,7 @@ model BatchJobListResult {
24612461

24622462
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
24632463
@doc("The URL to get the next set of results.")
2464-
@Azure.Core.nextLink
2464+
@TypeSpec.nextLink
24652465
`odata.nextLink`?: string;
24662466
}
24672467

@@ -2477,7 +2477,7 @@ model BatchJobListPreparationAndReleaseTaskStatusResult {
24772477

24782478
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
24792479
@doc("The URL to get the next set of results.")
2480-
@Azure.Core.nextLink
2480+
@TypeSpec.nextLink
24812481
`odata.nextLink`?: string;
24822482
}
24832483

@@ -2998,7 +2998,7 @@ model BatchPoolListResult {
29982998

29992999
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
30003000
@doc("The URL to get the next set of results.")
3001-
@Azure.Core.nextLink
3001+
@TypeSpec.nextLink
30023002
`odata.nextLink`?: string;
30033003
}
30043004

@@ -3422,7 +3422,7 @@ model BatchTaskListResult {
34223422

34233423
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
34243424
@doc("The URL to get the next set of results.")
3425-
@Azure.Core.nextLink
3425+
@TypeSpec.nextLink
34263426
`odata.nextLink`?: string;
34273427
}
34283428

@@ -3783,7 +3783,7 @@ model BatchNodeListResult {
37833783

37843784
#suppress "@azure-tools/typespec-azure-core/casing-style" "The names of Property types must use camelCase"
37853785
@doc("The URL to get the next set of results.")
3786-
@Azure.Core.nextLink
3786+
@TypeSpec.nextLink
37873787
`odata.nextLink`?: string;
37883788
}
37893789

@@ -3840,6 +3840,6 @@ model NodeVMExtensionList {
38403840
value?: NodeVMExtension[];
38413841

38423842
@doc("The URL to get the next set of results.")
3843-
@Azure.Core.nextLink
3843+
@TypeSpec.nextLink
38443844
`odata.nextLink`?: string;
38453845
}

packages/typespec-test/test/confidentialLedger/spec/main.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ model PagedLedgerEntries {
163163
state: LedgerQueryState;
164164

165165
@doc("Path from which to retrieve the next page of results.")
166-
@Azure.Core.nextLink
166+
@TypeSpec.nextLink
167167
nextLink?: ResourceLocation<LedgerEntry>;
168168
}
169169

packages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/review/health-insights-radiologyinsights.api.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
import { AbortSignalLike } from '@azure/abort-controller';
88
import { ClientOptions } from '@azure-rest/core-client';
9-
import { ErrorModel } from '@azure-rest/core-client';
109
import { KeyCredential } from '@azure/core-auth';
1110
import { OperationOptions } from '@azure-rest/core-client';
1211
import { OperationState } from '@azure/core-lro';
@@ -183,16 +182,6 @@ export interface GenericProcedureRecommendation extends ProcedureRecommendation
183182
kind: "genericProcedureRecommendation";
184183
}
185184

186-
// @public
187-
export interface HealthInsightsOperationStatusError {
188-
readonly createdDateTime?: Date;
189-
error?: ErrorModel;
190-
readonly expirationDateTime?: Date;
191-
readonly id: string;
192-
readonly lastUpdateDateTime?: Date;
193-
readonly status: JobStatus;
194-
}
195-
196185
// @public
197186
export interface Identifier extends Element {
198187
assigner?: Reference;
@@ -227,9 +216,6 @@ export interface InferRadiologyInsightsOptionalParams extends OperationOptions {
227216
updateIntervalInMs?: number;
228217
}
229218

230-
// @public
231-
export type JobStatus = "notStarted" | "running" | "succeeded" | "failed" | "canceled";
232-
233219
// @public
234220
export enum KnownApiVersion {
235221
// (undocumented)
@@ -457,17 +443,6 @@ export interface RadiologyInsightsPatientResult {
457443
patientId: string;
458444
}
459445

460-
// @public
461-
export interface RadiologyInsightsResult {
462-
readonly createdDateTime?: Date;
463-
error?: ErrorModel;
464-
readonly expirationDateTime?: Date;
465-
readonly id: string;
466-
readonly lastUpdateDateTime?: Date;
467-
result?: RadiologyInsightsInferenceResult;
468-
readonly status: JobStatus;
469-
}
470-
471446
// @public
472447
export interface RadiologyProcedureInference extends RadiologyInsightsInference {
473448
imagingProcedures: ImagingProcedure[];

packages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ export {
3838
RadiologyInsightsInferenceOptions,
3939
FollowupRecommendationOptions,
4040
FindingOptions,
41-
HealthInsightsOperationStatusError,
42-
JobStatus,
4341
RadiologyInsightsInferenceResult,
4442
RadiologyInsightsPatientResult,
4543
RadiologyInsightsInference,
@@ -73,7 +71,6 @@ export {
7371
DomainResource,
7472
DomainResourceUnion,
7573
Narrative,
76-
RadiologyInsightsResult,
7774
RepeatabilityResult,
7875
KnownApiVersion,
7976
} from "./models/index.js";

packages/typespec-test/test/healthInsights_radiologyinsights/generated/typespec-ts/src/models/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ export {
3636
RadiologyInsightsInferenceOptions,
3737
FollowupRecommendationOptions,
3838
FindingOptions,
39-
HealthInsightsOperationStatusError,
40-
JobStatus,
4139
RadiologyInsightsInferenceResult,
4240
RadiologyInsightsPatientResult,
4341
RadiologyInsightsInference,
@@ -71,7 +69,6 @@ export {
7169
DomainResource,
7270
DomainResourceUnion,
7371
Narrative,
74-
RadiologyInsightsResult,
7572
RepeatabilityResult,
7673
KnownApiVersion,
7774
} from "./models.js";

0 commit comments

Comments
 (0)