multipart/form-data settings overriding in API Management

Shekhar Nadide 191 Reputation points
2023-08-11T10:40:25.2233333+00:00

APIM removing some of the properties from the specification automatically.

Below one is my request body :

"requestBody": {
                    "description": "Request payload in multipart/form-data format",
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type" : "object",
                                "properties": {
                                    "document": {
                                        "type": "string",
                                        "format" : "binary"
                                    },
                                    "sampleID": {
                                        "type": "string"
                                    },
                                    "notes": {
                                        "type": "string"
                                    }
                                }
                            },
                            "example": {
                                "sampleID": "61399",
                                "notes": "document",
                                "document": "file content"
                            }
                        }
                    }
                },

After saving, APIM removing the binary format and type :

"requestBody": {
                    "description": "Request payload in multipart/form-data format",
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "properties": {
                                    "document": {
                                        "type": "string"
                                    },
                                    "sampleID": {
                                        "type": "string"
                                    },
                                    "notes": {
                                        "type": "string"
                                    }
                                }
                            },
                            "example": {
                                "sampleID": "61399",
                                "notes": "document",
                                "document": "file content"
                            }
                        }
                    }
                },

Could you please check and let me know why this is happening? And workaround for this?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,122 questions
0 comments No comments
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 27,176 Reputation points
    2023-08-11T13:46:56.96+00:00

    Hi Shekhar Nadide Thanks for reaching out. I am able to reproduce the issue inhouse, had a discussion internally and confirmed that it is bug from APIM end and Product Team is currently investigating it. I would revert to you with another update as soon as I hear back from them.

    Let me know if you have any queries or concerns.

    Please "Accept Answer" if the answer is helpful so that it can help others in the community.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.