Skip to content

Commit

Permalink
[TypeSpec] Upgrade to 0.46.0 (Azure#24776)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeharder authored and harryli0108 committed Jul 28, 2023
1 parent 144d129 commit 618e30f
Show file tree
Hide file tree
Showing 43 changed files with 3,087 additions and 3,298 deletions.
213 changes: 99 additions & 114 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
"@azure-tools/cadl-azure-resource-manager": "0.26.0",
"@azure-tools/cadl-providerhub": "0.26.0",
"@azure-tools/typespec-apiview": "0.4.4",
"@azure-tools/typespec-autorest": "0.31.0",
"@azure-tools/typespec-azure-core": "0.31.0",
"@azure-tools/typespec-azure-resource-manager": "0.31.0",
"@azure-tools/typespec-client-generator-core": "0.31.0",
"@azure-tools/typespec-providerhub": "0.31.0",
"@typespec/compiler": "0.45.2",
"@typespec/http": "0.45.0",
"@typespec/openapi": "0.45.0",
"@typespec/rest": "0.45.0",
"@typespec/versioning": "0.45.0",
"@azure-tools/typespec-autorest": "0.32.0",
"@azure-tools/typespec-azure-core": "0.32.0",
"@azure-tools/typespec-azure-resource-manager": "0.32.0",
"@azure-tools/typespec-client-generator-core": "0.32.0",
"@azure-tools/typespec-providerhub": "0.32.0",
"@typespec/compiler": "0.46.0",
"@typespec/http": "0.46.0",
"@typespec/openapi": "0.46.0",
"@typespec/rest": "0.46.0",
"@typespec/versioning": "0.46.0",
"@azure/avocado": "^0.8.4",
"@types/prettier": "^2.7.2",
"azure-rest-api-specs-eng-tools": "file:eng/tools",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,5 +404,6 @@ model ResponseError {
@header("x-ms-error-code")
@doc("Error code.")
msErrorCode?: string;

...ErrorResponse;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace AnomalyDetector.Multivariate;
@post
@doc("Operation template for multivariate anomaly detection service action.")
op MultivariateServiceAction<TParams, TResponse>(
...TParams
...TParams,
): TResponse | ResponseError;

// Operations
Expand All @@ -35,7 +35,7 @@ op getMultivariateBatchDetectionResult(
@format("uuid")
@doc("ID of a batch detection result.")
@path
resultId: string
resultId: string,
): MultivariateDetectionResult | ResponseError;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Azure core RpcOperation does not support custom error response"
Expand Down Expand Up @@ -68,6 +68,7 @@ op trainMultivariateModel is MultivariateServiceAction<
@doc("Location and ID of the model.")
@header
location: string;

@body result: AnomalyDetectionModel;
}
>;
Expand All @@ -84,7 +85,7 @@ op trainMultivariateModel is MultivariateServiceAction<
@doc("List models of a resource.")
op listMultivariateModels(
...SkipQueryParameter,
...TopQueryParameter
...TopQueryParameter,
): ModelList | ResponseError;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern"
Expand All @@ -98,7 +99,7 @@ op listMultivariateModels(
op deleteMultivariateModel(
@doc("Model identifier.")
@path
modelId: string
modelId: string,
): {
@doc("Delete model successfully.")
@statusCode
Expand All @@ -119,7 +120,7 @@ and variables used in the model.
op getMultivariateModel(
@doc("Model identifier.")
@path
modelId: string
modelId: string,
): AnomalyDetectionModel | ResponseError;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Does not fit any standard operation pattern"
Expand All @@ -144,7 +145,7 @@ op detectMultivariateBatchAnomaly(

@doc("Request of multivariate anomaly detection.")
@body
options: MultivariateBatchDetectionOptions
options: MultivariateBatchDetectionOptions,
): {
@statusCode statusCode: 202;

Expand All @@ -155,6 +156,7 @@ op detectMultivariateBatchAnomaly(
@doc("Location of the detection result.")
@header("Operation-Location")
operationLocation: string;

@body result: MultivariateDetectionResult;
} | ResponseError;

Expand All @@ -177,5 +179,5 @@ op detectMultivariateLastAnomaly(

@doc("Request of the last detection.")
@body
options: MultivariateLastDetectionOptions
options: MultivariateLastDetectionOptions,
): MultivariateLastDetectionResult | ResponseError;
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace AnomalyDetector.Univariate;
@post
@doc("Operation template for univariate anomaly detection service action.")
op UnivariateServiceAction<TParams, TResponse>(
...TParams
...TParams,
): TResponse | AnomalyDetectorError;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Azure core RpcOperation does not support custom error response"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ system.
model TrialMatcherInferenceEvidence {
@doc("A piece of evidence from the eligibility criteria text of a clinical trial.")
eligibilityCriteriaEvidence?: string;

...InferenceEvidence;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ model OncoPhenotypePatientResult {
model OncoPhenotypeInference {
@doc("The type of the Onco Phenotype inference")
type: OncoPhenotypeInferenceType;

...Inference;

@doc("The evidence corresponding to the inference value.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom,
model TrialMatcherInference {
@doc("The type of the Trial Matcher inference.")
type: TrialMatcherInferenceType;

...Inference;

@doc("The evidence corresponding to the inference value.")
Expand Down Expand Up @@ -328,6 +329,7 @@ model ContactDetails {
model ClinicalTrialResearchFacility {
@doc("The facility's name.")
name: string;

...GeographicLocation;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ model ChatChoice {
index: int32;

#suppress "@azure-tools/typespec-azure-core/no-nullable" "The operation already returns nulls"
#suppress "@azure-tools/typespec-autorest/union-unsupported" "https://github.com/Azure/typespec-azure/issues/3180"
@doc("The reason that this chat completions choice completed its generated.")
@projectedName("json", "finish_reason")
finishReason: CompletionsFinishReason | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ model Choice {
logprobs: CompletionsLogProbabilityModel | null;

#suppress "@azure-tools/typespec-azure-core/no-nullable" "The operation already returns nulls"
#suppress "@azure-tools/typespec-autorest/union-unsupported" "https://github.com/Azure/typespec-azure/issues/3180"
@doc("Reason for finishing")
@projectedName("json", "finish_reason")
finishReason: CompletionsFinishReason | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ op getChatCompletions is ResourceAction<

// Note: pending resolution of cross-language code emission behavior for long-running operations, image generation
// reuses its final operation response model as its status polling model.

#suppress "@azure-tools/typespec-azure-core/rpc-operation-request-body" "MUST fix in next update"
#suppress "@azure-tools/typespec-azure-core/no-rpc-path-params" "Allowed because this is a non-standard status polling operation."
@doc("Returns the status of the images operation")
@added(ServiceApiVersions.v2023_06_01_Preview)
Expand Down
Loading

0 comments on commit 618e30f

Please sign in to comment.