Multipart/form-data block in an API swagger file is throwing error in Api Shield

Hello Team,

We are working on Externalization of API’s through Cloudflare( WAF and Managed rules). While Verifying the API Swagger file through ApiShield, we are facing errors for a block in swagger file.

requestBody:
content:
multipart/form-data:
schema:
type: object
properties:

‘file’ will be the field name in this multipart request

file:
type: string
format: binary
responses:
‘200’:
description: successful.

I received the response from support team.

Hi Tushar,

Thanks for contacting Cloudflare Enterprise Support. My name is Samuel and I will be looking into this ticket for you.
I’m sorry to read that you’re experiencing difficulties.

If I understand your enquiry correctly, it does appear that we do not support multipart/form-data directly.

only the following request body media ranges are supported:

*/*
application/*
application/json

Also, if your Swagger file contain a response phase, it is expected that we through an error because it is a known limitation of API Shield at this stage.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.