(
api: HttpApi.HttpApi<Id, Groups>,
options?: {
readonly path?: `/${string}` | undefined
readonly scalar?: ScalarConfig
} | undefined
)
| 216 | HttpRouter.use(Effect.fnUntraced(function*(router) { |
| 217 | const handler = makeHandler({ |
| 218 | api, |
| 219 | source: { |
| 220 | _tag: "Inline", |
| 221 | source: internal.javascript |
| 222 | }, |
| 223 | scalar: options?.scalar |
| 224 | }) |
| 225 | yield* router.add("GET", options?.path ?? "/docs", handler) |
| 226 | })) |
| 227 | |
| 228 | /** |
| 229 | * Mounts a Scalar API reference page for an `HttpApi` that loads Scalar from jsDelivr. |
| 230 | * |
| 231 | * **Details** |
| 232 | * |
| 233 | * The route serves the OpenAPI specification generated from the API at the |
| 234 | * configured path, defaulting to `/docs`; `version` selects the Scalar package |
| 235 | * version loaded from the CDN. |
| 236 | * |
| 237 | * @category layers |
| 238 | * @since 4.0.0 |
nothing calls this directly
no test coverage detected
searching dependent graphs…