Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 16 additions & 19 deletions specification/cognitiveservices/ContentSafety/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,29 @@ import "./main.tsp";
using Azure.ClientGenerator.Core;

@TypeSpec.Versioning.useDependency(Azure.Core.Versions.v1_0_Preview_2)
@TypeSpec.Versioning.useDependency(
ContentSafety.Versions.v2023_10_01
)
@TypeSpec.Versioning.useDependency(ContentSafety.Versions.v2023_10_01)
namespace Customizations;

@client({
name: "ContentSafetyClient",
service: ContentSafety
})
name: "ContentSafetyClient",
service: ContentSafety,
})
interface ContentSafetyClient {
analyzeText is ContentSafety.TextOperations.analyzeText;
analyzeImage is ContentSafety.ImageOperations.analyzeImage;
analyzeText is ContentSafety.TextOperations.analyzeText;
analyzeImage is ContentSafety.ImageOperations.analyzeImage;
}


@client({
name: "BlocklistClient",
service: ContentSafety
name: "BlocklistClient",
service: ContentSafety,
})
interface BlocklistClient {
addOrUpdateBlocklistItems is ContentSafety.TextBlocklists.addOrUpdateBlocklistItems;
createOrUpdateTextBlocklist is ContentSafety.TextBlocklists.createOrUpdateTextBlocklist;
deleteTextBlocklist is ContentSafety.TextBlocklists.deleteTextBlocklist;
getTextBlocklist is ContentSafety.TextBlocklists.getTextBlocklist;
getTextBlocklistItem is ContentSafety.TextBlocklists.getTextBlocklistItem;
listTextBlocklistItems is ContentSafety.TextBlocklists.listTextBlocklistItems;
listTextBlocklists is ContentSafety.TextBlocklists.listTextBlocklists;
removeBlocklistItems is ContentSafety.TextBlocklists.removeBlocklistItems;
addOrUpdateBlocklistItems is ContentSafety.TextBlocklists.addOrUpdateBlocklistItems;
createOrUpdateTextBlocklist is ContentSafety.TextBlocklists.createOrUpdateTextBlocklist;
deleteTextBlocklist is ContentSafety.TextBlocklists.deleteTextBlocklist;
getTextBlocklist is ContentSafety.TextBlocklists.getTextBlocklist;
getTextBlocklistItem is ContentSafety.TextBlocklists.getTextBlocklistItem;
listTextBlocklistItems is ContentSafety.TextBlocklists.listTextBlocklistItems;
listTextBlocklists is ContentSafety.TextBlocklists.listTextBlocklists;
removeBlocklistItems is ContentSafety.TextBlocklists.removeBlocklistItems;
}
9 changes: 6 additions & 3 deletions specification/cognitiveservices/ContentSafety/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ interface BlockOps
NoConditionalRequests &
NoClientRequestId> {}

@@projectedName(Azure.Core.Foundations.ResourceBody.resource, "client", "options");
@@projectedName(Azure.Core.Foundations.ResourceBody.resource,
"client",
"options"
);

interface TextBlocklists {
@summary("Get Text Blocklist By blocklistName")
Expand Down Expand Up @@ -81,7 +84,7 @@ interface TextBlocklists {
@projectedName("csharp", "options")
@projectedName("python", "options")
@projectedName("java", "options")
body: AddOrUpdateTextBlocklistItemsOptions,
body: AddOrUpdateTextBlocklistItemsOptions;
},
AddOrUpdateTextBlocklistItemsResult
>;
Expand All @@ -96,7 +99,7 @@ interface TextBlocklists {
@projectedName("csharp", "options")
@projectedName("python", "options")
@projectedName("java", "options")
body: RemoveTextBlocklistItemsOptions,
body: RemoveTextBlocklistItemsOptions;
},
NoContentResponse
>;
Expand Down