Description
There are two issues in the EntityREST APIs section in the Swagger UI given under the API Documentation link.
1. The APIs are not sanitized properly when fired from the Swagger API page and always throws an error. It occurs in the following uniqueAttribute related APIs:
DELETE /v2/entity/uniqueAttribute/type/{typeName}
GET /v2/entity/uniqueAttribute/type/{typeName}
PUT /v2/entity/uniqueAttribute/type/{typeName}
DELETE /v2/entity/uniqueAttribute/type/{typeName}/classification/{classificationName}
POST /v2/entity/uniqueAttribute/type/{typeName}/classifications
PUT /v2/entity/uniqueAttribute/type/{typeName}/classifications
GET /v2/entity/uniqueAttribute/type/{typeName}/header
DELETE /v2/entity/uniqueAttribute/type/{typeName}/labels
POST /v2/entity/uniqueAttribute/type/{typeName}/labels
PUT /v2/entity/uniqueAttribute/type/{typeName}/labels
2. It is not possible to pass a valid request to these APIs in the API page:
/v2/entity/uniqueAttribute/type/{typeName}/classification/{classificationName}
/v2/entity/uniqueAttribute/type/{typeName}/classifications
/v2/entity/uniqueAttribute/type/{typeName}/classifications
/v2/entity/uniqueAttribute/type/{typeName}/header
/v2/entity/uniqueAttribute/type/{typeName}/labels
This is because the property attribute and value is improperly added in the wrong position in the header for these APIs when the request is fired from the API page.
The positioning of the key-value pair has to be fixed, and it would be better to have a dedicated field for specifying the property name and value for the uniqueAttribute APIs.