Skip to content

Commit

Permalink
Upgrade typespec dep version to v0.56 in May (#2503)
Browse files Browse the repository at this point in the history
* upgrade typespec dep version

* fix issues in serialize utils

* merge to the main

* Update the lock file

* Fix the rlc to mitigate typepsec breakings

* Fix the modular issue for ut

* Revert serialize changes

* Update the UTs for modular

* Fail to generate smoke testing

* Fix the stateMap issue

* Update the smoke testing

* update the smoke testing

* Regen todo spec and mavd spec

* Regen to fix issues

* Regen batch

* Regen batch and todo non branded tsp

* Update the tsp

* Update the case

* Update the tsp

* update the lock file

* Update the lock file

* Regen rlc test

* Update .vscode/launch.json

* Update .vscode/launch.json

* Update the version to resolve issues

* Change to openapi3 emitter

---------

Co-authored-by: qiaozha <qiaozha@microsoft.com>
Co-authored-by: Mary Gao <yanmeigao1210@gmail.com>
  • Loading branch information
3 people authored May 17, 2024
1 parent bf90528 commit f9f5ce1
Show file tree
Hide file tree
Showing 44 changed files with 1,206 additions and 660 deletions.
266 changes: 104 additions & 162 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"type": "module",
"dependencies": {
"@azure-tools/typespec-ts": "workspace:^0.28.0",
"@typespec/openapi": ">=0.55.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.41.0 <1.0.0",
"@typespec/openapi3": ">=0.55.0 <1.0.0",
"@azure-tools/typespec-azure-core": ">=0.41.0 <1.0.0",
"@azure-tools/typespec-client-generator-core": ">=0.41.5 <1.0.0",
"@typespec/compiler": ">=0.55.0 <1.0.0",
"@typespec/http": ">=0.55.0 <1.0.0",
"@typespec/rest": ">=0.55.0 <1.0.0",
"@typespec/versioning": ">=0.55.0 <1.0.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",
"@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",
"prettier": "^3.1.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Multivariate.ResponseError"
"$ref": "#/definitions/Multivariate.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
Expand Down Expand Up @@ -137,7 +137,7 @@
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Multivariate.ResponseError"
"$ref": "#/definitions/Multivariate.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
Expand Down Expand Up @@ -182,7 +182,7 @@
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Multivariate.ResponseError"
"$ref": "#/definitions/Multivariate.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
Expand Down Expand Up @@ -218,7 +218,7 @@
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Multivariate.ResponseError"
"$ref": "#/definitions/Multivariate.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
Expand Down Expand Up @@ -249,7 +249,7 @@
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Multivariate.ResponseError"
"$ref": "#/definitions/Multivariate.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
Expand Down Expand Up @@ -304,7 +304,7 @@
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Multivariate.ResponseError"
"$ref": "#/definitions/Multivariate.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
Expand Down Expand Up @@ -349,7 +349,7 @@
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/Multivariate.ResponseError"
"$ref": "#/definitions/Multivariate.ErrorResponse"
},
"headers": {
"x-ms-error-code": {
Expand Down Expand Up @@ -1535,22 +1535,6 @@
"isNegativeAnomaly",
"isPositiveAnomaly"
]
},
"Versions": {
"type": "string",
"enum": [
"v1.1"
],
"x-ms-enum": {
"name": "Versions",
"modelAsString": true,
"values": [
{
"name": "v1_1",
"value": "v1.1"
}
]
}
}
},
"parameters": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,6 @@ export interface MultivariateOperations {
trainMultivariateModel: (modelInfo: MultivariateModelInfo, options?: MultivariateTrainMultivariateModelOptionalParams) => Promise<MultivariateAnomalyDetectionModel>;
}

// @public
export interface MultivariateResponseError {
code: string;
message: string;
}

// @public (undocumented)
export interface MultivariateTrainMultivariateModelOptionalParams extends OperationOptions {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export {
MultivariateAnomalyValue,
MultivariateAnomalyInterpretation,
MultivariateCorrelationChanges,
MultivariateResponseError,
MultivariateModelInfo,
DataSchema,
MultivariateAlignPolicy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export {
MultivariateAnomalyValue,
MultivariateAnomalyInterpretation,
MultivariateCorrelationChanges,
MultivariateResponseError,
MultivariateModelInfo,
DataSchema,
MultivariateAlignPolicy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,6 @@ export interface MultivariateCorrelationChanges {
changedVariables?: string[];
}

/** Error response */
export interface MultivariateResponseError {
/** The error code. */
code: string;
/** The message explaining the error reported by the service. */
message: string;
}

/**
* Training result of a model including its status, errors and diagnostics
* information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,6 @@ export interface MultivariateCorrelationChangesOutput {
changedVariables?: string[];
}

/** Error response */
export interface MultivariateResponseErrorOutput {
/** The error code. */
code: string;
/** The message explaining the error reported by the service. */
message: string;
}

/**
* Training result of a model including its status, errors and diagnostics
* information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
UnivariateUnivariateLastDetectionResultOutput,
UnivariateUnivariateChangePointDetectionResultOutput,
MultivariateMultivariateDetectionResultOutput,
MultivariateResponseErrorOutput,
MultivariateErrorResponseOutput,
MultivariateAnomalyDetectionModelOutput,
MultivariateModelListOutput,
MultivariateMultivariateLastDetectionResultOutput,
Expand Down Expand Up @@ -83,7 +83,7 @@ export interface GetMultivariateBatchDetectionResultDefaultHeaders {
export interface GetMultivariateBatchDetectionResultDefaultResponse
extends HttpResponse {
status: string;
body: MultivariateResponseErrorOutput;
body: MultivariateErrorResponseOutput;
headers: RawHttpHeaders & GetMultivariateBatchDetectionResultDefaultHeaders;
}

Expand All @@ -106,7 +106,7 @@ export interface TrainMultivariateModelDefaultHeaders {

export interface TrainMultivariateModelDefaultResponse extends HttpResponse {
status: string;
body: MultivariateResponseErrorOutput;
body: MultivariateErrorResponseOutput;
headers: RawHttpHeaders & TrainMultivariateModelDefaultHeaders;
}

Expand All @@ -123,7 +123,7 @@ export interface ListMultivariateModelsDefaultHeaders {

export interface ListMultivariateModelsDefaultResponse extends HttpResponse {
status: string;
body: MultivariateResponseErrorOutput;
body: MultivariateErrorResponseOutput;
headers: RawHttpHeaders & ListMultivariateModelsDefaultHeaders;
}

Expand All @@ -139,7 +139,7 @@ export interface DeleteMultivariateModelDefaultHeaders {

export interface DeleteMultivariateModelDefaultResponse extends HttpResponse {
status: string;
body: MultivariateResponseErrorOutput;
body: MultivariateErrorResponseOutput;
headers: RawHttpHeaders & DeleteMultivariateModelDefaultHeaders;
}

Expand All @@ -156,7 +156,7 @@ export interface GetMultivariateModelDefaultHeaders {

export interface GetMultivariateModelDefaultResponse extends HttpResponse {
status: string;
body: MultivariateResponseErrorOutput;
body: MultivariateErrorResponseOutput;
headers: RawHttpHeaders & GetMultivariateModelDefaultHeaders;
}

Expand All @@ -183,7 +183,7 @@ export interface DetectMultivariateBatchAnomalyDefaultHeaders {
export interface DetectMultivariateBatchAnomalyDefaultResponse
extends HttpResponse {
status: string;
body: MultivariateResponseErrorOutput;
body: MultivariateErrorResponseOutput;
headers: RawHttpHeaders & DetectMultivariateBatchAnomalyDefaultHeaders;
}

Expand All @@ -201,6 +201,6 @@ export interface DetectMultivariateLastAnomalyDefaultHeaders {
export interface DetectMultivariateLastAnomalyDefaultResponse
extends HttpResponse {
status: string;
body: MultivariateResponseErrorOutput;
body: MultivariateErrorResponseOutput;
headers: RawHttpHeaders & DetectMultivariateLastAnomalyDefaultHeaders;
}
Original file line number Diff line number Diff line change
Expand Up @@ -1479,23 +1479,6 @@
"required": [
"modelLabel"
]
},
"Versions": {
"type": "string",
"enum": [
"2022-05-15-preview"
],
"x-ms-enum": {
"name": "Versions",
"modelAsString": true,
"values": [
{
"name": "2022-05-15-preview",
"value": "2022-05-15-preview",
"description": "Version 2022-08-31"
}
]
}
}
},
"parameters": {
Expand Down
6 changes: 5 additions & 1 deletion packages/typespec-test/test/batch_modular/spec/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ active if you decide that you want to continue using the Certificate.
})
$select?: string[];
},
BatchResponseHeaders & BatchCertificate,
{ @bodyRoot _: BatchResponseHeaders & BatchCertificate},
{},
BatchError
>;
Expand Down Expand Up @@ -1621,6 +1621,8 @@ primary task; subtasks are then terminated asynchronously in the background.
@header("DataServiceId")
@doc("The OData ID of the resource to which the request applied.")
DataServiceId: string;

@statusCode _: 204;
},
{},
BatchError
Expand Down Expand Up @@ -1656,6 +1658,8 @@ will fail if the Job has completed (or is terminating or deleting).
@header("DataServiceId")
@doc("The OData ID of the resource to which the request applied.")
DataServiceId: string;

@statusCode _: 204;
},
{},
BatchError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -826,23 +826,6 @@
"state",
"transactionId"
]
},
"Versions": {
"type": "string",
"enum": [
"2022-05-13"
],
"x-ms-enum": {
"name": "Versions",
"modelAsString": true,
"values": [
{
"name": "2022-05-13",
"value": "2022-05-13",
"description": "Version 2022-08-31"
}
]
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,22 +453,6 @@
"value"
]
},
"Versions": {
"type": "string",
"enum": [
"2022-11-01-preview"
],
"x-ms-enum": {
"name": "Versions",
"modelAsString": true,
"values": [
{
"name": "v2022_11_01_Preview",
"value": "2022-11-01-preview"
}
]
}
},
"Widget": {
"type": "object",
"description": "A widget.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export class EventGridClient {
constructor(endpointParam: string, credential: KeyCredential, options?: EventGridClientOptions);
acknowledgeCloudEvents(topicName: string, eventSubscriptionName: string, lockTokens: AcknowledgeOptions, options?: AcknowledgeCloudEventsOptionalParams): Promise<AcknowledgeResult>;
readonly pipeline: Pipeline;
publishCloudEvent(topicName: string, event: CloudEvent, options?: PublishCloudEventOptionalParams): Promise<Record<string, any>>;
publishCloudEvents(topicName: string, events: CloudEvent[], options?: PublishCloudEventsOptionalParams): Promise<Record<string, any>>;
publishCloudEvent(topicName: string, event: CloudEvent, options?: PublishCloudEventOptionalParams): Promise<PublishResult>;
publishCloudEvents(topicName: string, events: CloudEvent[], options?: PublishCloudEventsOptionalParams): Promise<PublishResult>;
receiveCloudEvents(topicName: string, eventSubscriptionName: string, options?: ReceiveCloudEventsOptionalParams): Promise<ReceiveResult>;
rejectCloudEvents(topicName: string, eventSubscriptionName: string, lockTokens: RejectOptions, options?: RejectCloudEventsOptionalParams): Promise<RejectResult>;
releaseCloudEvents(topicName: string, eventSubscriptionName: string, lockTokens: ReleaseOptions, options?: ReleaseCloudEventsOptionalParams): Promise<ReleaseResult>;
Expand Down Expand Up @@ -79,6 +79,10 @@ export interface PublishCloudEventsOptionalParams extends OperationOptions {
contentType?: string;
}

// @public
export interface PublishResult {
}

// @public (undocumented)
export interface ReceiveCloudEventsOptionalParams extends OperationOptions {
maxEvents?: number;
Expand Down
Loading

0 comments on commit f9f5ce1

Please sign in to comment.