Skip to content

Commit b375632

Browse files
authored
[TypeSpec] Upgrade autorest and azure-core to 0.35.1 (#26464)
- Small changes to generated swagger reacting to Azure/typespec-azure#3773
1 parent c577452 commit b375632

File tree

5 files changed

+288
-80
lines changed

5 files changed

+288
-80
lines changed

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "azure-rest-api-specs",
33
"devDependencies": {
44
"@azure-tools/typespec-apiview": "0.4.4",
5-
"@azure-tools/typespec-autorest": "0.35.0",
6-
"@azure-tools/typespec-azure-core": "0.35.0",
5+
"@azure-tools/typespec-autorest": "0.35.1",
6+
"@azure-tools/typespec-azure-core": "0.35.1",
77
"@azure-tools/typespec-azure-resource-manager": "0.35.0",
88
"@azure-tools/typespec-client-generator-core": "0.35.0",
99
"@azure-tools/typespec-providerhub": "0.35.0",

specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2023-09-01-preview/generated.json

Lines changed: 145 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@
6161
"paths": {
6262
"/deployments/{deploymentId}/audio/transcriptions": {
6363
"post": {
64-
"operationId": "GetAudioTranscriptionAsResponseObject",
64+
"operationId": "GetAudioTranscriptionAsPlainText",
6565
"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.",
66-
"consumes": [
67-
"multipart/form-data"
68-
],
6966
"parameters": [
7067
{
7168
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
@@ -78,29 +75,19 @@
7875
"type": "string"
7976
},
8077
{
81-
"$ref": "#/parameters/AudioTranscriptionOptions.file"
82-
},
83-
{
84-
"$ref": "#/parameters/AudioTranscriptionOptions.responseFormat"
85-
},
86-
{
87-
"$ref": "#/parameters/AudioTranscriptionOptions.language"
88-
},
89-
{
90-
"$ref": "#/parameters/AudioTranscriptionOptions.prompt"
91-
},
92-
{
93-
"$ref": "#/parameters/AudioTranscriptionOptions.temperature"
94-
},
95-
{
96-
"$ref": "#/parameters/AudioTranscriptionOptions.model"
78+
"name": "body",
79+
"in": "body",
80+
"required": true,
81+
"schema": {
82+
"$ref": "#/definitions/AudioTranscriptionOptions"
83+
}
9784
}
9885
],
9986
"responses": {
10087
"200": {
10188
"description": "The request has succeeded.",
10289
"schema": {
103-
"$ref": "#/definitions/AudioTranscription"
90+
"type": "string"
10491
}
10592
},
10693
"default": {
@@ -118,18 +105,15 @@
118105
},
119106
"x-ms-examples": {
120107
"Gets transcribed text and associated metadata from provided spoken audio data.": {
121-
"$ref": "./examples/audio_transcription_object.json"
108+
"$ref": "./examples/audio_transcription_text.json"
122109
}
123110
}
124111
}
125112
},
126113
"/deployments/{deploymentId}/audio/translations": {
127114
"post": {
128-
"operationId": "GetAudioTranslationAsResponseObject",
115+
"operationId": "GetAudioTranslationAsPlainText",
129116
"description": "Gets English language transcribed text and associated metadata from provided spoken audio data.",
130-
"consumes": [
131-
"multipart/form-data"
132-
],
133117
"parameters": [
134118
{
135119
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
@@ -142,26 +126,19 @@
142126
"type": "string"
143127
},
144128
{
145-
"$ref": "#/parameters/AudioTranslationOptions.file"
146-
},
147-
{
148-
"$ref": "#/parameters/AudioTranslationOptions.responseFormat"
149-
},
150-
{
151-
"$ref": "#/parameters/AudioTranslationOptions.prompt"
152-
},
153-
{
154-
"$ref": "#/parameters/AudioTranslationOptions.temperature"
155-
},
156-
{
157-
"$ref": "#/parameters/AudioTranslationOptions.model"
129+
"name": "body",
130+
"in": "body",
131+
"required": true,
132+
"schema": {
133+
"$ref": "#/definitions/AudioTranslationOptions"
134+
}
158135
}
159136
],
160137
"responses": {
161138
"200": {
162139
"description": "The request has succeeded.",
163140
"schema": {
164-
"$ref": "#/definitions/AudioTranslation"
141+
"type": "string"
165142
}
166143
},
167144
"default": {
@@ -179,7 +156,7 @@
179156
},
180157
"x-ms-examples": {
181158
"Gets English language transcribed text and associated metadata from provided spoken audio data.": {
182-
"$ref": "./examples/audio_translation_object.json"
159+
"$ref": "./examples/audio_translation_text.json"
183160
}
184161
}
185162
}
@@ -484,6 +461,133 @@
484461
}
485462
}
486463
},
464+
"x-ms-paths": {
465+
"/deployments/{deploymentId}/audio/transcriptions?api-version={apiVersion}": {
466+
"post": {
467+
"operationId": "GetAudioTranscriptionAsResponseObject",
468+
"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.",
469+
"consumes": [
470+
"multipart/form-data"
471+
],
472+
"parameters": [
473+
{
474+
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
475+
},
476+
{
477+
"name": "deploymentId",
478+
"in": "path",
479+
"description": "Specifies either the model deployment name (when using Azure OpenAI) or model name (when using non-Azure OpenAI) to use for this request.",
480+
"required": true,
481+
"type": "string"
482+
},
483+
{
484+
"$ref": "#/parameters/AudioTranscriptionOptions.file"
485+
},
486+
{
487+
"$ref": "#/parameters/AudioTranscriptionOptions.responseFormat"
488+
},
489+
{
490+
"$ref": "#/parameters/AudioTranscriptionOptions.language"
491+
},
492+
{
493+
"$ref": "#/parameters/AudioTranscriptionOptions.prompt"
494+
},
495+
{
496+
"$ref": "#/parameters/AudioTranscriptionOptions.temperature"
497+
},
498+
{
499+
"$ref": "#/parameters/AudioTranscriptionOptions.model"
500+
}
501+
],
502+
"responses": {
503+
"200": {
504+
"description": "The request has succeeded.",
505+
"schema": {
506+
"$ref": "#/definitions/AudioTranscription"
507+
}
508+
},
509+
"default": {
510+
"description": "An unexpected error response.",
511+
"schema": {
512+
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
513+
},
514+
"headers": {
515+
"x-ms-error-code": {
516+
"type": "string",
517+
"description": "String error code indicating what went wrong."
518+
}
519+
}
520+
}
521+
},
522+
"x-ms-examples": {
523+
"Gets transcribed text and associated metadata from provided spoken audio data.": {
524+
"$ref": "./examples/audio_transcription_object.json"
525+
}
526+
}
527+
}
528+
},
529+
"/deployments/{deploymentId}/audio/translations?api-version={apiVersion}": {
530+
"post": {
531+
"operationId": "GetAudioTranslationAsResponseObject",
532+
"description": "Gets English language transcribed text and associated metadata from provided spoken audio data.",
533+
"consumes": [
534+
"multipart/form-data"
535+
],
536+
"parameters": [
537+
{
538+
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
539+
},
540+
{
541+
"name": "deploymentId",
542+
"in": "path",
543+
"description": "Specifies either the model deployment name (when using Azure OpenAI) or model name (when using non-Azure OpenAI) to use for this request.",
544+
"required": true,
545+
"type": "string"
546+
},
547+
{
548+
"$ref": "#/parameters/AudioTranslationOptions.file"
549+
},
550+
{
551+
"$ref": "#/parameters/AudioTranslationOptions.responseFormat"
552+
},
553+
{
554+
"$ref": "#/parameters/AudioTranslationOptions.prompt"
555+
},
556+
{
557+
"$ref": "#/parameters/AudioTranslationOptions.temperature"
558+
},
559+
{
560+
"$ref": "#/parameters/AudioTranslationOptions.model"
561+
}
562+
],
563+
"responses": {
564+
"200": {
565+
"description": "The request has succeeded.",
566+
"schema": {
567+
"$ref": "#/definitions/AudioTranslation"
568+
}
569+
},
570+
"default": {
571+
"description": "An unexpected error response.",
572+
"schema": {
573+
"$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse"
574+
},
575+
"headers": {
576+
"x-ms-error-code": {
577+
"type": "string",
578+
"description": "String error code indicating what went wrong."
579+
}
580+
}
581+
}
582+
},
583+
"x-ms-examples": {
584+
"Gets English language transcribed text and associated metadata from provided spoken audio data.": {
585+
"$ref": "./examples/audio_translation_object.json"
586+
}
587+
}
588+
}
589+
}
590+
},
487591
"definitions": {
488592
"AudioTaskLabel": {
489593
"type": "string",

0 commit comments

Comments
 (0)