Redocly / Redocly/redoc

inconsistent redoc html with request sample type being multipart/form-data

Open
#2,247 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Describe the bug
When the request sample is of type multipart/form-data the redoc html rendered for the spec is not consistent with what gets rendered for application/json

Expected behavior
Rendered html should be consistent or similar

Minimal reproducible OpenAPI snippet(if possible)
sample.txt

Screenshots
json_and_multipart

Additional context
If you check the screen shot, on the left the rendered html for request type application/json has a div with class redoc-json
on the similar lines if you check the right side on the screen shot for multipart/form-data request type redoc does not generate the div with class redoc-json like it did for request of type application-json but when request type is changed from multipart/form-data to application-json it works as expected, the html gets rendered as expected that they are similar, not in consistent

is this a bug or how can it be addressed?

Please let me know, thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by opening the attached sample.txt and comparing the generated HTML for application/json and multipart/form-data, focusing on the redoc-json element described in the report. Reproduce the rendering difference, then verify that both request samples produce consistent HTML behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, react, typescript
Domain
documentation, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.