Azure Apim schema validation is case sensitive

Vikram Sudhini 25 Reputation points

I am currently using validate-content to validate the request body against api spec. when I set action="prevent" and allow-additional-properties="false", it is returns error when I pass property name with a different case in the request body. What can I do to ignore the case?

<validate-content unspecified-content-type-action="detect" max-size="102400" size-exceeded-action="prevent" errors-variable-name="requestBodyValidation"> <content type="application/json" validate-as="json" action="prevent" allow-additional-properties="false" /> </validate-content>

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,536 questions
{count} votes

Accepted answer
  1. MuthuKumaranMurugaachari-MSFT 18,341 Reputation points

    Vikram Sudhini Thanks for posting your question in Microsoft Q&A. The current implementation in Azure API Management does compare the property name in case sensitive way, and unfortunately, there is no config to change this behavior. Interestingly, I found Add support for comparing property names case-insensitively during validation PR merged with this ask in Newtonsoft.Json.Schema - .NET implementation.

    If you are interested in this feature in APIM, I suggest you submitting it via and others with similar interests can upvote it too. This will help our product team prioritize the features and I will also pass your feedback internally.

    I hope this helps and let me know if you have any questions.

    If you found the answer to your question helpful, please take a moment to mark it as Yes for others to benefit from your experience. Or simply add a comment tagging me and would be happy to answer your questions. 

    0 comments No comments

0 additional answers

Sort by: Most helpful