Skip to content

Commit 27ad105

Browse files
authored
Rename imageContents (plural) to imageContent (singular). Also share definition of Segmentation query (#25980)
1 parent 9d024cb commit 27ad105

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

specification/cognitiveservices/Vision.ImageAnalysis/models.tsp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ model SharedAnalyzeQuery {
3131
genderNeutralCaption?: boolean = false;
3232
}
3333

34+
model SharedSegmentQuery {
35+
@query("mode")
36+
@doc("The type of segmentation to perform")
37+
mode: segmentationMode;
38+
}
39+
3440
@doc("A basic rectangle")
3541
model BoundingBox {
3642
@doc("X coordinate")

specification/cognitiveservices/Vision.ImageAnalysis/routes.tsp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ op analyzeFromStream is Azure.Core.RpcOperation<
3131

3232
@doc("The image to be analyzed")
3333
@body
34-
imageContents: bytes;
34+
imageContent: bytes;
3535
},
3636
ImageAnalysisResult
3737
>;
@@ -52,7 +52,7 @@ op analyzeFromUrl is Azure.Core.RpcOperation<
5252

5353
@doc("The image to be analyzed")
5454
@body
55-
imageContents: ImageUrl;
55+
imageContent: ImageUrl;
5656
},
5757
ImageAnalysisResult
5858
>;
@@ -66,13 +66,11 @@ op analyzeFromUrl is Azure.Core.RpcOperation<
6666
@action("segment")
6767
op segmentFromUrl is Azure.Core.RpcOperation<
6868
{
69+
...SharedSegmentQuery,
70+
6971
@doc("The image to be analyzed")
7072
@body
71-
imageContents: ImageUrl;
72-
73-
@doc("The type of segmentation to perform")
74-
@query("mode")
75-
mode: segmentationMode;
73+
imageContent: ImageUrl;
7674

7775
@doc("The format of the HTTP payload.")
7876
@header()
@@ -94,17 +92,15 @@ op segmentFromUrl is Azure.Core.RpcOperation<
9492
@action("segment")
9593
op segmentFromStream is Azure.Core.RpcOperation<
9694
{
95+
...SharedSegmentQuery,
96+
9797
@doc("The image to be analyzed")
9898
@body
99-
imageContents: bytes;
99+
imageContent: bytes;
100100

101101
@doc("The format of the HTTP payload.")
102102
@header()
103103
contentType: "application/octet-stream";
104-
105-
@doc("The type of segmentation to perform")
106-
@query("mode")
107-
mode: segmentationMode;
108104
},
109105
{
110106
@header

0 commit comments

Comments
 (0)