UNPKG

@azure-utils/storybooks

Version:

Utils to upload and manage Storybooks via Azure Functions and storage.

53 lines (51 loc) 1.51 kB
import { BuildSchema, BuildUploadSchema, LabelSchema, ProjectCreateSchema, ProjectSchema } from "./projects-DDVy3_77.mjs"; //#region src/utils/openapi-utils.ts const openAPIPaths = {}; function registerOpenAPIPath(path, input) { path ||= "/"; if (!path.startsWith("/")) path = `/${path}`; const value = openAPIPaths[path]; if (value) openAPIPaths[path] = { ...value, ...input }; else openAPIPaths[path] = input; } const openAPITags = { projects: { name: "Projects", description: "A project manages a single Storybook instance across multiple builds." }, builds: { name: "Builds", description: "A build is a specific version of a Storybook instance." }, labels: { name: "Labels", description: "Labels can be used to manage multiple Storybook instances. Labels can be git-branches or Pull Requests." }, storybook: { name: "Storybook", description: "View storybook files for a specific project and build." }, webUI: { name: "Web UI", description: "Serves static files for web-ui." } }; const openAPISchemas = { ProjectSchema, BuildSchema, LabelSchema, BuildUploadSchema, ProjectCreateSchema }; const openAPISecuritySchemas = { functionsKey: { type: "apiKey", in: "header", name: "x-functions-key", description: "Azure Admin Functions key for authentication if authLevel is set to 'admin'." } }; //#endregion export { openAPIPaths, openAPISchemas, openAPISecuritySchemas, openAPITags, registerOpenAPIPath }; //# sourceMappingURL=openapi-utils-CAJ85ahl.mjs.map