Download URLs always save file as `openapi.json`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Describe the bug
A custom download URL will always attempt to save the file as openapi.json. This is problematic if the download URL is e.g. a YAML file.
Expected behavior
A custom download URL does not force the file to be downloaded with the name openapi.json.
Minimal reproducible OpenAPI snippet(if possible)
Use any OpenAPI YAML.
redocly.yaml:
apis:
example:
root: ./example-original.yaml
openapi:
downloadUrls:
- title: Download OpenAPI spec YAML
url: './example-original.yaml'
Generate the HTML. The download button will save a file called openapi.json, where I would expect example-original.yaml
Screenshots
Additional context
Version: 8.0.4033.34 (Official Build) (arm64)
Chromium Version: 148.0.7778.183
Channel: Official Build
Platform / OS: macOS Version 26.4 (Build 25E246)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Generate the HTML from the provided redocly.yaml using a custom OpenAPI YAML download URL, then inspect the download button behavior. Trace how the custom URL is handled and ensure the downloaded file uses the URL's filename rather than openapi.json, including for example-original.yaml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 70/100