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

Batch 3 sdk gen test #3485

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .js/branch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
origin/wanl/generate-mlc-in-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using TypeSpec.Versioning;
@Azure.ResourceManager.armCommonTypesVersion("v5")
@armProviderNamespace
@service({
title: "Azure Large Instance",
title: "Azure Large Instance for testing",
})
@doc("The AzureLargeInstance Management client")
@versioned(Versions)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure Large Instance",
"title": "Azure Large Instance for testing",
"version": "2023-07-20-preview",
"description": "The AzureLargeInstance Management client",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure Large Instance",
"title": "Azure Large Instance for testing",
"version": "2024-04-10",
"description": "The AzureLargeInstance Management client",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using TypeSpec.Versioning;
#suppress "@azure-tools/typespec-azure-core/casing-style" "HCI itself is a short form."
@armProviderNamespace
@service({
title: "Microsoft.AzureStackHCI",
title: "Microsoft.AzureStackHCI for testing",
})
@versioned(Versions)
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
Expand Down
2 changes: 1 addition & 1 deletion specification/azurestackhci/Operations.Management/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ using TypeSpec.Versioning;
#suppress "@azure-tools/typespec-azure-core/casing-style" "HCI itself is a short form."
@armProviderNamespace
@service({
title: "Microsoft.AzureStackHCI",
title: "Microsoft.AzureStackHCI for testing",
})
@versioned(Versions)
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Microsoft.AzureStackHCI",
"title": "Microsoft.AzureStackHCI for testing",
"version": "2024-02-01-preview",
"description": "Azure Stack HCI management service",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Microsoft.AzureStackHCI",
"title": "Microsoft.AzureStackHCI for testing",
"version": "2024-02-01-preview",
"description": "Azure Stack HCI management service",
"x-typespec-generated": [
Expand Down
2 changes: 1 addition & 1 deletion specification/batch/Azure.Batch/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using TypeSpec.Http;
using TypeSpec.Versioning;

@service({
title: "Azure Batch",
title: "Azure Batch for testing",
})
@versioned(Azure.Batch.Versions)
@doc("Azure Batch provides Cloud-scale job scheduling and compute management.")
Expand Down
5 changes: 5 additions & 0 deletions specification/batch/Azure.Batch/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ options:
description: "Batch Service Rest Level Client"
version: "1.0.0-beta.1"
flavor: azure
generateMetadata: true
generateSample: true
generateTest: true
azureSdkForJs: true
emitter-output-dir: "{project-root}/sdk/batch/batch-rest"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure Batch",
"title": "Azure Batch for testing",
"version": "2024-02-01.19.0",
"description": "Azure Batch provides Cloud-scale job scheduling and compute management.",
"x-typespec-generated": [
Expand Down
2 changes: 1 addition & 1 deletion specification/codesigning/CodeSigning.Management/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using TypeSpec.Versioning;
@doc("Code Signing resource provider api.")
@armProviderNamespace("Microsoft.CodeSigning")
@service({
title: "CodeSigningManagementClient",
title: "CodeSigningManagementClient for testing",
})
@versioned(Versions)
@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "CodeSigningManagementClient",
"title": "CodeSigningManagementClient for testing",
"version": "2024-02-05-preview",
"description": "Code Signing resource provider api.",
"x-typespec-generated": [
Expand Down
2 changes: 1 addition & 1 deletion specification/cognitiveservices/AnomalyDetector/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using TypeSpec.Versioning;

@versioned(APIVersion)
@service({
title: "Anomaly Detector",
title: "Anomaly Detector for testing",
})
@useAuth(AnomalyDetectorApiKeyAuth)
@server(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ parameters:
default: "{project-root}/azure-sdk-for-net/"
"service-directory-name":
default: "anomalydetector"
"service-dir":
default: "sdk/anomalydetector"
emit:
- "@azure-tools/typespec-autorest"
linter:
Expand Down Expand Up @@ -43,9 +45,12 @@ options:
model-namespace: false
flavor: azure
"@azure-tools/typespec-ts":
package-dir: "ai-anomaly-detector-rest"
emitter-output-dir: "{js-sdk-folder}/sdk/{service-directory-name}/ai-anomaly-detector-rest"
generateMetadata: true
generateSample: true
generateTest: true
azureSdkForJs: true
packageDetails:
name: "@azure-rest/ai-anomaly-detector"
flavor: azure
2 changes: 1 addition & 1 deletion specification/cognitiveservices/ContentSafety/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using TypeSpec.Versioning;
using Azure.Core;

@service({
title: "ContentSafety Service",
title: "ContentSafety Service for testing",
})
@versioned(ContentSafety.Versions)
@useAuth(
Expand Down
5 changes: 5 additions & 0 deletions specification/cognitiveservices/ContentSafety/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ options:
model-namespace: false
flavor: azure
"@azure-tools/typespec-ts":
# reference: https://github.com/Azure/autorest.typescript/blob/main/packages/typespec-test/test/loadTest/tspconfig.yaml
package-dir: "ai-content-safety-rest"
generateMetadata: true
generateSample: true
generateTest: true
azureSdkForJs: true
packageDetails:
name: "@azure-rest/ai-content-safety"
version: "1.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ using Azure.Core.Traits;
]>
)
@service({
title: "Microsoft Cognitive Language Service - Text Analysis",
title: "Microsoft Cognitive Language Service - Text Analysis for testing",
})
@server(
"{Endpoint}/language",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using Azure.Core.Traits;
]>
)
@service({
title: "Microsoft Cognitive Language Service - Analyze Conversations",
title: "Microsoft Cognitive Language Service - Analyze Conversations for testing",
})
@server(
"{Endpoint}/language",
Expand Down Expand Up @@ -1140,7 +1140,7 @@ union SummaryAspect {
resolution: "resolution",

/** Chapter title of any conversation. It's usually one phrase or several phrases naturally combined. Long conversations tend to have more chapters. You can find the chapter boundary from the summary context. */
chapterTitle: "chapterTitle",
chaptertitle: "chapterTitle for testing",

/** Generic narrative summary of any conversation. It generally converts the conversational language into formal written language, compresses the text length, and keeps the salient information. */
narrative: "narrative",
Expand Down
2 changes: 1 addition & 1 deletion specification/cognitiveservices/OpenAI.Inference/main.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ using TypeSpec.Versioning;
]>
)
@service({
title: "Azure OpenAI API",
title: "Azure OpenAI API for testing",
})
@server(
"{endpoint}/openai",
Expand Down
10 changes: 8 additions & 2 deletions specification/cognitiveservices/OpenAI.Inference/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ options:
flavor: azure
"@azure-tools/typespec-ts":
package-dir: "openai"
generateMetadata: false
generateTest: false
generateMetadata: true
generateSample: true
generateTest: true
azureSdkForJs: true
isModularLibrary: true
experimentalExtensibleEnums: true
enableOperationGroup: true
hierarchyClient: false
emitter-output-dir: "{project-root}/sdk/openai/openai"
packageDetails:
name: "@azure/openai"
flavor: azure
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Anomaly Detector",
"title": "Anomaly Detector for testing",
"version": "v1.1",
"description": "The Anomaly Detector API detects anomalies automatically in time series data.\nIt supports both a stateless detection mode and a\nstateful detection mode. In stateless mode, there are three functionalities. Entire\nDetect is for detecting the whole series, with the model trained by the time series.\nLast Detect is for detecting the last point, with the model trained by points before.\nChangePoint Detect is for detecting trend changes in the time series. In stateful\nmode, the user can store time series. The stored time series will be used for\ndetection anomalies. In this mode, the user can still use the preceding three\nfunctionalities by only giving a time range without preparing time series on the\nclient side. Besides the preceding three functionalities, the stateful model\nprovides group-based detection and labeling services. By using the labeling\nservice, the user can provide labels for each detection result. These labels will be\nused for retuning or regenerating detection models. Inconsistency detection is\na kind of group-based detection that finds inconsistencies in\na set of time series. By using the anomaly detector service, business customers can\ndiscover incidents and establish a logic flow for root cause analysis.",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2023-06-01-preview",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2023-07-01-preview",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2024-02-15-preview",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2024-03-01-preview",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2024-04-01-preview",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2024-05-01-preview",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2022-12-01",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2023-05-15",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2024-02-01",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Azure OpenAI API",
"title": "Azure OpenAI API for testing",
"version": "2024-06-01",
"description": "Azure OpenAI APIs for completions and search",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "ContentSafety Service",
"title": "ContentSafety Service for testing",
"version": "2023-10-01",
"description": "Analyze harmful content",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "ContentSafety Service",
"title": "ContentSafety Service for testing",
"version": "2024-09-01",
"description": "Analyze harmful content",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Microsoft Cognitive Language Service - Text Analysis",
"title": "Microsoft Cognitive Language Service - Text Analysis for testing",
"version": "2023-11-15-preview",
"description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\\\"https://docs.microsoft.com/azure/cognitive-services/language-service/overview\\\">https://docs.microsoft.com/azure/cognitive-services/language-service/overview</a>.0",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Microsoft Cognitive Language Service - Analyze Conversations",
"title": "Microsoft Cognitive Language Service - Analyze Conversations for testing",
"version": "2024-05-15-preview",
"description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\\n\\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.",
"x-typespec-generated": [
Expand Down Expand Up @@ -3957,7 +3957,7 @@
"enum": [
"issue",
"resolution",
"chapterTitle",
"chapterTitle for testing",
"narrative",
"recap",
"follow-up tasks"
Expand All @@ -3977,8 +3977,8 @@
"description": "Summary of resolutions in transcripts of web chats and service calls between customer-service agents and customers."
},
{
"name": "chapterTitle",
"value": "chapterTitle",
"name": "chaptertitle",
"value": "chapterTitle for testing",
"description": "Chapter title of any conversation. It's usually one phrase or several phrases naturally combined. Long conversations tend to have more chapters. You can find the chapter boundary from the summary context."
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Microsoft Cognitive Language Service - Analyze Conversations",
"title": "Microsoft Cognitive Language Service - Analyze Conversations for testing",
"version": "2022-05-01",
"description": "The language service conversations API is a suite of natural language processing (NLP) skills that can be used to analyze structured conversations (textual or spoken). The synchronous API in this suite accepts a request and mediates among multiple language projects, such as LUIS Generally Available, Question Answering, Conversational Language Understanding, and then calls the best candidate service to handle the request. At last, it returns a response with the candidate service's response as a payload.\\n\\n In some cases, this API needs to forward requests and responses between the caller and an upstream service. The asynchronous APIs in this suite enable tasks like Conversation Summarization and Conversational PII detection.",
"x-typespec-generated": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"swagger": "2.0",
"info": {
"title": "Microsoft Cognitive Language Service - Text Analysis",
"title": "Microsoft Cognitive Language Service - Text Analysis for testing",
"version": "2022-05-01",
"description": "The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in <a href=\\\"https://docs.microsoft.com/azure/cognitive-services/language-service/overview\\\">https://docs.microsoft.com/azure/cognitive-services/language-service/overview</a>.0",
"x-typespec-generated": [
Expand Down
Loading