Skip to content

Commit b039e63

Browse files
authored
Fix flipped order in Face generated models (#16846)
* Fix flipped order in Face generated models The recent change changing a nested parameter from optional to required caused the AutoRest generated model to have a reversed order of two string arguments. Expanding the nesting for affected models to avoid breaking changes. * Fix malformatted examples
1 parent 00d9827 commit b039e63

File tree

4 files changed

+140
-60
lines changed

4 files changed

+140
-60
lines changed

specification/cognitiveservices/data-plane/Face/preview/v1.0-preview/Face.json

Lines changed: 68 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4652,7 +4652,8 @@
46524652
"description": "Face list object.",
46534653
"type": "object",
46544654
"required": [
4655-
"faceListId"
4655+
"faceListId",
4656+
"name"
46564657
],
46574658
"properties": {
46584659
"faceListId": {
@@ -4661,16 +4662,25 @@
46614662
"maxLength": 64,
46624663
"pattern": "^[a-z0-9-_]+$"
46634664
},
4665+
"name": {
4666+
"type": "string",
4667+
"description": "User defined name, maximum length is 128.",
4668+
"maxLength": 128,
4669+
"minLength": 1
4670+
},
4671+
"userData": {
4672+
"type": "string",
4673+
"description": "User specified data. Length should not exceed 16KB.",
4674+
"maxLength": 16384
4675+
},
4676+
"recognitionModel": {
4677+
"$ref": "#/definitions/RecognitionModel"
4678+
},
46644679
"persistedFaces": {
46654680
"description": "Persisted faces within the face list.",
46664681
"$ref": "#/definitions/PersistedFaces"
46674682
}
4668-
},
4669-
"allOf": [
4670-
{
4671-
"$ref": "#/definitions/MetaDataContract"
4672-
}
4673-
]
4683+
}
46744684
},
46754685
"FaceLists": {
46764686
"type": "array",
@@ -4682,7 +4692,8 @@
46824692
"PersonGroup": {
46834693
"type": "object",
46844694
"required": [
4685-
"personGroupId"
4695+
"personGroupId",
4696+
"name"
46864697
],
46874698
"description": "Person group object.",
46884699
"properties": {
@@ -4691,13 +4702,22 @@
46914702
"type": "string",
46924703
"maxLength": 64,
46934704
"pattern": "^[a-z0-9-_]+$"
4705+
},
4706+
"name": {
4707+
"type": "string",
4708+
"description": "User defined name, maximum length is 128.",
4709+
"maxLength": 128,
4710+
"minLength": 1
4711+
},
4712+
"userData": {
4713+
"type": "string",
4714+
"description": "User specified data. Length should not exceed 16KB.",
4715+
"maxLength": 16384
4716+
},
4717+
"recognitionModel": {
4718+
"$ref": "#/definitions/RecognitionModel"
46944719
}
4695-
},
4696-
"allOf": [
4697-
{
4698-
"$ref": "#/definitions/MetaDataContract"
4699-
}
4700-
]
4720+
}
47014721
},
47024722
"PersonGroups": {
47034723
"type": "array",
@@ -4771,21 +4791,31 @@
47714791
"description": "Large face list object.",
47724792
"type": "object",
47734793
"required": [
4774-
"largeFaceListId"
4794+
"largeFaceListId",
4795+
"name"
47754796
],
47764797
"properties": {
47774798
"largeFaceListId": {
47784799
"type": "string",
47794800
"description": "LargeFaceListId of the target large face list.",
47804801
"maxLength": 64,
47814802
"pattern": "^[a-z0-9-_]+$"
4803+
},
4804+
"name": {
4805+
"type": "string",
4806+
"description": "User defined name, maximum length is 128.",
4807+
"maxLength": 128,
4808+
"minLength": 1
4809+
},
4810+
"userData": {
4811+
"type": "string",
4812+
"description": "User specified data. Length should not exceed 16KB.",
4813+
"maxLength": 16384
4814+
},
4815+
"recognitionModel": {
4816+
"$ref": "#/definitions/RecognitionModel"
47824817
}
4783-
},
4784-
"allOf": [
4785-
{
4786-
"$ref": "#/definitions/MetaDataContract"
4787-
}
4788-
]
4818+
}
47894819
},
47904820
"LargeFaceLists": {
47914821
"type": "array",
@@ -4797,7 +4827,8 @@
47974827
"LargePersonGroup": {
47984828
"type": "object",
47994829
"required": [
4800-
"largePersonGroupId"
4830+
"largePersonGroupId",
4831+
"name"
48014832
],
48024833
"description": "Large person group object.",
48034834
"properties": {
@@ -4806,13 +4837,22 @@
48064837
"type": "string",
48074838
"maxLength": 64,
48084839
"pattern": "^[a-z0-9-_]+$"
4840+
},
4841+
"name": {
4842+
"type": "string",
4843+
"description": "User defined name, maximum length is 128.",
4844+
"maxLength": 128,
4845+
"minLength": 1
4846+
},
4847+
"userData": {
4848+
"type": "string",
4849+
"description": "User specified data. Length should not exceed 16KB.",
4850+
"maxLength": 16384
4851+
},
4852+
"recognitionModel": {
4853+
"$ref": "#/definitions/RecognitionModel"
48094854
}
4810-
},
4811-
"allOf": [
4812-
{
4813-
"$ref": "#/definitions/MetaDataContract"
4814-
}
4815-
]
4855+
}
48164856
},
48174857
"LargePersonGroups": {
48184858
"type": "array",

specification/cognitiveservices/data-plane/Face/preview/v1.0-preview/examples/GetPersonGroupPersistedFace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"Content-Type": "application/json",
55
"Ocp-Apim-Subscription-Key": "{API key}",
66
"personGroupId": "abc",
7-
"personId": "foobar",
8-
"persistedFaceId": "asd"
7+
"personId": "B8D802CF-DD8F-4E61-B15C-9E6C5844CCBA",
8+
"persistedFaceId": "015839fb-fbd9-4f79-ace9-7675fc2f1dd9"
99
},
1010
"responses": {
1111
"200": {

specification/cognitiveservices/data-plane/Face/stable/v1.0/Face.json

Lines changed: 68 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3727,7 +3727,8 @@
37273727
"description": "Face list object.",
37283728
"type": "object",
37293729
"required": [
3730-
"faceListId"
3730+
"faceListId",
3731+
"name"
37313732
],
37323733
"properties": {
37333734
"faceListId": {
@@ -3736,16 +3737,25 @@
37363737
"maxLength": 64,
37373738
"pattern": "^[a-z0-9-_]+$"
37383739
},
3740+
"name": {
3741+
"type": "string",
3742+
"description": "User defined name, maximum length is 128.",
3743+
"maxLength": 128,
3744+
"minLength": 1
3745+
},
3746+
"userData": {
3747+
"type": "string",
3748+
"description": "User specified data. Length should not exceed 16KB.",
3749+
"maxLength": 16384
3750+
},
3751+
"recognitionModel": {
3752+
"$ref": "#/definitions/RecognitionModel"
3753+
},
37393754
"persistedFaces": {
37403755
"description": "Persisted faces within the face list.",
37413756
"$ref": "#/definitions/PersistedFaces"
37423757
}
3743-
},
3744-
"allOf": [
3745-
{
3746-
"$ref": "#/definitions/MetaDataContract"
3747-
}
3748-
]
3758+
}
37493759
},
37503760
"FaceLists": {
37513761
"type": "array",
@@ -3757,7 +3767,8 @@
37573767
"PersonGroup": {
37583768
"type": "object",
37593769
"required": [
3760-
"personGroupId"
3770+
"personGroupId",
3771+
"name"
37613772
],
37623773
"description": "Person group object.",
37633774
"properties": {
@@ -3766,13 +3777,22 @@
37663777
"type": "string",
37673778
"maxLength": 64,
37683779
"pattern": "^[a-z0-9-_]+$"
3780+
},
3781+
"name": {
3782+
"type": "string",
3783+
"description": "User defined name, maximum length is 128.",
3784+
"maxLength": 128,
3785+
"minLength": 1
3786+
},
3787+
"userData": {
3788+
"type": "string",
3789+
"description": "User specified data. Length should not exceed 16KB.",
3790+
"maxLength": 16384
3791+
},
3792+
"recognitionModel": {
3793+
"$ref": "#/definitions/RecognitionModel"
37693794
}
3770-
},
3771-
"allOf": [
3772-
{
3773-
"$ref": "#/definitions/MetaDataContract"
3774-
}
3775-
]
3795+
}
37763796
},
37773797
"PersonGroups": {
37783798
"type": "array",
@@ -3846,21 +3866,31 @@
38463866
"description": "Large face list object.",
38473867
"type": "object",
38483868
"required": [
3849-
"largeFaceListId"
3869+
"largeFaceListId",
3870+
"name"
38503871
],
38513872
"properties": {
38523873
"largeFaceListId": {
38533874
"type": "string",
38543875
"description": "LargeFaceListId of the target large face list.",
38553876
"maxLength": 64,
38563877
"pattern": "^[a-z0-9-_]+$"
3878+
},
3879+
"name": {
3880+
"type": "string",
3881+
"description": "User defined name, maximum length is 128.",
3882+
"maxLength": 128,
3883+
"minLength": 1
3884+
},
3885+
"userData": {
3886+
"type": "string",
3887+
"description": "User specified data. Length should not exceed 16KB.",
3888+
"maxLength": 16384
3889+
},
3890+
"recognitionModel": {
3891+
"$ref": "#/definitions/RecognitionModel"
38573892
}
3858-
},
3859-
"allOf": [
3860-
{
3861-
"$ref": "#/definitions/MetaDataContract"
3862-
}
3863-
]
3893+
}
38643894
},
38653895
"LargeFaceLists": {
38663896
"type": "array",
@@ -3872,7 +3902,8 @@
38723902
"LargePersonGroup": {
38733903
"type": "object",
38743904
"required": [
3875-
"largePersonGroupId"
3905+
"largePersonGroupId",
3906+
"name"
38763907
],
38773908
"description": "Large person group object.",
38783909
"properties": {
@@ -3881,13 +3912,22 @@
38813912
"type": "string",
38823913
"maxLength": 64,
38833914
"pattern": "^[a-z0-9-_]+$"
3915+
},
3916+
"name": {
3917+
"type": "string",
3918+
"description": "User defined name, maximum length is 128.",
3919+
"maxLength": 128,
3920+
"minLength": 1
3921+
},
3922+
"userData": {
3923+
"type": "string",
3924+
"description": "User specified data. Length should not exceed 16KB.",
3925+
"maxLength": 16384
3926+
},
3927+
"recognitionModel": {
3928+
"$ref": "#/definitions/RecognitionModel"
38843929
}
3885-
},
3886-
"allOf": [
3887-
{
3888-
"$ref": "#/definitions/MetaDataContract"
3889-
}
3890-
]
3930+
}
38913931
},
38923932
"LargePersonGroups": {
38933933
"type": "array",

specification/cognitiveservices/data-plane/Face/stable/v1.0/examples/GetPersonGroupPersistedFace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"Content-Type": "application/json",
55
"Ocp-Apim-Subscription-Key": "{API key}",
66
"personGroupId": "abc",
7-
"personId": "foobar",
8-
"persistedFaceId": "asd"
7+
"personId": "B8D802CF-DD8F-4E61-B15C-9E6C5844CCBA",
8+
"persistedFaceId": "015839fb-fbd9-4f79-ace9-7675fc2f1dd9"
99
},
1010
"responses": {
1111
"200": {

0 commit comments

Comments
 (0)