diff --git a/specification/cognitiveservices/ContentSafety/routes.tsp b/specification/cognitiveservices/ContentSafety/routes.tsp index a8736c4483e4..ed7eefc5212e 100644 --- a/specification/cognitiveservices/ContentSafety/routes.tsp +++ b/specification/cognitiveservices/ContentSafety/routes.tsp @@ -1,5 +1,4 @@ import "@azure-tools/typespec-azure-core"; -import "@azure-tools/typespec-client-generator-core"; import "@typespec/http"; import "@typespec/rest"; import "./models.tsp"; @@ -9,7 +8,6 @@ using TypeSpec.Rest; using TypeSpec.Versioning; using Azure.Core; using Azure.Core.Traits; -using Azure.ClientGenerator.Core; namespace ContentSafety; @@ -43,26 +41,30 @@ interface ImageOperations { >; } +interface BlockOps + extends Azure.Core.ResourceOperations {} interface TextBlocklists { @summary("Get Text Blocklist By blocklistName") @doc("Returns text blocklist details.") - getTextBlocklist is Azure.Core.ResourceRead; + getTextBlocklist is BlockOps.ResourceRead; @summary("Create Or Update Text Blocklist") @doc("Updates a text blocklist, if blocklistName does not exist, create a new blocklist.") - createOrUpdateTextBlocklist is Azure.Core.ResourceCreateOrUpdate; + createOrUpdateTextBlocklist is BlockOps.ResourceCreateOrUpdate; @summary("Delete Text Blocklist By blocklistName") @doc("Deletes a text blocklist.") - deleteTextBlocklist is Azure.Core.ResourceDelete; + deleteTextBlocklist is BlockOps.ResourceDelete; @summary("Get All Text Blocklists") @doc("Get all text blocklists details.") - listTextBlocklists is Azure.Core.ResourceList; + listTextBlocklists is BlockOps.ResourceList; @summary("Add BlockItems To Text Blocklist") @doc("Add blockItems to a text blocklist. You can add at most 100 BlockItems in one request.") - addBlockItems is ResourceAction< + addBlockItems is BlockOps.ResourceAction< TextBlocklist, AddBlockItemsOptions, AddBlockItemsResult @@ -70,7 +72,7 @@ interface TextBlocklists { @summary("Remove BlockItems From Text Blocklist") @doc("Remove blockItems from a text blocklist. You can remove at most 100 BlockItems in one request.") - removeBlockItems is ResourceAction< + removeBlockItems is BlockOps.ResourceAction< TextBlocklist, RemoveBlockItemsOptions, NoContentResponse @@ -78,11 +80,11 @@ interface TextBlocklists { @summary("Get BlockItem By blocklistName And blockItemId") @doc("Get blockItem By blockItemId from a text blocklist.") - getTextBlocklistItem is Azure.Core.ResourceRead; + getTextBlocklistItem is BlockOps.ResourceRead; @summary("Get All BlockItems By blocklistName") @doc("Get all blockItems in a text blocklist") - listTextBlocklistItems is Azure.Core.ResourceList< + listTextBlocklistItems is BlockOps.ResourceList< TextBlockItem, ListQueryParametersTrait >; diff --git a/specification/cognitiveservices/ContentSafety/tspconfig.yaml b/specification/cognitiveservices/ContentSafety/tspconfig.yaml index 976e4bb86aa4..adf734570bd8 100644 --- a/specification/cognitiveservices/ContentSafety/tspconfig.yaml +++ b/specification/cognitiveservices/ContentSafety/tspconfig.yaml @@ -13,8 +13,9 @@ emit: - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": - output-file: "contentsafety.json" - azure-resource-provider-folder: ../../../../data-plane + emitter-output-dir: "{project-root}/../" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/contentsafety.json" + azure-resource-provider-folder: "data-plane" examples-directory: ./examples "@azure-tools/typespec-python": package-name: "azure-ai-contentsafety" diff --git a/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-04-30-preview/contentsafety.json b/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-04-30-preview/contentsafety.json index c365ee78d707..cfddf992ac58 100644 --- a/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-04-30-preview/contentsafety.json +++ b/specification/cognitiveservices/data-plane/ContentSafety/preview/2023-04-30-preview/contentsafety.json @@ -121,7 +121,7 @@ "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-typespec-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "Paged collection of TextBlocklist items", @@ -453,7 +453,7 @@ "type": "string", "format": "uri", "description": "The link to the next page of items", - "x-typespec-name": "Rest.ResourceLocation" + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" } }, "description": "Paged collection of TextBlockItem items",