Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Closed
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
2,716 changes: 1,799 additions & 917 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 11 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
{
"name": "azure-rest-api-specs-tests",
"private": true,
"author": {
"name": "Microsoft Corporation",
"email": "azsdkteam@microsoft.com",
"url": "https://github.com/azure/azure-rest-api-specs"
},
"version": "0.1.0",
"description": "Tests for Azure REST API Specifications",
"license": "MIT",
"dependencies": {
"@azure-tools/cadl-autorest": "0.25.0",
"@azure-tools/cadl-azure-core": "0.25.0",
"@azure-tools/cadl-azure-resource-manager": "0.25.0",
"@azure-tools/cadl-providerhub": "0.25.0",
"@azure-tools/cadl-apiview": "0.3.5",
"@cadl-lang/compiler": "0.39.0"
"@cadl-lang/compiler": "0.39.0",
"@azure-tools/typespec-autorest": "0.28.0",
"@azure-tools/typespec-azure-core": "0.28.0",
"@azure-tools/typespec-azure-resource-manager": "0.28.0",
"@azure-tools/typespec-providerhub": "0.28.0",
"@azure-tools/typespec-apiview": "0.4.2",
"@typespec/compiler": "0.42.0"
},
"devDependencies": {
"@azure/avocado": "^0.8.4",
Expand All @@ -24,19 +20,9 @@
"ts-node": "^10.1.0",
"typescript": "^3.5.3"
},
"homepage": "https://github.com/azure/azure-rest-api-specs",
"repository": {
"type": "git",
"url": "git@github.com:azure/azure-rest-api-specs.git"
},
"bugs": {
"url": "https://github.com/azure/azure-rest-api-specs/issues"
},
"scripts": {
"postinstall": "tsc",
"prettier-check": "ts-node ./scripts/prettier-check.ts",
"prettier-fix": "prettier --write specification/**/*.json",
"prettier": "prettier",
"tsc": "tsc"
}
}
"prettier-fix": "prettier --write specification/**/*.json"
},
"private": true
}
2 changes: 1 addition & 1 deletion specification/cognitiveservices/AnomalyDetector/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using TypeSpec.Versioning;
@useAuth(ApiKeyAuth<ApiKeyLocation.header, "Ocp-Apim-Subscription-Key">)
@server(
"{Endpoint}/anomalydetector/{ApiVersion}",
"The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.",
"Test.The Anomaly Detector API detects anomalies automatically in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a time range without preparing time series in client side. Besides the above three functionalities, stateful model also provide group based detection and labeling service. By leveraging labeling service user can provide labels for each detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using anomaly detector service, business customers can discover incidents and establish a logic flow for root cause analysis.",
{
@doc("""
Supported Cognitive Services endpoints (protocol and hostname, for example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ enum FillNAMethod {
"Linear",
"Zero",
"Fixed",
"Random",
}

@fixed
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import "@cadl-lang/rest";
import "@cadl-lang/versioning";
import "@azure-tools/cadl-azure-core";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "../Contoso.WidgetManager.Shared";

using Cadl.Http;
using Cadl.Rest;
using Cadl.Versioning;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;

@service({
title: "Contoso Widget Manager",
})
@versioned(Contoso.WidgetManager.Versions)
@versionedDependency([[Contoso.WidgetManager.Versions.v2022_11_01_Preview, Azure.Core.Versions.v1_0_Preview_1]])

namespace Azure.Contoso.WidgetManager;

enum Versions {
@useDependency(Azure.Core.Versions.v1_0_Preview_1)
v2022_11_01_Preview: "2022-11-01-preview",
}

Expand Down Expand Up @@ -56,4 +57,4 @@ interface Widgets {
parameters: StandardListQueryParameters;
}
>;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
parameters:
"python-sdk-folder":
default: "{cwd}/azure-sdk-for-python/"
"java-sdk-folder":
default: "{cwd}/azure-sdk-for-java/"
"js-sdk-folder":
default: "{cwd}/azure-sdk-for-js/"
"csharp-sdk-folder":
default: "{cwd}/azure-sdk-for-csharp/"
"service-directory-name":
default: "contosowidgetmanager"
emit:
- "@azure-tools/typespec-autorest"
options:
"@azure-tools/typespec-autorest":
output-file: widgets.json
azure-resource-provider-folder: ../../../../data-plane
examples-directory: ./examples
"@azure-tools/typespec-python":
package-name: "azure-contosowidgetmanager"
emitter-output-dir: "{python-sdk-folder}/sdk/{service-directory-name}/{package-name}"
package-mode: "dataplane"
"@azure-tools/typespec-csharp":
namespace: Azure.Template.Contoso
clear-output-folder: true
model-namespace: false
emitter-output-dir: "{csharp-sdk-folder}/sdk/{service-directory-name}/{namespace}/src"
"@azure-tools/typespec-typescript":
emitter-output-dir: "{js-sdk-folder}/sdk/{service-directory-name}/contosowidgetmanager-rest"
generateMetadata: true
generateTest: true
azureSdkForJs: true
packageDetails:
name: "@azure-rest/contosowidgetmanager-rest"
description: "Contoso WidgetManager Service"
"@azure-tools/typespec-java":
emitter-output-dir: "{java-sdk-folder}/sdk/{service-directory-name}/azure-contoso-widgetmanager"
namespace: com.azure.contoso.widgetmanager
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"info": {
"title": "Contoso Widget Manager",
"version": "2022-11-01-preview",
"x-cadl-generated": [
"x-typespec-generated": [
{
"emitter": "@azure-tools/cadl-autorest"
"emitter": "@azure-tools/typespec-autorest"
}
]
},
Expand Down Expand Up @@ -41,25 +41,31 @@
"$ref": "#/definitions/Widget"
},
"x-ms-identifiers": [],
"x-cadl-name": "Widget[]",
"x-typespec-name": "Widget[]",
"description": "The Widget items on this page"
},
"nextLink": {
"type": "string",
"format": "uri",
"description": "The link to the next page of items",
"x-cadl-name": "Rest.ResourceLocation"
"x-typespec-name": "Rest.ResourceLocation"
}
},
"description": "Paged collection of Widget items",
"required": [
"value"
],
"x-cadl-name": "Azure.Core.Foundations.CustomPage<Widget, Azure.Core.(anonymous model)>"
"x-typespec-name": "Azure.Core.Foundations.CustomPage<Widget, Azure.Core.(anonymous model)>"
}
},
"default": {
"description": "An unexpected error response.",
"headers": {
"x-ms-error-code": {
"description": "String error code indicating what went wrong.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
}
Expand Down Expand Up @@ -100,6 +106,12 @@
},
"default": {
"description": "An unexpected error response.",
"headers": {
"x-ms-error-code": {
"description": "String error code indicating what went wrong.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
}
Expand Down Expand Up @@ -164,6 +176,12 @@
},
"default": {
"description": "An unexpected error response.",
"headers": {
"x-ms-error-code": {
"description": "String error code indicating what went wrong.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
}
Expand Down Expand Up @@ -224,11 +242,17 @@
"id",
"status"
],
"x-cadl-name": "Azure.Core.Foundations.OperationStatus<never, Azure.Core.Foundations.Error>"
"x-typespec-name": "Azure.Core.Foundations.OperationStatus<never, Azure.Core.Foundations.Error>"
}
},
"default": {
"description": "An unexpected error response.",
"headers": {
"x-ms-error-code": {
"description": "String error code indicating what went wrong.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
}
Expand Down Expand Up @@ -285,22 +309,24 @@
"result": {
"$ref": "#/definitions/Widget",
"description": "The result of the operation."
},
"widgetName": {
"type": "string",
"description": "The widget name."
}
},
"description": "Provides status details for long running operations.",
"required": [
"id",
"status",
"widgetName"
"status"
],
"x-cadl-name": "(anonymous model)"
"x-typespec-name": "Azure.Core.ResourceOperationStatus<Widget, Widget, Azure.Core.Foundations.Error>"
}
},
"default": {
"description": "An unexpected error response.",
"headers": {
"x-ms-error-code": {
"description": "String error code indicating what went wrong.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
}
Expand Down Expand Up @@ -336,7 +362,7 @@
"$ref": "#/definitions/Azure.Core.Foundations.Error"
},
"x-ms-identifiers": [],
"x-cadl-name": "Azure.Core.Foundations.Error[]",
"x-typespec-name": "Azure.Core.Foundations.Error[]",
"description": "An array of details about specific errors that led to this reported error."
},
"innererror": {
Expand Down Expand Up @@ -494,4 +520,4 @@
"x-ms-parameter-location": "method"
}
}
}
}