diff --git a/package-lock.json b/package-lock.json index 814f393c0dec..a2e9ae00a14e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,8 +7,8 @@ "name": "azure-rest-api-specs", "devDependencies": { "@azure-tools/typespec-apiview": "0.4.4", - "@azure-tools/typespec-autorest": "0.35.0", - "@azure-tools/typespec-azure-core": "0.35.0", + "@azure-tools/typespec-autorest": "0.35.1", + "@azure-tools/typespec-azure-core": "0.35.1", "@azure-tools/typespec-azure-resource-manager": "0.35.0", "@azure-tools/typespec-client-generator-core": "0.35.0", "@azure-tools/typespec-providerhub": "0.35.0", @@ -75,15 +75,15 @@ } }, "node_modules/@azure-tools/typespec-autorest": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.35.0.tgz", - "integrity": "sha512-UGiRhgyBc3WWEUgIsSaT44Jgbw6KD2DwYNDr6Oxl2Ig/8ZIInpIB5Eix7mgdqKoN6ifra1wLn0GDAltwVx+idQ==", + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-autorest/-/typespec-autorest-0.35.1.tgz", + "integrity": "sha512-y8Ujxcw0hW4I3ZGz2urXrwlbQiBrczJK8MK6lvMyG2MreIaUoZLC0cqk/z3trRQq6GVTw8E0iqDh6cuGU4NKmw==", "dev": true, "engines": { "node": ">=16.0.0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": "~0.35.0", + "@azure-tools/typespec-azure-core": "~0.35.1", "@typespec/compiler": "~0.49.0", "@typespec/http": "~0.49.0", "@typespec/openapi": "~0.49.0", @@ -92,9 +92,9 @@ } }, "node_modules/@azure-tools/typespec-azure-core": { - "version": "0.35.0", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.35.0.tgz", - "integrity": "sha512-BOzR58O6ZeMcvDD9D1gd9/kZvmJUlyXUiF0BSQUouNVWTlOL9yIMVKZE+zgTiaYm8a3z2uIU9Us6y8CULoWiyw==", + "version": "0.35.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-azure-core/-/typespec-azure-core-0.35.1.tgz", + "integrity": "sha512-qZFF8ONnHucSFnistot4TlbLAd0nidIpP7J0CNWWLNQ4jhPwVO+NbqJ9Ntz5aTsDy+dJocq0pl1nCBvkTNnPuQ==", "dev": true, "engines": { "node": ">=16.0.0" diff --git a/package.json b/package.json index df56d8f7acf6..d4cd330d17b0 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "azure-rest-api-specs", "devDependencies": { "@azure-tools/typespec-apiview": "0.4.4", - "@azure-tools/typespec-autorest": "0.35.0", - "@azure-tools/typespec-azure-core": "0.35.0", + "@azure-tools/typespec-autorest": "0.35.1", + "@azure-tools/typespec-azure-core": "0.35.1", "@azure-tools/typespec-azure-resource-manager": "0.35.0", "@azure-tools/typespec-client-generator-core": "0.35.0", "@azure-tools/typespec-providerhub": "0.35.0", diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/generated.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/generated.json index 121552c858f9..20726492b09d 100644 --- a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/generated.json +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/generated.json @@ -61,11 +61,8 @@ "paths": { "/deployments/{deploymentId}/audio/transcriptions": { "post": { - "operationId": "GetAudioTranscriptionAsResponseObject", + "operationId": "GetAudioTranscriptionAsPlainText", "description": "Gets transcribed text and associated metadata from provided spoken audio data. Audio will be transcribed in the\nwritten language corresponding to the language it was spoken in.", - "consumes": [ - "multipart/form-data" - ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -78,29 +75,19 @@ "type": "string" }, { - "$ref": "#/parameters/AudioTranscriptionOptions.file" - }, - { - "$ref": "#/parameters/AudioTranscriptionOptions.responseFormat" - }, - { - "$ref": "#/parameters/AudioTranscriptionOptions.language" - }, - { - "$ref": "#/parameters/AudioTranscriptionOptions.prompt" - }, - { - "$ref": "#/parameters/AudioTranscriptionOptions.temperature" - }, - { - "$ref": "#/parameters/AudioTranscriptionOptions.model" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AudioTranscriptionOptions" + } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/AudioTranscription" + "type": "string" } }, "default": { @@ -118,18 +105,15 @@ }, "x-ms-examples": { "Gets transcribed text and associated metadata from provided spoken audio data.": { - "$ref": "./examples/audio_transcription_object.json" + "$ref": "./examples/audio_transcription_text.json" } } } }, "/deployments/{deploymentId}/audio/translations": { "post": { - "operationId": "GetAudioTranslationAsResponseObject", + "operationId": "GetAudioTranslationAsPlainText", "description": "Gets English language transcribed text and associated metadata from provided spoken audio data.", - "consumes": [ - "multipart/form-data" - ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" @@ -142,26 +126,19 @@ "type": "string" }, { - "$ref": "#/parameters/AudioTranslationOptions.file" - }, - { - "$ref": "#/parameters/AudioTranslationOptions.responseFormat" - }, - { - "$ref": "#/parameters/AudioTranslationOptions.prompt" - }, - { - "$ref": "#/parameters/AudioTranslationOptions.temperature" - }, - { - "$ref": "#/parameters/AudioTranslationOptions.model" + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AudioTranslationOptions" + } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/AudioTranslation" + "type": "string" } }, "default": { @@ -179,7 +156,7 @@ }, "x-ms-examples": { "Gets English language transcribed text and associated metadata from provided spoken audio data.": { - "$ref": "./examples/audio_translation_object.json" + "$ref": "./examples/audio_translation_text.json" } } } @@ -484,6 +461,133 @@ } } }, + "x-ms-paths": { + "/deployments/{deploymentId}/audio/transcriptions?api-version={apiVersion}": { + "post": { + "operationId": "GetAudioTranscriptionAsResponseObject", + "description": "Gets transcribed text and associated metadata from provided spoken audio data. Audio will be transcribed in the\nwritten language corresponding to the language it was spoken in.", + "consumes": [ + "multipart/form-data" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "deploymentId", + "in": "path", + "description": "Specifies either the model deployment name (when using Azure OpenAI) or model name (when using non-Azure OpenAI) to use for this request.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/AudioTranscriptionOptions.file" + }, + { + "$ref": "#/parameters/AudioTranscriptionOptions.responseFormat" + }, + { + "$ref": "#/parameters/AudioTranscriptionOptions.language" + }, + { + "$ref": "#/parameters/AudioTranscriptionOptions.prompt" + }, + { + "$ref": "#/parameters/AudioTranscriptionOptions.temperature" + }, + { + "$ref": "#/parameters/AudioTranscriptionOptions.model" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/AudioTranscription" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets transcribed text and associated metadata from provided spoken audio data.": { + "$ref": "./examples/audio_transcription_object.json" + } + } + } + }, + "/deployments/{deploymentId}/audio/translations?api-version={apiVersion}": { + "post": { + "operationId": "GetAudioTranslationAsResponseObject", + "description": "Gets English language transcribed text and associated metadata from provided spoken audio data.", + "consumes": [ + "multipart/form-data" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "deploymentId", + "in": "path", + "description": "Specifies either the model deployment name (when using Azure OpenAI) or model name (when using non-Azure OpenAI) to use for this request.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/AudioTranslationOptions.file" + }, + { + "$ref": "#/parameters/AudioTranslationOptions.responseFormat" + }, + { + "$ref": "#/parameters/AudioTranslationOptions.prompt" + }, + { + "$ref": "#/parameters/AudioTranslationOptions.temperature" + }, + { + "$ref": "#/parameters/AudioTranslationOptions.model" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/AudioTranslation" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets English language transcribed text and associated metadata from provided spoken audio data.": { + "$ref": "./examples/audio_translation_object.json" + } + } + } + } + }, "definitions": { "AudioTaskLabel": { "type": "string", diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json index e236c568fc42..f8f711704914 100644 --- a/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-06-01-preview/EventGrid.json @@ -55,10 +55,10 @@ "paths": { "/topics/{topicName}:publish": { "post": { - "operationId": "PublishCloudEvents", - "description": "Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", + "operationId": "PublishCloudEvent", + "description": "Publish Single Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", "consumes": [ - "application/cloudevents-batch+json; charset=utf-8" + "application/cloudevents+json; charset=utf-8" ], "parameters": [ { @@ -72,15 +72,12 @@ "type": "string" }, { - "name": "events", + "name": "event", "in": "body", - "description": "Array of Cloud Events being published.", + "description": "Single Cloud Event being published.", "required": true, "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudEvent" - } + "$ref": "#/definitions/CloudEvent" } } ], @@ -103,11 +100,6 @@ } } } - }, - "x-ms-examples": { - "Publish Cloud Event": { - "$ref": "./examples/publish.json" - } } } }, @@ -457,6 +449,66 @@ } } }, + "x-ms-paths": { + "/topics/{topicName}:publish?api-version={apiVersion}": { + "post": { + "operationId": "PublishCloudEvents", + "description": "Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", + "consumes": [ + "application/cloudevents-batch+json; charset=utf-8" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "description": "Topic Name.", + "required": true, + "type": "string" + }, + { + "name": "events", + "in": "body", + "description": "Array of Cloud Events being published.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudEvent" + } + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PublishResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Publish Cloud Event": { + "$ref": "./examples/publish.json" + } + } + } + } + }, "definitions": { "AcknowledgeOptions": { "type": "object", diff --git a/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-10-01-preview/EventGrid.json b/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-10-01-preview/EventGrid.json index 308f07a28218..1c8b7339b2eb 100644 --- a/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-10-01-preview/EventGrid.json +++ b/specification/eventgrid/data-plane/Microsoft.EventGrid/preview/2023-10-01-preview/EventGrid.json @@ -55,10 +55,10 @@ "paths": { "/topics/{topicName}:publish": { "post": { - "operationId": "PublishCloudEvents", - "description": "Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", + "operationId": "PublishCloudEvent", + "description": "Publish Single Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", "consumes": [ - "application/cloudevents-batch+json; charset=utf-8" + "application/cloudevents+json; charset=utf-8" ], "parameters": [ { @@ -72,15 +72,12 @@ "type": "string" }, { - "name": "events", + "name": "event", "in": "body", - "description": "Array of Cloud Events being published.", + "description": "Single Cloud Event being published.", "required": true, "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/CloudEvent" - } + "$ref": "#/definitions/CloudEvent" } } ], @@ -103,11 +100,6 @@ } } } - }, - "x-ms-examples": { - "Publish Cloud Event": { - "$ref": "./examples/publish.json" - } } } }, @@ -462,6 +454,66 @@ } } }, + "x-ms-paths": { + "/topics/{topicName}:publish?api-version={apiVersion}": { + "post": { + "operationId": "PublishCloudEvents", + "description": "Publish Batch Cloud Event to namespace topic. In case of success, the server responds with an HTTP 200 status code with an empty JSON object in response. Otherwise, the server can return various error codes. For example, 401: which indicates authorization failure, 403: which indicates quota exceeded or message is too large, 410: which indicates that specific topic is not found, 400: for bad request, and 500: for internal server error. ", + "consumes": [ + "application/cloudevents-batch+json; charset=utf-8" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "topicName", + "in": "path", + "description": "Topic Name.", + "required": true, + "type": "string" + }, + { + "name": "events", + "in": "body", + "description": "Array of Cloud Events being published.", + "required": true, + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudEvent" + } + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PublishResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Publish Cloud Event": { + "$ref": "./examples/publish.json" + } + } + } + } + }, "definitions": { "AcknowledgeOptions": { "type": "object",