I am trying to set up XML validation in Azure api management policy. I have the following policy set up. The purchase order schemas is there in the schemas section:
<inbound>
<base />
<validate-content unspecified-content-type-action="detect" max-size="1048576" size-exceeded-action="ignore">
<content type="application/xml" validate-as="xml" action="prevent" schema-id="PurchaseOrder" />
</validate-content>
</inbound>
I am testing out the api. In the header I have Content-Type: application/xml. The body is raw. Screenshot below:

<?xml version="1.0" encoding="UTF-8"?>
<PurchaseOrder xmlns="http://tempuri.org/PurchaseOrderSchema.xsd">
<ShipTo country="US">
<name>John Smith</name>
<street>123 Maple Street</street>
<city>Springfield</city>
<state>IL</state>
<zip>62704</zip>
</ShipTo>
<ShipTo country="US">
<name>Jane Doe</name>
<street>456 Oak Avenue</street>
<city>Chicago</city>
<state>IL</state>
<zip>60616</zip>
</ShipTo>
<BillTo country="US">
<name>Acme Corp</name>
<street>789 Pine Road</street>
<city>Naperville</city>
<state>IL</state>
<zip>60540</zip>
</BillTo>
</PurchaseOrder>
I get the following saying that:
Unspecified content type application/xml is not allowed.
I have imported the schemas for purchaseOrder in the apim schemas section:
{
"name": "application/xml",
"type": "RequestBody",
"validationRule": "Unspecified",
"details": "Unspecified content type application/xml is not allowed.",
"action": "Detected"
}
However, I do see the headers content type xml in the trace inspection.

