swagger-api / swagger-api/swagger-ui

TypeError: e.split is not a function in v4.12.0

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

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

  • OS: Windows 10 Version 22H2
  • Browser: Chrome
  • Version: 110.0.5481.178
  • Method of installation: Nuget
  • Swagger-UI version: 4.12.0
  • OpenAPI version: OpenAPI 3.0.1

I cannot download .xlsx file via swagger UI. But before update it has worked filne. I updated lib for .net wich uptdated Swagger UI from 3.47.1 to 4.12.0. And now i am getting the error "TypeError: e.split is not a function". I have tried add header "Content-Disposition: attachment" and it doesn't work.

I changed media type from "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" to "application/octet-stream" and it works, but i get unknown type of file as well.

image
image

Any idea what i can do?

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 reproducing the failure in Swagger UI 4.12.0 with an OpenAPI 3.0.1 response using the XLSX media type, then compare the behavior with version 3.47.1. Done means the XLSX response downloads from the UI without the TypeError and retains the correct file type.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.