Thanks to visit codestin.com
Credit goes to effect-ts.github.io

Skip to main content Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

HttpApiScalar.ts overview

Since v1.0.0


Exports Grouped by Category


layers

layer

Signature

declare const layer: (options?: {
  readonly path?: `/${string}` | undefined
  readonly scalar?: ScalarConfig
}) => Layer.Layer<never, never, Api>

Source

Since v1.0.0

layerCdn

Signature

declare const layerCdn: (options?: {
  readonly path?: `/${string}` | undefined
  readonly scalar?: ScalarConfig
  readonly version?: string | undefined
}) => Layer.Layer<never, never, Api>

Source

Since v1.0.0

layerHttpLayerRouter

Signature

declare const layerHttpLayerRouter: (options: {
  readonly api: HttpApi.HttpApi.Any
  readonly path: `/${string}`
  readonly scalar?: ScalarConfig
}) => Layer.Layer<never, never, HttpLayerRouter.HttpRouter>

Source

Since v1.0.0

layerHttpLayerRouterCdn

Signature

declare const layerHttpLayerRouterCdn: (options: {
  readonly api: HttpApi.HttpApi.Any
  readonly path: `/${string}`
  readonly version?: string | undefined
  readonly scalar?: ScalarConfig
}) => Layer.Layer<never, never, HttpLayerRouter.HttpRouter>

Source

Since v1.0.0

model

ScalarConfig (type alias)

See

  • https://github.com/scalar/scalar/blob/main/documentation/configuration.md

Signature

type ScalarConfig = {
  /** A string to use one of the color presets */
  theme?: ScalarThemeId
  /** The layout to use for the references */
  layout?: "modern" | "classic"
  /** URL to a request proxy for the API client */
  proxyUrl?: string
  /** Whether to show the sidebar */
  showSidebar?: boolean
  /**
   * Whether to show models in the sidebar, search, and content.
   *
   * Default: `false`
   */
  hideModels?: boolean
  /**
   * Whether to show the “Test Request” button
   *
   * Default: `false`
   */
  hideTestRequestButton?: boolean
  /**
   * Whether to show the sidebar search bar
   *
   * Default: `false`
   */
  hideSearch?: boolean
  /** Whether dark mode is on or off initially (light mode) */
  darkMode?: boolean
  /** forceDarkModeState makes it always this state no matter what*/
  forceDarkModeState?: "dark" | "light"
  /** Whether to show the dark mode toggle */
  hideDarkModeToggle?: boolean
  /**
   * Path to a favicon image
   *
   * Default: `undefined`
   * Example: '/favicon.svg'
   */
  favicon?: string
  /** Custom CSS to be added to the page */
  customCss?: string
  /**
   * The baseServerURL is used when the spec servers are relative paths and we are using SSR.
   * On the client we can grab the window.location.origin but on the server we need
   * to use this prop.
   *
   * Default: `undefined`
   * Example: 'http://localhost:3000'
   */
  baseServerURL?: string
  /**
   * We’re using Inter and JetBrains Mono as the default fonts. If you want to use your own fonts, set this to false.
   *
   * Default: `true`
   */
  withDefaultFonts?: boolean
  /**
   * By default we only open the relevant tag based on the url, however if you want all the tags open by default then set this configuration option :)
   *
   * Default: `false`
   */
  defaultOpenAllTags?: boolean
}

Source

Since v1.0.0

ScalarThemeId (type alias)

Signature

type ScalarThemeId =
  | "alternate"
  | "default"
  | "moon"
  | "purple"
  | "solarized"
  | "bluePlanet"
  | "saturn"
  | "kepler"
  | "mars"
  | "deepSpace"
  | "laserwave"
  | "none"

Source

Since v1.0.0