Skip to content

Conversation

Ackuq
Copy link

@Ackuq Ackuq commented Aug 17, 2025

Changes

This updates the Scalar UI integration to follow the default implementation from Scalar: https://guides.scalar.com/scalar/scalar-api-references/integrations/htmljs.

This also adds an optional configuration option when generating the UI, to e.g. customize theme or proxy.

How to Review

Simplest way to try this out is to locally link with a bare-bones service, e.g. an Express service and try out the options.

import express from "express";
import { generateScalarUI } from "openapi-metadata/ui";

const app = express();

app.get("/scalar", async (_req, res) => {
  const ui = generateScalarUI(
    "https://petstore3.swagger.io/api/v3/openapi.json",
    {
      theme: "kepler",
      hideModels: true,
      hideDarkModeToggle: true,
    }
  );
  res.send(ui);
});

app.listen("3000", () => {
  console.log(`Server is running on port 3000`);
});

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

@Ackuq Ackuq requested a review from a team as a code owner August 17, 2025 11:10
@Ackuq Ackuq requested a review from gzm0 August 17, 2025 11:10
Copy link

changeset-bot bot commented Aug 17, 2025

🦋 Changeset detected

Latest commit: fb57390

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-metadata Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Aug 17, 2025

Deploy Preview for openapi-ts failed.

Name Link
🔨 Latest commit 8ba731d
🔍 Latest deploy log https://app.netlify.com/projects/openapi-ts/deploys/68a1b9b5a823080008d3f7dd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant