Skip to content

Scalar preview: replace deprecated 'hideDownloadButton' with 'documentDownloadType: "none"' #29

Description

@char0n

Where it shows up

Every time the API preview opens, Scalar logs:

  @scalar/api-reference@1.44.15
  [DEPRECATED] You're using the deprecated 'hideDownloadButton' attribute.
  Use 'documentDownloadType: "none"' instead.
  Document  not found in configList

Suggested fix

In the Scalar configuration the preview command passes to @scalar/api-reference,
swap the attribute:

  -  hideDownloadButton: true
  +  documentDownloadType: 'none'

The Document not found in configList line (note the double space — empty
document name) usually indicates the preview is initialized before the document
is added to Scalar's configList. Worth re-checking the init order so the
default document isn't asked about during the warm-up frame.

Repro

Open any OpenAPI spec in https://github.com/speclynx/speclynx-editor; the warning
fires on every preview render.

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