What is the purpose of warnings array?

Lalith 161 Reputation points
2021-10-24T12:42:44.9+00:00

when we use azure cognitive services and hit the endpoint you get an empty warnings array in the response body no matter what the service is (Text Analytics, Text Translation etc...). can someone please shed some light on it? what is the use of it with few examples maybe? thank you.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,341 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,841 Reputation points Microsoft Employee
    2021-10-25T12:51:32.547+00:00

    Ok. These are errors or warning while processing the request. You can take a look at the swagger document for details about any field used in request and response. You can also download them from the REST API page from the top right corner.

    143466-image.png

            "warnings": {  
              "type": "array",  
              "description": "Warnings encountered while processing document.",  
              "items": {  
                "$ref": "#/definitions/TextAnalyticsWarning"  
              }  
            }  
      
    

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    2 people found this answer helpful.