Adapted from #3579 by @gorkem-bwl. The openapi/registry, helpers, and per-resource routes/* files are largely their work; this commit relocates the directory out of src/ so the build-time generator code is not emitted into dist/, and shifts spec generation from runtime to a build step. Co-authored-by: gorkem-bwl <gorkem.cetin@bluewavelabs.ca>
13 lines
310 B
TypeScript
13 lines
310 B
TypeScript
import { OpenAPIRegistry, extendZodWithOpenApi } from "@asteasolutions/zod-to-openapi";
|
|
import { z } from "zod";
|
|
|
|
extendZodWithOpenApi(z);
|
|
|
|
export const registry = new OpenAPIRegistry();
|
|
|
|
registry.registerComponent("securitySchemes", "bearerAuth", {
|
|
type: "http",
|
|
scheme: "bearer",
|
|
bearerFormat: "JWT",
|
|
});
|