#2787·redoc

Download URLs always save file as `openapi.json`

Author: laurence-myersCreated May 25, 2026Updated Sep 15, 2026
LabelsType: Bug

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:

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

Image

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)