Skip to content

Commit

Permalink
[Bugfix]Update swagger for Conversations to match API docs (#31914)
Browse files Browse the repository at this point in the history
* [Bugfix]Update swagger for Conversations to match API docs

* missed

* one more missed

---------

Co-authored-by: Bidisha Chakraborty <bidishac@microsoft.com>
  • Loading branch information
bidisha-c and Bidisha Chakraborty authored Dec 18, 2024
1 parent 416353c commit c9a4dc0
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 618 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ using Azure.Core.Traits;
* 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://learn.microsoft.com/azure/cognitive-services/language-service/overview\">https://learn.microsoft.com/azure/cognitive-services/language-service/overview</a>.0 */
@useAuth(
TypeSpec.Http.ApiKeyAuth<
TypeSpec.Http.ApiKeyLocation.header,
"Ocp-Apim-Subscription-Key"
>
ApiKeyAuth<ApiKeyLocation.header, "Ocp-Apim-Subscription-Key"> | OAuth2Auth<[
{
type: OAuth2FlowType.authorizationCode,
authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize",
tokenUrl: "https://login.microsoftonline.com/common/oauth2/token",
scopes: ["https://cognitiveservices.azure.com/.default"],
}
]>
)
@service({
title: "Microsoft Cognitive Language Service - Document Analysis",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ model AbstractiveSummarizationLROResult extends AnalyzeDocumentsLROResult {
kind: AnalyzeDocumentsLROResultsKind.AbstractiveSummarizationLROResults;

/** Results of the task. */
results: AbstractiveSummarizationResult;
results: AnalyzeDocumentsResult;
}

/** An object representing the summarization results of each document. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ union ConversationPiiCategories {
/** Address category */
Address: "Address",

/** Credit card number category */
CreditCardNumber: "CreditCardNumber",
/** Credit card category */
CreditCard: "CreditCard",

/** Email category */
Email: "Email",
Expand All @@ -196,15 +196,12 @@ union ConversationPiiCategories {
/** Numeric identifier category */
NumericIdentifier: "NumericIdentifier",

/** Phone number category */
PhoneNumber: "PhoneNumber",
/** Phone category */
Phone: "Phone",

/** US social security number category */
USSocialSecurityNumber: "USSocialSecurityNumber",

/** Miscellaneous category */
Miscellaneous: "Miscellaneous",

/** All categories */
All: "All",

Expand All @@ -220,8 +217,8 @@ union ConversationPiiCategoriesExclude {
/** Address category */
Address: "Address",

/** Credit card number category */
CreditCardNumber: "CreditCardNumber",
/** Credit card category */
CreditCard: "CreditCard",

/** Email category */
Email: "Email",
Expand All @@ -232,8 +229,8 @@ union ConversationPiiCategoriesExclude {
/** Numeric identifier category */
NumericIdentifier: "NumericIdentifier",

/** Phone number category */
PhoneNumber: "PhoneNumber",
/** Phone category */
Phone: "Phone",

/** US social security number category */
USSocialSecurityNumber: "USSocialSecurityNumber",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1432,13 +1432,12 @@
"description": "Describes the PII categories to return for detection. If not provided, 'default' categories will be returned which will vary with the language.",
"enum": [
"Address",
"CreditCardNumber",
"CreditCard",
"Email",
"Person",
"NumericIdentifier",
"PhoneNumber",
"Phone",
"USSocialSecurityNumber",
"Miscellaneous",
"All",
"Default"
],
Expand All @@ -1452,9 +1451,9 @@
"description": "Address category"
},
{
"name": "CreditCardNumber",
"value": "CreditCardNumber",
"description": "Credit card number category"
"name": "CreditCard",
"value": "CreditCard",
"description": "Credit card category"
},
{
"name": "Email",
Expand All @@ -1472,20 +1471,15 @@
"description": "Numeric identifier category"
},
{
"name": "PhoneNumber",
"value": "PhoneNumber",
"description": "Phone number category"
"name": "Phone",
"value": "Phone",
"description": "Phone category"
},
{
"name": "USSocialSecurityNumber",
"value": "USSocialSecurityNumber",
"description": "US social security number category"
},
{
"name": "Miscellaneous",
"value": "Miscellaneous",
"description": "Miscellaneous category"
},
{
"name": "All",
"value": "All",
Expand All @@ -1504,11 +1498,11 @@
"description": "Describes the PII categories to exclude for detection. If not provided, 'default' categories will be returned which will vary with the language.",
"enum": [
"Address",
"CreditCardNumber",
"CreditCard",
"Email",
"Person",
"NumericIdentifier",
"PhoneNumber",
"Phone",
"USSocialSecurityNumber"
],
"x-ms-enum": {
Expand All @@ -1521,9 +1515,9 @@
"description": "Address category"
},
{
"name": "CreditCardNumber",
"value": "CreditCardNumber",
"description": "Credit card number category"
"name": "CreditCard",
"value": "CreditCard",
"description": "Credit card category"
},
{
"name": "Email",
Expand All @@ -1541,9 +1535,9 @@
"description": "Numeric identifier category"
},
{
"name": "PhoneNumber",
"value": "PhoneNumber",
"description": "Phone number category"
"name": "Phone",
"value": "Phone",
"description": "Phone category"
},
{
"name": "USSocialSecurityNumber",
Expand Down
Loading

0 comments on commit c9a4dc0

Please sign in to comment.