I believe your problem is this line allow-additional-properties="false"

allow-additional-properties Boolean. For a JSON schema, specifies whether to implement a runtime override of the additionalProperties value configured in the schema:

  • true: allow additional properties in the request or response body, even if the JSON schema's additionalProperties field is configured to not allow additional properties.
  • false: do not allow additional properties in the request or response body, even if the JSON schema's additionalProperties field is configured to allow additional properties.

If the attribute isn't specified, the policy validates additional properties according to configuration of the additionalProperties field in the schema.

source: https://learn.microsoft.com/en-us/azure/api-management/validate-content-policy#content-attributes

This property overrides your JSON Schema. Even though your allOf definition does not use additionalProperties: false, apim will inject this constraint to the root schema, which translates to

{
  "type": "object",
  "additionalProperties": false,
  "allOf": [{...}, {...}]
}

This schema doesn't allow any properties to be validated because no properties are defined at the root.

The only valid schemas in this situation would be

{}

OR

true

There are a few ways to tackle this but IMHO, the best option is to use the schema definition, rather than the apim attribute because you're introducing constraints on the schema where they are not defined. If someone else were to review the schema, they would run into the same issue you are having.

This is where it may get tricky for you depending on which version of JSON Schema is supported in APIM and which version you are using.

Draft-04 - 07 requires some massaging to the schema, in most circumstances, to achieve the desired behavior of using allOf with additionalProperties": false

  • turn off the content attribute in your apim validation
  • add all properties of the first depth of subschemas to the root with an empty schema. This will allow the validator to recognize those properties at the root level to satisfy additionalProperties
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "messages": {},
        "temperature": {},
        "top_p": {},
        "stop": {},
        "max_tokens": {},
        "presence_penalty": {},
        "frequency_penalty": {},
        "logit_bias": {},
        "user": { },
        "n": { },
        "function_call": { },
        "functions": { }
    },
    "allOf": [
        {
            "type": "object",
            "properties": {
                "temperature": {},
                "top_p": {},
                "stop": {},
                "max_tokens": {},
                "presence_penalty": {},
                "frequency_penalty": {},
                "logit_bias": {},
                "user": {}
            }
        },
        {
            "type": "object",
            "properties": {
                "messages": {},
                "n": {},
                "function_call": {},
                "functions": {}
            }
        }
    ]
}

If you're using JSON Schema draft 2019-09 or later, you can use the newer keyword unevaluatedProperties which performs the behavior described above, automatically.

{
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "type": "object",
    "unevaluatedProperties": false,
    "allOf": [
        {
            "type": "object",
            "properties": {
                "temperature": {},
                "top_p": {},
                "stop": {},
                "max_tokens": {},
                "presence_penalty": {},
                "frequency_penalty": {},
                "logit_bias": {},
                "user": {}
            }
        },
        {
            "type": "object",
            "properties": {
                "messages": {},
                "n": {},
                "function_call": {},
                "functions": {}
            }
        }
    ]
}

This example fails:

{
    "messages": [
        {
            "role": "user", 
            "content": "Find beachfront hotels in San Diego for less than $300 a month with free breakfast."
        }
    ],
    "stackOverflow": -1
}
Invalid

# fails schema constraint https://json-schema.hyperjump.io/schema#/unevaluatedProperties

#/stackOverflow fails schema constraint https://json-schema.hyperjump.io/schema#/unevaluatedProperties
Answer from Jeremy Fiel on Stack Overflow
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › foundry › openai › reference
Azure OpenAI in Microsoft Foundry Models REST API reference - Microsoft Foundry | Microsoft Learn
February 27, 2026 - Learn how to use Azure OpenAI's REST API. In this article, you learn about authorization options, how to structure a request and receive a response.
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › api-management › azure-openai-api-from-specification
Import an Azure OpenAI API as a REST API - Azure API Management | Microsoft Learn
December 23, 2025 - Download the OpenAPI specification for the Azure OpenAI REST API, such as the 2024-10-21 GA version. In a text editor, open the specification file that you downloaded. In the servers element in the specification, substitute the name of your ...
Top answer
1 of 1
2

I believe your problem is this line allow-additional-properties="false"

allow-additional-properties Boolean. For a JSON schema, specifies whether to implement a runtime override of the additionalProperties value configured in the schema:

  • true: allow additional properties in the request or response body, even if the JSON schema's additionalProperties field is configured to not allow additional properties.
  • false: do not allow additional properties in the request or response body, even if the JSON schema's additionalProperties field is configured to allow additional properties.

If the attribute isn't specified, the policy validates additional properties according to configuration of the additionalProperties field in the schema.

source: https://learn.microsoft.com/en-us/azure/api-management/validate-content-policy#content-attributes

This property overrides your JSON Schema. Even though your allOf definition does not use additionalProperties: false, apim will inject this constraint to the root schema, which translates to

{
  "type": "object",
  "additionalProperties": false,
  "allOf": [{...}, {...}]
}

This schema doesn't allow any properties to be validated because no properties are defined at the root.

The only valid schemas in this situation would be

{}

OR

true

There are a few ways to tackle this but IMHO, the best option is to use the schema definition, rather than the apim attribute because you're introducing constraints on the schema where they are not defined. If someone else were to review the schema, they would run into the same issue you are having.

This is where it may get tricky for you depending on which version of JSON Schema is supported in APIM and which version you are using.

Draft-04 - 07 requires some massaging to the schema, in most circumstances, to achieve the desired behavior of using allOf with additionalProperties": false

  • turn off the content attribute in your apim validation
  • add all properties of the first depth of subschemas to the root with an empty schema. This will allow the validator to recognize those properties at the root level to satisfy additionalProperties
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "messages": {},
        "temperature": {},
        "top_p": {},
        "stop": {},
        "max_tokens": {},
        "presence_penalty": {},
        "frequency_penalty": {},
        "logit_bias": {},
        "user": { },
        "n": { },
        "function_call": { },
        "functions": { }
    },
    "allOf": [
        {
            "type": "object",
            "properties": {
                "temperature": {},
                "top_p": {},
                "stop": {},
                "max_tokens": {},
                "presence_penalty": {},
                "frequency_penalty": {},
                "logit_bias": {},
                "user": {}
            }
        },
        {
            "type": "object",
            "properties": {
                "messages": {},
                "n": {},
                "function_call": {},
                "functions": {}
            }
        }
    ]
}

If you're using JSON Schema draft 2019-09 or later, you can use the newer keyword unevaluatedProperties which performs the behavior described above, automatically.

{
    "$schema": "https://json-schema.org/draft/2019-09/schema",
    "type": "object",
    "unevaluatedProperties": false,
    "allOf": [
        {
            "type": "object",
            "properties": {
                "temperature": {},
                "top_p": {},
                "stop": {},
                "max_tokens": {},
                "presence_penalty": {},
                "frequency_penalty": {},
                "logit_bias": {},
                "user": {}
            }
        },
        {
            "type": "object",
            "properties": {
                "messages": {},
                "n": {},
                "function_call": {},
                "functions": {}
            }
        }
    ]
}

This example fails:

{
    "messages": [
        {
            "role": "user", 
            "content": "Find beachfront hotels in San Diego for less than $300 a month with free breakfast."
        }
    ],
    "stackOverflow": -1
}
Invalid

# fails schema constraint https://json-schema.hyperjump.io/schema#/unevaluatedProperties

#/stackOverflow fails schema constraint https://json-schema.hyperjump.io/schema#/unevaluatedProperties
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 2247073 › azure-open-ai-openapi-specification-2025-03-01-pre
Azure Open AI OpenAPI specification 2025-03-01-preview has structural error - Microsoft Q&A
April 11, 2025 - Unfortunately, many tools such as Swagger Editor and Azure API Management currently do not fully support OpenAPI 3.1.0, which is why you're seeing structural validation errors and issues with importing the spec. At the moment, the best workaround is to use an earlier version of the Azure OpenAI spec, which is based on OpenAPI 3.0.x and is compatible with these tools.
🌐
Medium
medium.com › @sivasais22 › building-a-chatbot-with-azure-openai-flask-and-swagger-ui-a-step-by-step-guide-485ed52f5689
Building a Chatbot with Azure OpenAI, Flask and Swagger UI: A Step-by-Step Guide | by Sivasai | Medium
October 27, 2023 - If you’re looking to create a chatbot with Azure OpenAI’s “Bring Your Own Data” (BYOD) feature, you’re in the right place. In this tutorial, we’ll walk you through the process of setting up a Flask web application with Swagger UI for integrating Azure OpenAI’s GPT-3.5 Turbo (formerly known as GPT-3) to build your chatbot.
🌐
GitHub
github.com › Azure › azure-rest-api-specs › blob › main › specification › cognitiveservices › data-plane › AzureOpenAI › inference › stable › 2022-12-01 › inference.json
azure-rest-api-specs/specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2022-12-01/inference.json at main · Azure/azure-rest-api-specs
December 1, 2022 - "title": "Azure OpenAI Service API", "description": "Azure OpenAI APIs for completions and search", "version": "2022-12-01" }, "servers": [ { "url": "https://{endpoint}/openai", "variables": { "endpoint": { "default": "your-resource-name.openai.azure.com" } } } ], "security": [ { "bearer": [ "api.read" ] }, { "apiKey": [] } ], "paths": { "/deployments/{deployment-id}/completions": { "post": { "summary": "Creates a completion for the provided prompt, parameters and
Author   Azure
🌐
Ultima
ultima.com › home › industry news › define and build your azure api app with swagger-openapi
Azure API Development with OpenAPI (Swagger): Complete Tutorial
October 2, 2025 - Design & build Azure APIs using OpenAPI (Swagger) specification. Tutorial covering API definition, code generation & deployment to Azure App Service.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Azure OpenAI Test Case Generator - Visual Studio Marketplace
October 9, 2025 - Extension for Visual Studio Code - Generate intelligent test cases from Azure DevOps work items and Swagger API specifications using Azure OpenAI with comprehensive coverage analysis
🌐
Microsoft Learn
learn.microsoft.com › en-us › agent-framework › integrations › a2a
A2A Integration | Microsoft Learn
3 weeks ago - The sample includes OpenAPI and Swagger dependencies to simplify testing. Create a new ASP.NET Core Web API project or use an existing one. ... # Hosting.A2A.AspNetCore for A2A protocol integration dotnet add package Microsoft.Agents.AI.Hosting.A2A.AspNetCore --prerelease # Libraries to connect to Microsoft Foundry dotnet add package Azure.AI.Projects --prerelease dotnet add package Azure.Identity dotnet add package Microsoft.Agents.AI.Foundry --prerelease # Swagger to test app dotnet add package Microsoft.AspNetCore.OpenApi dotnet add package Swashbuckle.AspNetCore
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › foundry › openai › how-to › working-with-models
Azure OpenAI in Microsoft Foundry Models working with models - Microsoft Foundry | Microsoft Learn
February 27, 2026 - You can get a list of models that are available for both inference and fine-tuning by your Azure OpenAI resource by using the Models List API.
🌐
Microsoft Learn
learn.microsoft.com › en-us › agent-framework › integrations › openai-endpoints
OpenAI Integration | Microsoft Learn
3 weeks ago - # Hosting.A2A.AspNetCore for OpenAI ChatCompletions/Responses protocol(s) integration dotnet add package Microsoft.Agents.AI.Hosting.OpenAI --prerelease # Libraries to connect to Azure OpenAI dotnet add package Azure.AI.OpenAI --prerelease dotnet add package Azure.Identity dotnet add package Microsoft.Extensions.AI dotnet add package Microsoft.Extensions.AI.OpenAI --prerelease # Swagger to test app dotnet add package Microsoft.AspNetCore.OpenApi dotnet add package Swashbuckle.AspNetCore ·
🌐
Latenode
community.latenode.com › other questions › openai
Azure API Management OpenAI Swagger Validation Error with Vision Requests - OpenAI - Latenode Official Community
July 17, 2025 - I’m encountering issues with Azure API Management while trying to validate vision requests for OpenAI. After importing the Azure OpenAI swagger specification into APIM, I set up JSON validation by using the validate-cont…
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › ai-services › openai › reference
Azure OpenAI in Microsoft Foundry Models REST API reference - Azure OpenAI | Microsoft Learn
Learn how to use Azure OpenAI's REST API. In this article, you learn about authorization options, how to structure a request and receive a response.
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › api-management › import-api-from-oas
Import an OpenAPI specification to Azure API Management | Microsoft Learn
February 6, 2026 - # API Management service-specific details APIMServiceName="apim-hello-world" ResourceGroupName="myResourceGroup" # API-specific details APIId="swagger-petstore" APIPath="store" SpecificationFormat="OpenAPI" SpecificationURL="https://petstore3.swagger.io/api/v3/openapi.json" # Import API az apim api import --path $APIPath --resource-group $ResourceGroupName \ --service-name $APIMServiceName --api-id $APIId \ --specification-format $SpecificationFormat --specification-url $SpecificationURL · After you import the API, you can update the settings by using the az apim api update command. The following example uses the Import-AzApiManagementApi Azure PowerShell cmdlet to import an OpenAPI specification from the specified URL to an API Management instance named apim-hello-world.
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › ai-services › openai
Azure OpenAI documentation - Quickstarts, Tutorials, API ...
Azure OpenAI in Foundry Models · Deployment types · Get started with DeepSeek-R1 · Learn how to fine-tune models · Orchestrate and host AI agents to automate and execute business processes · Create a custom AI agent using Agent Service · Azure AI app template for agents ·
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › foundry › foundry-models › concepts › models-sold-directly-by-azure
Foundry Models sold directly by Azure - Microsoft Foundry | Microsoft Learn
1 week ago - Models sold directly by Azure include all Azure OpenAI models and specific, selected models from top providers. These models are billed through your Azure subscription, covered by Azure service-level agreements, and supported by Microsoft.
🌐
Openai
developers.openai.com › api › docs › libraries
Libraries | OpenAI API
Microsoft’s Azure team maintains libraries that are compatible with both the OpenAI API and Azure OpenAI services.
🌐
Microsoft Learn
learn.microsoft.com › en-us › azure › ai-services › speech-service › swagger-documentation
Generate a REST API client library - Speech service - Foundry Tools | Microsoft Learn
February 27, 2026 - The Speech service offers a Swagger specification to interact with a handful of REST APIs used to import data, create models, test model accuracy, create custom endpoints, queue up batch transcriptions, and manage subscriptions.