swagger-api / swagger-api/swagger-ui

Display static documentation information for multipart properties in OpenAPI 3.0 files

Open
#5,169 26 comments 31 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: rendering cat: user experience needs: UX/design input P2 pull-request-welcome type: enhancement
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Following on from https://github.com/swagger-api/swagger-ui/issues/5164, I am suggesting that for specs with multipart/form-data that we allow the main request body of the spec to show a preview of the payload, rather than leaving it blank (and appearing unrendered) like so:
v3 20 3_multipart
For "Try it now" feature it appears rendered correctly:
v3 20 3_multipart_tryitout
I am proposing something similar to the above pic, even if text areas/drop-downs appear greyed out. Attached following spec as an example which highlights what I thought was an issue, but turns out to be a feature:
v3.20.2_multipart_snippet.txt
Cheers, Rich

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 comparing the static multipart/form-data request-body rendering with the existing “Try it now” rendering, using the attached v3.20.2 multipart specification as the reproduction case. Identify the request-body UI entry point and its related tests, then verify that multipart properties display a non-interactive payload preview instead of appearing blank.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
api, documentation, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.