Skip to content

Commit f88317f

Browse files
authored
[Text Analytics] Regenerate using an updated swagger for StringIndexType (Azure#14034)
1 parent 3738fa3 commit f88317f

File tree

4 files changed

+10
-35
lines changed

4 files changed

+10
-35
lines changed

sdk/textanalytics/ai-text-analytics/src/generated/models/index.ts

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface EntitiesTask {
4848

4949
export interface EntitiesTaskParameters {
5050
modelVersion?: string;
51-
stringIndexType?: StringIndexTypeResponse;
51+
stringIndexType?: StringIndexType;
5252
}
5353

5454
export interface PiiTask {
@@ -60,7 +60,7 @@ export interface PiiTaskParameters {
6060
modelVersion?: string;
6161
/** (Optional) describes the PII categories to return */
6262
piiCategories?: PiiCategory[];
63-
stringIndexType?: StringIndexTypeResponse;
63+
stringIndexType?: StringIndexType;
6464
}
6565

6666
export interface KeyPhrasesTask {
@@ -77,7 +77,7 @@ export interface EntityLinkingTask {
7777

7878
export interface EntityLinkingTaskParameters {
7979
modelVersion?: string;
80-
stringIndexType?: StringIndexTypeResponse;
80+
stringIndexType?: StringIndexType;
8181
}
8282

8383
export interface ErrorResponse {
@@ -586,8 +586,8 @@ export interface GeneratedClientHealthHeaders {
586586
operationLocation?: string;
587587
}
588588

589-
/** Known values of {@link StringIndexTypeResponse} that the service accepts. */
590-
export const enum KnownStringIndexTypeResponse {
589+
/** Known values of {@link StringIndexType} that the service accepts. */
590+
export const enum KnownStringIndexType {
591591
/** Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. */
592592
TextElementsV8 = "TextElements_v8",
593593
/** Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. */
@@ -597,15 +597,15 @@ export const enum KnownStringIndexTypeResponse {
597597
}
598598

599599
/**
600-
* Defines values for StringIndexTypeResponse. \
601-
* {@link KnownStringIndexTypeResponse} can be used interchangeably with StringIndexTypeResponse,
600+
* Defines values for StringIndexType. \
601+
* {@link KnownStringIndexType} can be used interchangeably with StringIndexType,
602602
* this enum contains the known values that the service supports.
603603
* ### Know values supported by the service
604604
* **TextElements_v8**: Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. \
605605
* **UnicodeCodePoint**: Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. \
606606
* **Utf16CodeUnit**: Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript.
607607
*/
608-
export type StringIndexTypeResponse = string;
608+
export type StringIndexType = string;
609609

610610
/** Known values of {@link PiiTaskParametersDomain} that the service accepts. */
611611
export const enum KnownPiiTaskParametersDomain {
@@ -1080,27 +1080,6 @@ export const enum KnownRelationType {
10801080
* **ValueOfExamination**
10811081
*/
10821082
export type RelationType = string;
1083-
1084-
/** Known values of {@link StringIndexType} that the service accepts. */
1085-
export const enum KnownStringIndexType {
1086-
/** Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. */
1087-
TextElementsV8 = "TextElements_v8",
1088-
/** Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. */
1089-
UnicodeCodePoint = "UnicodeCodePoint",
1090-
/** Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript. */
1091-
Utf16CodeUnit = "Utf16CodeUnit"
1092-
}
1093-
1094-
/**
1095-
* Defines values for StringIndexType. \
1096-
* {@link KnownStringIndexType} can be used interchangeably with StringIndexType,
1097-
* this enum contains the known values that the service supports.
1098-
* ### Know values supported by the service
1099-
* **TextElements_v8**: Returned offset and length values will correspond to TextElements (Graphemes and Grapheme clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is written in .Net Framework or .Net Core and you will be using StringInfo. \
1100-
* **UnicodeCodePoint**: Returned offset and length values will correspond to Unicode code points. Use this option if your application is written in a language that support Unicode, for example Python. \
1101-
* **Utf16CodeUnit**: Returned offset and length values will correspond to UTF-16 code units. Use this option if your application is written in a language that support Unicode, for example Java, JavaScript.
1102-
*/
1103-
export type StringIndexType = string;
11041083
/** Defines values for ErrorCodeValue. */
11051084
export type ErrorCodeValue =
11061085
| "InvalidRequest"

sdk/textanalytics/ai-text-analytics/src/generated/models/mappers.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ export const EntitiesTaskParameters: coreHttp.CompositeMapper = {
176176
}
177177
},
178178
stringIndexType: {
179-
defaultValue: "TextElements_v8",
180179
serializedName: "stringIndexType",
181180
type: {
182181
name: "String"
@@ -225,7 +224,7 @@ export const PiiTaskParameters: coreHttp.CompositeMapper = {
225224
constraints: {
226225
UniqueItems: true
227226
},
228-
serializedName: "piiCategories",
227+
serializedName: "pii-categories",
229228
type: {
230229
name: "Sequence",
231230
element: {
@@ -236,7 +235,6 @@ export const PiiTaskParameters: coreHttp.CompositeMapper = {
236235
}
237236
},
238237
stringIndexType: {
239-
defaultValue: "TextElements_v8",
240238
serializedName: "stringIndexType",
241239
type: {
242240
name: "String"
@@ -307,7 +305,6 @@ export const EntityLinkingTaskParameters: coreHttp.CompositeMapper = {
307305
}
308306
},
309307
stringIndexType: {
310-
defaultValue: "TextElements_v8",
311308
serializedName: "stringIndexType",
312309
type: {
313310
name: "String"

sdk/textanalytics/ai-text-analytics/src/generated/models/parameters.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ export const modelVersion: OperationQueryParameter = {
137137
export const stringIndexType: OperationQueryParameter = {
138138
parameterPath: ["options", "stringIndexType"],
139139
mapper: {
140-
defaultValue: "TextElements_v8",
141140
serializedName: "stringIndexType",
142141
type: {
143142
name: "String"

sdk/textanalytics/ai-text-analytics/swagger/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generate-metadata: false
1212
license-header: MICROSOFT_MIT_NO_VERSION
1313
output-folder: ../
1414
source-code-folder-path: ./src/generated
15-
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.4/TextAnalytics.json
15+
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d2982a8962885e8506b5ebc0b33cb8caf1dc7551/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.1-preview.4/TextAnalytics.json
1616
add-credentials: false
1717
package-version: 5.1.0-beta.5
1818
v3: true

0 commit comments

Comments
 (0)