You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `validate-content` policy validates the size or content of a request or response body against one or more [supported schemas](#schemas-for-content-validation).
17
+
The `validate-content` policy validates the size or content (or both) of a request or response body against one or more [supported schemas](#schemas-for-content-validation).
18
18
19
19
The following table shows the schema formats and request or response content types that the policy supports. Content type values are case insensitive.
20
20
@@ -161,6 +161,74 @@ In the following example, API Management interprets any request as a request wit
161
161
</validate-content>
162
162
```
163
163
164
+
### Complete policy example with content validation
165
+
166
+
The following example shows a complete policy document for a customer order API that uses `validate-content` to validate incoming requests and outgoing responses. The policy validates that customer order payloads conform to the `customer-order-schema` (added to API Management) before forwarding them to the backend, and also validates that the backend's order confirmation matches the expected schema, but only detects issues rather than blocking them.
0 commit comments