Skip to content

Commit

Permalink
scenarios to enumerations (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
mengaims authored Oct 27, 2023
1 parent 397ec52 commit 6f19b58
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion specification/cognitiveservices/ContentSafety/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ model PreDefinedConcept {
@doc("Label definition.")
model LabelDefinition {
label: int32;
scenarios: string[];
enumerations: string[];
}

@added(Versions.v2023_10_30_Preview)
Expand Down
11 changes: 8 additions & 3 deletions specification/cognitiveservices/ContentSafety/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,18 @@ interface PromptTextOperations {
>;
}

interface CategoryOps
extends Azure.Core.ResourceOperations<NoRepeatableRequests &
NoConditionalRequests &
NoClientRequestId> {}

@added(Versions.v2023_10_30_Preview)
interface TextCategoryCustomization {
createOrReplaceTextCustomizedCategory is ResourceCreateOrReplace<TextCustomizedCategory>;
createOrReplaceTextCustomizedCategory is CategoryOps.ResourceCreateOrReplace<TextCustomizedCategory>;

getTextCustomizedCategory is ResourceRead<TextCustomizedCategory>;
getTextCustomizedCategory is CategoryOps.ResourceRead<TextCustomizedCategory>;

deleteTextCustomizedCategory is ResourceDelete<TextCustomizedCategory>;
deleteTextCustomizedCategory is CategoryOps.ResourceDelete<TextCustomizedCategory>;
}

@added(Versions.v2023_10_30_Preview)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@
"/text/categories/{categoryName}": {
"get": {
"operationId": "TextCategoryCustomization_GetTextCustomizedCategory",
"description": "DEPRECATED: Use `ResourceRead` from a `ResourceOperations` interface instance.\nThis can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.\nSee https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.\n\nOperation signature to retrieve a resource.",
"description": "Resource read operation template.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand Down Expand Up @@ -914,7 +914,7 @@
},
"put": {
"operationId": "TextCategoryCustomization_CreateOrReplaceTextCustomizedCategory",
"description": "DEPRECATED: Use `ResourceCreateOrReplace` from a `ResourceOperations` interface instance.\nThis can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.\nSee https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.\n\nOperation signature to create or replace a resource.",
"description": "Create or replace operation template.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand Down Expand Up @@ -967,7 +967,7 @@
},
"delete": {
"operationId": "TextCategoryCustomization_DeleteTextCustomizedCategory",
"description": "DEPRECATED: Use `ResourceDelete` from a `ResourceOperations` interface instance.\nThis can be done by instantiating your own version with the traits you want `alias Operations = Azure.Core.ResourceOperations<ServiceTraits>;`.\nSee https://azure.github.io/typespec-azure/docs/getstarted/azure-core/step05#defining-the-operation-interface for details on how to use.\n\nOperation signature to delete a resource.",
"description": "Resource delete operation template.",
"parameters": [
{
"$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter"
Expand Down Expand Up @@ -2099,7 +2099,7 @@
"type": "integer",
"format": "int32"
},
"scenarios": {
"enumerations": {
"type": "array",
"items": {
"type": "string"
Expand All @@ -2108,7 +2108,7 @@
},
"required": [
"label",
"scenarios"
"enumerations"
]
},
"ListImageIncidentSampleResult": {
Expand Down

0 comments on commit 6f19b58

Please sign in to comment.