Skip to content

Possible improvements to allow-spec-file-download? #578

@ngnpope

Description

@ngnpope

I tried allow-spec-file-download and it adds two buttons - one to download and another to open in a new tab.

I noticed the following things:

  • When spec-url points to a YAML file both buttons trigger a download of a YAML file.
  • When spec-url points to a JSON file the buttons behave as expected.
  • Irrespective of the format, the name of the downloaded file is always openapi-spec.

It would be nice if:

  • The visibility of the view button was controlled by a separate setting - maybe allow-spec-file-view
    • Or perhaps it could just be hidden if spec-url pointed to a YAML file.
  • There was the option to download in both JSON and YAML format.
  • The downloaded file had the appropriate extension: .json or .yaml.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions