Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade tcgc and add ut case for error models in MPG if it is not referenced #2934

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
26 changes: 13 additions & 13 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@azure-tools/typespec-autorest": ">=0.48.0 <1.0.0",
"@typespec/openapi3": ">=0.62.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.48.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.48.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.48.3 <1.0.0",
"@azure-tools/typespec-azure-resource-manager": ">=0.48.0 <1.0.0",
"@azure-tools/typespec-azure-rulesets": ">=0.48.0 <1.0.0",
"@typespec/compiler": ">=0.62.0 <1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,26 +307,6 @@ export interface EncryptionKeyDetails {
keyVersion: string;
}

// @public
export interface ErrorAdditionalInfo {
readonly info?: Record<string, any>;
readonly type?: string;
}

// @public
export interface ErrorDetail {
readonly additionalInfo?: ErrorAdditionalInfo[];
readonly code?: string;
readonly details?: ErrorDetail[];
readonly message?: string;
readonly target?: string;
}

// @public
export interface ErrorResponse {
error?: ErrorDetail;
}

// @public
export interface IPRules {
action: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ export {
SystemData,
KnownCreatedByType,
CreatedByType,
ErrorResponse,
ErrorDetail,
ErrorAdditionalInfo,
DataProductUpdate,
DataProductUpdateProperties,
AccountSas,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ export {
SystemData,
KnownCreatedByType,
CreatedByType,
ErrorResponse,
ErrorDetail,
ErrorAdditionalInfo,
DataProductUpdate,
DataProductUpdateProperties,
AccountSas,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -647,92 +647,6 @@ export enum KnownCreatedByType {
*/
export type CreatedByType = string;

/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */
export interface ErrorResponse {
/** The error object. */
error?: ErrorDetail;
}

export function errorResponseDeserializer(item: any): ErrorResponse {
return {
error: !item["error"]
? item["error"]
: errorDetailDeserializer(item["error"]),
};
}

/** The error detail. */
export interface ErrorDetail {
/** The error code. */
readonly code?: string;
/** The error message. */
readonly message?: string;
/** The error target. */
readonly target?: string;
/** The error details. */
readonly details?: ErrorDetail[];
/** The error additional info. */
readonly additionalInfo?: ErrorAdditionalInfo[];
}

export function errorDetailDeserializer(item: any): ErrorDetail {
return {
code: item["code"],
message: item["message"],
target: item["target"],
details: !item["details"]
? item["details"]
: errorDetailArrayDeserializer(item["details"]),
additionalInfo: !item["additionalInfo"]
? item["additionalInfo"]
: errorAdditionalInfoArrayDeserializer(item["additionalInfo"]),
};
}

export function errorDetailArrayDeserializer(
result: Array<ErrorDetail>,
): any[] {
return result.map((item) => {
return errorDetailDeserializer(item);
});
}

export function errorAdditionalInfoArrayDeserializer(
result: Array<ErrorAdditionalInfo>,
): any[] {
return result.map((item) => {
return errorAdditionalInfoDeserializer(item);
});
}

/** The resource management error additional info. */
export interface ErrorAdditionalInfo {
/** The additional info type. */
readonly type?: string;
/** The additional info. */
readonly info?: Record<string, any>;
}

export function errorAdditionalInfoDeserializer(
item: any,
): ErrorAdditionalInfo {
return {
type: item["type"],
info: !item["info"]
? item["info"]
: _errorAdditionalInfoInfoDeserializer(item["info"]),
};
}

/** model interface _ErrorAdditionalInfoInfo */
export interface _ErrorAdditionalInfoInfo {}

export function _errorAdditionalInfoInfoDeserializer(
item: any,
): _ErrorAdditionalInfoInfo {
return item;
}

/** The type used for update operations of the DataProduct. */
export interface DataProductUpdate {
/** The managed service identities assigned to this resource. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,6 @@ export interface PageSettings {
continuationToken?: string;
}

// @public
export interface UnivariateAnomalyDetectorError {
code?: UnivariateAnomalyDetectorErrorCodes;
message?: string;
}

// @public
export type UnivariateAnomalyDetectorErrorCodes = "InvalidCustomInterval" | "BadArgument" | "InvalidGranularity" | "InvalidPeriod" | "InvalidModelArgument" | "InvalidSeries" | "InvalidJsonFormat" | "RequiredGranularity" | "RequiredSeries" | "InvalidImputeMode" | "InvalidImputeFixedValue";

// @public
export interface UnivariateDetectUnivariateChangePointOptionalParams extends OperationOptions {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export {
UnivariateTimeGranularity,
UnivariateImputeMode,
UnivariateUnivariateEntireDetectionResult,
UnivariateAnomalyDetectorError,
UnivariateAnomalyDetectorErrorCodes,
UnivariateUnivariateLastDetectionResult,
UnivariateUnivariateChangePointDetectionOptions,
UnivariateUnivariateChangePointDetectionResult,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export {
UnivariateTimeGranularity,
UnivariateImputeMode,
UnivariateUnivariateEntireDetectionResult,
UnivariateAnomalyDetectorError,
UnivariateAnomalyDetectorErrorCodes,
UnivariateUnivariateLastDetectionResult,
UnivariateUnivariateChangePointDetectionOptions,
UnivariateUnivariateChangePointDetectionResult,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,37 +893,6 @@ export function univariateUnivariateEntireDetectionResultDeserializer(
};
}

/** Error information returned by the API. */
export interface UnivariateAnomalyDetectorError {
/** The error code. */
code?: UnivariateAnomalyDetectorErrorCodes;
/** A message explaining the error reported by the service. */
message?: string;
}

export function univariateAnomalyDetectorErrorDeserializer(
item: any,
): UnivariateAnomalyDetectorError {
return {
code: item["code"],
message: item["message"],
};
}

/** Type of UnivariateAnomalyDetectorErrorCodes */
export type UnivariateAnomalyDetectorErrorCodes =
| "InvalidCustomInterval"
| "BadArgument"
| "InvalidGranularity"
| "InvalidPeriod"
| "InvalidModelArgument"
| "InvalidSeries"
| "InvalidJsonFormat"
| "RequiredGranularity"
| "RequiredSeries"
| "InvalidImputeMode"
| "InvalidImputeFixedValue";

/** The response of last anomaly detection. */
export interface UnivariateUnivariateLastDetectionResult {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,24 +411,6 @@ export interface EmbeddingsOperations {
create: (embedding: CreateEmbeddingRequest, options?: EmbeddingsCreateOptionalParams) => Promise<CreateEmbeddingResponse>;
}

// @public
export interface ErrorModel {
// (undocumented)
code: string | null;
// (undocumented)
message: string;
// (undocumented)
param: string | null;
// (undocumented)
type: string;
}

// @public
export interface ErrorResponse {
// (undocumented)
error: ErrorModel;
}

// @public
export interface FilesCreateOptionalParams extends OperationOptions {
// (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ export { OpenAIClient } from "./openAIClient.js";
export {
CreateModerationRequest,
CreateModerationResponse,
ErrorResponse,
ErrorModel,
CreateImageRequest,
ImagesResponse,
Image,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
export {
CreateModerationRequest,
CreateModerationResponse,
ErrorResponse,
ErrorModel,
CreateImageRequest,
ImagesResponse,
Image,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,34 +247,6 @@ export function _createModerationResponseResultCategoryScoresDeserializer(
};
}

/** model interface ErrorResponse */
export interface ErrorResponse {
error: ErrorModel;
}

export function errorResponseDeserializer(item: any): ErrorResponse {
return {
error: errorDeserializer(item["error"]),
};
}

/** model interface ErrorModel */
export interface ErrorModel {
type: string;
message: string;
param: string | null;
code: string | null;
}

export function errorDeserializer(item: any): ErrorModel {
return {
type: item["type"],
message: item["message"],
param: item["param"],
code: item["code"],
};
}

/** model interface CreateImageRequest */
export interface CreateImageRequest {
/** A text description of the desired image(s). The maximum length is 1000 characters. */
Expand Down
Loading
Loading