Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for FaceAPI #14556

Merged
merged 3 commits into from
Jun 8, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@
"200": {
"description": "A successful call returns the operation's status.",
"schema": {
"$ref": "#/definitions/AsyncStatus"
"$ref": "#/definitions/OperationStatus"
}
},
"default": {
Expand Down Expand Up @@ -2582,6 +2582,12 @@
"responses": {
"202": {
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/PersonCreationResponse"
}
Expand Down Expand Up @@ -2665,7 +2671,13 @@
],
"responses": {
"202": {
"description": "Success"
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
}
},
"default": {
"description": "Response entity accompanying non-successful responses containing additional details about the error.",
Expand Down Expand Up @@ -2766,6 +2778,12 @@
"responses": {
"202": {
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/EnrollmentPrintResponse"
}
Expand Down Expand Up @@ -2864,7 +2882,13 @@
],
"responses": {
"202": {
"description": "Success"
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
}
},
"default": {
"description": "Response entity accompanying non-successful responses containing additional details about the error.",
Expand Down Expand Up @@ -3029,7 +3053,13 @@
"description": "Success"
},
"202": {
"description": "Success"
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
}
},
"default": {
"description": "Response entity accompanying non-successful responses containing additional details about the error.",
Expand Down Expand Up @@ -3076,7 +3106,13 @@
],
"responses": {
"202": {
"description": "Success"
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
}
},
"default": {
"description": "Response entity accompanying non-successful responses containing additional details about the error.",
Expand Down Expand Up @@ -3149,7 +3185,13 @@
],
"responses": {
"202": {
"description": "Success"
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
}
},
"default": {
"description": "Response entity accompanying non-successful responses containing additional details about the error.",
Expand Down Expand Up @@ -3670,6 +3712,12 @@
"responses": {
"202": {
"description": "Success",
"headers": {
"Operation-Location": {
"description": "Operation location with an operation id used to track the progress of person creation.",
"type": "string"
}
},
"schema": {
"$ref": "#/definitions/EnrollmentPrintResponse"
}
Expand Down Expand Up @@ -4813,6 +4861,26 @@
"minimum": 0,
"maximum": 1
},
"NonNullableNameAndNullableUserDataContract": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the rationale for this name? This seems like it will translate into a poor UX.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly for internal disambiguation, as the struct is only consumed via the "allOf" in MetaDataContract.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the properties in the model are nullable - it has an optional userDataContract field. I would strongly recommend trying to find a better name for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to NameAndUserDataContractForCreation

"type": "object",
"description": "A combination of user defined name and user specified data for the person, largePersonGroup/personGroup, and largeFaceList/faceList.",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "User defined name, maximum length is 128.",
"maxLength": 128,
"minLength": 1
},
"userData": {
"type": "string",
"description": "User specified data. Length should not exceed 16KB.",
"maxLength": 16384
}
}
},
"NameAndUserDataContract": {
"type": "object",
"description": "A combination of user defined name and user specified data for the person, largePersonGroup/personGroup, and largeFaceList/faceList.",
Expand All @@ -4839,7 +4907,7 @@
},
"allOf": [
{
"$ref": "#/definitions/NameAndUserDataContract"
"$ref": "#/definitions/NonNullableNameAndNullableUserDataContract"
}
]
},
Expand Down Expand Up @@ -5014,48 +5082,6 @@
}
}
},
"OperationStatus": {
"type": "object",
"required": [
"status",
"createdTime"
],
"description": "Operation status object. Operation refers to the asynchronous backend task including taking a snapshot and applying a snapshot.",
"properties": {
"status": {
"type": "string",
"description": "Operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field \"message\" to check the failure reason.",
"x-ms-enum": {
"name": "OperationStatusType",
"modelAsString": false
},
"enum": [
"notstarted",
"running",
"succeeded",
"failed"
]
},
"createdTime": {
"type": "string",
"format": "date-time",
"description": "A combined UTC date and time string that describes the time when the operation (take or apply a snapshot) is requested. E.g. 2018-12-25T11:41:02.2331413Z."
},
"lastActionTime": {
"type": "string",
"format": "date-time",
"description": "A combined UTC date and time string that describes the last time the operation (take or apply a snapshot) is actively migrating data. The lastActionTime will keep increasing until the operation finishes. E.g. 2018-12-25T11:51:27.8705696Z."
},
"resourceLocation": {
"type": "string",
"description": "When the operation succeeds successfully, for snapshot taking operation the snapshot id will be included in this field, and for snapshot applying operation, the path to get the target object will be returned in this field."
},
"message": {
"type": "string",
"description": "Show failure message when operation fails (omitted when operation succeeds)."
}
}
},
"PersistedFaceResponse": {
"type": "object",
"properties": {
Expand All @@ -5075,31 +5101,46 @@
"succeeded",
"failed"
],
"type": "string"
"type": "string",
"description": "Operation status: notstarted, running, succeeded, failed. If the operation is requested and waiting to perform, the status is notstarted. If the operation is ongoing in backend, the status is running. Status succeeded means the operation is completed successfully, specifically for snapshot taking operation, it illustrates the snapshot is well taken and ready to apply, and for snapshot applying operation, it presents the target object has finished creating by the snapshot and ready to be used. Status failed is often caused by editing the source object while taking the snapshot or editing the target object while applying the snapshot before completion, see the field \"message\" to check the failure reason.",
"x-ms-enum": {
"name": "OperationStatusType",
"modelAsString": false
}
},
"AsyncStatus": {
"OperationStatus": {
"type": "object",
"required": [
"status",
"createdTime"
],
"description": "Operation status object. Operation refers to an asynchronous backend task.",
"properties": {
"status": {
"$ref": "#/definitions/AsyncOperationStatus"
},
"createdTime": {
"format": "date-time",
"type": "string"
"type": "string",
"description": "A combined UTC date and time string that describes the time when the operation is requested. E.g. 2018-12-25T11:41:02.2331413Z."
},
"lastActionTime": {
"format": "date-time",
"type": "string"
"type": "string",
"description": "A combined UTC date and time string that describes the last time the operation is actively running. The lastActionTime will keep increasing until the operation finishes. E.g. 2018-12-25T11:51:27.8705696Z."
},
"finishedTime": {
"format": "date-time",
"type": "string"
"type": "string",
"description": "A combined UTC date and time string that describes the time when the operation finished. E.g. 2018-12-25T11:41:02.2331413Z."
},
"resourceLocation": {
"type": "string"
"type": "string",
"description": "When the operation succeeds successfully, for snapshot taking operation the snapshot id will be included in this field, and for snapshot applying operation, the path to get the target object will be returned in this field."
},
"message": {
"type": "string"
"type": "string",
"description": "Show failure message when operation fails (omitted when operation succeeds)."
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
},
"responses": {
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
},
"body": {
"persistedFaceId": "6e04c175-219e-42a2-9d26-0e7b790e1ef4",
"recognitionModel": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
},
"responses": {
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
},
"body": {
"persistedFaceId": "6e04c175-219e-42a2-9d26-0e7b790e1ef4",
"recognitionModel": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
},
"responses": {
"200": {},
"202": {}
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
},
"responses": {
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
},
"body": {
"personId": "4caa25ee-3bc6-4e88-adf8-12455ce7aab0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"dynamicPersonGroupId": "abc"
},
"responses": {
"202": {}
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"personId": "25985303-c537-4467-b41d-bdb45cd95ca1"
},
"responses": {
"202": {}
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"persistedFaceId": "62004fa7-1ac0-478e-9d5a-b38f9e7fbc68"
},
"responses": {
"202": {}
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
}
},
"responses": {
"202": {}
"202": {
"header": {
"Operation-Location": "/operations/a63a3bdd-a1db-4d05-87b8-dbad6850062a"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3922,6 +3922,26 @@
"minimum": 0,
"maximum": 1
},
"NonNullableNameAndNullableUserDataContract": {
"type": "object",
"description": "A combination of user defined name and user specified data for the person, largePersonGroup/personGroup, and largeFaceList/faceList.",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "User defined name, maximum length is 128.",
"maxLength": 128,
"minLength": 1
},
"userData": {
"type": "string",
"description": "User specified data. Length should not exceed 16KB.",
"maxLength": 16384
}
}
},
"NameAndUserDataContract": {
"type": "object",
"description": "A combination of user defined name and user specified data for the person, largePersonGroup/personGroup, and largeFaceList/faceList.",
Expand All @@ -3948,7 +3968,7 @@
},
"allOf": [
{
"$ref": "#/definitions/NameAndUserDataContract"
"$ref": "#/definitions/NonNullableNameAndNullableUserDataContract"
}
]
},
Expand Down