Describe the problem to be solved
Encoding object contains a headers map which should be content editable in the redoc UI to modify the header values required for the multipart/form-data request, particularly the ability to add the boundary and filename parameters in the header value. I don't have a premium subscription, so unable to view the try-it out functionality. I'm not sure if this is fully supported.
More importantly, the parts of the multipart body are not visually defined in the UI based on the contentType property defined in encoding, nor can the user view the defined headers for each body part.
form-data is a very common web-based http api functionality and the OpenAPI specification provides sufficient capability to define these apis. Redoc is lacking the ability for users to view the full description of these apis
openapi: 3.1.0
info:
title: an api
version: 1.0.0
servers:
- url: https://api.thing.com/api/v1
paths:
/thing:
post:
summary: a request body with encoding defined per the OAS specification
requestBody:
description: a multpart request body with an encoding object
content:
multipart/form-data:
schema:
type: object
properties:
metadata:
$schema: "https://json-schema.org/draft/2020-12/schema"
title: "An encoding object schema defined as application/json"
type: object
properties:
key1:
type: string
key2:
type: number
required:
- key1
- key2
file:
type: string
format: binary
encoding:
metadata:
contentType: application/json
file:
headers:
content-disposition:
$ref: '#/components/headers/content-disposition'
contentType: application/octet-stream
examples:
formdata_request_body:
$ref: "#/components/examples/formdata-request"
responses:
'201':
description: Created
content:
application/json:
schema:
type: string
components:
headers:
content-disposition:
description: Describes the file name of an entity-body
schema:
type: string
required: true
examples:
formdata-request:
summary: an example form-data request body
externalValue: "./examples/formdata-request.txt"
Describe the problem to be solved Encoding object contains a
headers
map which should be content editable in the redoc UI to modify the header values required for the multipart/form-data request, particularly the ability to add the boundary and filename parameters in the header value. I don't have a premium subscription, so unable to view the try-it out functionality. I'm not sure if this is fully supported.More importantly, the parts of the multipart body are not visually defined in the UI based on the
contentType
property defined inencoding
, nor can the user view the definedheaders
for each body part.form-data is a very common web-based http api functionality and the OpenAPI specification provides sufficient capability to define these apis. Redoc is lacking the ability for users to view the full description of these apis
Describe the solution you'd like
Describe alternatives you've considered none
Additional context