Skip to content

Commit

Permalink
upgrade-compiler-version-to-v0.57 (#2606)
Browse files Browse the repository at this point in the history
* upgrade-compiler-version-to-v0.57

* bug fix

* fix serialization

* fix enum document

* bug fix

* fix smoke test

* fix contentType property missing

* fix merge conflicts

* fix ci
  • Loading branch information
qiaozha authored Jun 26, 2024
1 parent 4f75184 commit f409a93
Show file tree
Hide file tree
Showing 73 changed files with 893 additions and 604 deletions.
381 changes: 210 additions & 171 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"type": "module",
"dependencies": {
"@azure-tools/typespec-ts": "workspace:^0.29.0",
"@typespec/openapi": ">=0.56.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.42.1 <1.0.0",
"@typespec/openapi3": ">=0.56.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.42.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.42 <1.0.0",
"@azure-tools/typespec-azure-resource-manager":"0.42.0",
"@typespec/compiler": ">=0.56.0 <1.0.0",
"@typespec/http": ">=0.56.0 <1.0.0",
"@typespec/rest": ">=0.56.0 <1.0.0",
"@typespec/versioning": ">=0.56.0 <1.0.0",
"@typespec/openapi": ">=0.57.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.43.0 <1.0.0",
"@typespec/openapi3": ">=0.57.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.43.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.43.0 <1.0.0",
"@azure-tools/typespec-azure-resource-manager":">=0.43.0 <1.0.0",
"@typespec/compiler": ">=0.57.0 <1.0.0",
"@typespec/http": ">=0.57.0 <1.0.0",
"@typespec/rest": ">=0.57.0 <1.0.0",
"@typespec/versioning": ">=0.57.0 <1.0.0",
"prettier": "^3.1.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,6 @@ export interface AccountSasToken {
// @public
export type ActionType = string;

// @public
export interface ArmOperationStatus {
readonly endTime?: Date;
readonly error?: ErrorDetail;
readonly name?: string;
readonly percentComplete?: number;
readonly startTime?: Date;
status: ResourceProvisioningState;
}

// @public
export interface ConsumptionEndpointsProperties {
readonly fileAccessResourceId?: string;
Expand Down Expand Up @@ -442,7 +432,7 @@ export enum KnownDefaultAction {
// @public (undocumented)
export enum KnownManagedServiceIdentityType {
// (undocumented)
"SystemAssigned, UserAssigned" = "SystemAssigned, UserAssigned",
"SystemAssigned,UserAssigned" = "SystemAssigned,UserAssigned",
// (undocumented)
None = "None",
// (undocumented)
Expand Down Expand Up @@ -479,16 +469,6 @@ export enum KnownProvisioningState {
Updating = "Updating"
}

// @public (undocumented)
export enum KnownResourceProvisioningState {
// (undocumented)
Canceled = "Canceled",
// (undocumented)
Failed = "Failed",
// (undocumented)
Succeeded = "Succeeded"
}

// @public
export interface ListRoleAssignments {
count: number;
Expand All @@ -506,7 +486,7 @@ export interface ManagedServiceIdentity {
readonly principalId?: string;
readonly tenantId?: string;
type: ManagedServiceIdentityType;
userAssignedIdentities?: UserAssignedIdentities;
userAssignedIdentities?: Record<string, UserAssignedIdentity>;
}

// @public
Expand Down Expand Up @@ -544,6 +524,12 @@ export interface OperationDisplay {
resource?: string;
}

// @public
export interface OperationListResult {
nextLink?: string;
value: Operation[];
}

// @public (undocumented)
export interface OperationsListOptionalParams extends OperationOptions {
}
Expand All @@ -564,12 +550,6 @@ export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageS
next(): Promise<IteratorResult<TElement>>;
}

// @public
export interface PagedOperation {
nextLink?: string;
value: Operation[];
}

// @public
export interface PageSettings {
continuationToken?: string;
Expand All @@ -596,9 +576,6 @@ export interface Resource {
readonly type?: string;
}

// @public
export type ResourceProvisioningState = string;

// @public
export function restorePoller<TResponse extends PathUncheckedResponse, TResult>(client: NetworkAnalyticsClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>, options?: RestorePollerOptions<TResult>): PollerLike<OperationState<TResult>, TResult>;

Expand Down Expand Up @@ -632,12 +609,12 @@ export interface RoleAssignmentDetail {

// @public
export interface SystemData {
readonly createdAt?: Date;
readonly createdBy?: string;
readonly createdByType?: CreatedByType;
readonly lastModifiedAt?: Date;
readonly lastModifiedBy?: string;
readonly lastModifiedByType?: CreatedByType;
createdAt?: Date;
createdBy?: string;
createdByType?: CreatedByType;
lastModifiedAt?: Date;
lastModifiedBy?: string;
lastModifiedByType?: CreatedByType;
}

// @public
Expand All @@ -646,14 +623,10 @@ export interface TrackedResource extends Resource {
tags?: Record<string, string>;
}

// @public
export interface UserAssignedIdentities extends Record<string, UserAssignedIdentity> {
}

// @public
export interface UserAssignedIdentity {
clientId?: string;
principalId?: string;
readonly clientId?: string;
readonly principalId?: string;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export function _createSend(
.put({
...operationOptionsToRequestParameters(options),
body: {
location: resource["location"],
tags: resource["tags"],
location: resource["location"],
properties: !resource.properties
? undefined
: {
Expand Down Expand Up @@ -177,8 +177,8 @@ export async function _createDeserialize(

result = result as DataProductsCreateLogicalResponse;
return {
location: result.body["location"],
tags: result.body["tags"],
location: result.body["location"],
id: result.body["id"],
name: result.body["name"],
type: result.body["type"],
Expand Down Expand Up @@ -292,8 +292,8 @@ export async function _createDeserialize(
identity: !result.body.identity
? undefined
: {
tenantId: result.body.identity?.["tenantId"],
principalId: result.body.identity?.["principalId"],
tenantId: result.body.identity?.["tenantId"],
type: result.body.identity?.["type"],
userAssignedIdentities:
result.body.identity?.["userAssignedIdentities"],
Expand Down Expand Up @@ -352,8 +352,8 @@ export async function _getDeserialize(
}

return {
location: result.body["location"],
tags: result.body["tags"],
location: result.body["location"],
id: result.body["id"],
name: result.body["name"],
type: result.body["type"],
Expand Down Expand Up @@ -467,8 +467,8 @@ export async function _getDeserialize(
identity: !result.body.identity
? undefined
: {
tenantId: result.body.identity?.["tenantId"],
principalId: result.body.identity?.["principalId"],
tenantId: result.body.identity?.["tenantId"],
type: result.body.identity?.["type"],
userAssignedIdentities:
result.body.identity?.["userAssignedIdentities"],
Expand Down Expand Up @@ -553,8 +553,8 @@ export async function _updateDeserialize(

result = result as DataProductsUpdateLogicalResponse;
return {
location: result.body["location"],
tags: result.body["tags"],
location: result.body["location"],
id: result.body["id"],
name: result.body["name"],
type: result.body["type"],
Expand Down Expand Up @@ -668,8 +668,8 @@ export async function _updateDeserialize(
identity: !result.body.identity
? undefined
: {
tenantId: result.body.identity?.["tenantId"],
principalId: result.body.identity?.["principalId"],
tenantId: result.body.identity?.["tenantId"],
type: result.body.identity?.["type"],
userAssignedIdentities:
result.body.identity?.["userAssignedIdentities"],
Expand Down Expand Up @@ -1119,8 +1119,8 @@ export async function _listByResourceGroupDeserialize(

return {
value: result.body["value"].map((p) => ({
location: p["location"],
tags: p["tags"],
location: p["location"],
id: p["id"],
name: p["name"],
type: p["type"],
Expand Down Expand Up @@ -1220,8 +1220,8 @@ export async function _listByResourceGroupDeserialize(
identity: !p.identity
? undefined
: {
tenantId: p.identity?.["tenantId"],
principalId: p.identity?.["principalId"],
tenantId: p.identity?.["tenantId"],
type: p.identity?.["type"],
userAssignedIdentities: p.identity?.["userAssignedIdentities"],
},
Expand Down Expand Up @@ -1282,8 +1282,8 @@ export async function _listBySubscriptionDeserialize(

return {
value: result.body["value"].map((p) => ({
location: p["location"],
tags: p["tags"],
location: p["location"],
id: p["id"],
name: p["name"],
type: p["type"],
Expand Down Expand Up @@ -1383,8 +1383,8 @@ export async function _listBySubscriptionDeserialize(
identity: !p.identity
? undefined
: {
tenantId: p.identity?.["tenantId"],
principalId: p.identity?.["principalId"],
tenantId: p.identity?.["tenantId"],
type: p.identity?.["type"],
userAssignedIdentities: p.identity?.["userAssignedIdentities"],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { PagedOperation, Operation } from "../../models/models.js";
import { OperationListResult, Operation } from "../../models/models.js";
import { PagedAsyncIterableIterator } from "../../models/pagingTypes.js";
import { buildPagedAsyncIterator } from "../pagingHelpers.js";
import {
Expand All @@ -28,7 +28,7 @@ export function _listSend(

export async function _listDeserialize(
result: OperationsList200Response | OperationsListDefaultResponse,
): Promise<PagedOperation> {
): Promise<OperationListResult> {
if (isUnexpected(result)) {
throw createRestError(result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@ export {
ManagedServiceIdentityType,
KnownManagedServiceIdentityType,
UserAssignedIdentity,
UserAssignedIdentities,
ErrorResponse,
ErrorDetail,
ErrorAdditionalInfo,
DataProductUpdate,
DataProductUpdateProperties,
ArmOperationStatus,
ResourceProvisioningState,
KnownResourceProvisioningState,
AccountSas,
AccountSasToken,
KeyVaultInfo,
Expand All @@ -64,7 +60,7 @@ export {
DataProductInformation,
DataProductVersion,
DataProductsCatalogListResult,
PagedOperation,
OperationListResult,
Operation,
OperationDisplay,
Origin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ export {
ManagedServiceIdentityType,
KnownManagedServiceIdentityType,
UserAssignedIdentity,
UserAssignedIdentities,
ErrorResponse,
ErrorDetail,
ErrorAdditionalInfo,
DataProductUpdate,
DataProductUpdateProperties,
ArmOperationStatus,
ResourceProvisioningState,
KnownResourceProvisioningState,
AccountSas,
AccountSasToken,
KeyVaultInfo,
Expand All @@ -59,7 +55,7 @@ export {
DataProductInformation,
DataProductVersion,
DataProductsCatalogListResult,
PagedOperation,
OperationListResult,
Operation,
OperationDisplay,
Origin,
Expand Down
Loading

0 comments on commit f409a93

Please sign in to comment.