@omer-x/next-openapi-json-generator 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ export declare function directoryExists(dirPath: string): Promise<boolean>;
2
+ export declare function getDirectoryItems(dirPath: string, targetFileName: string): Promise<string[]>;
@@ -0,0 +1,4 @@
1
+ export declare function findAppFolderPath(): Promise<string | null>;
2
+ export declare function getRouteExports(routePath: string, schemas: Record<string, unknown>): Promise<Record<string, {
3
+ apiData?: unknown;
4
+ } | undefined>>;
@@ -0,0 +1,8 @@
1
+ import type { PathsObject } from "@omer-x/openapi-types/paths";
2
+ export type RouteRecord = {
3
+ method: string;
4
+ path: string;
5
+ apiData: object;
6
+ };
7
+ export declare function createRouteRecord(method: string, filePath: string, rootPath: string, apiData: unknown): RouteRecord;
8
+ export declare function bundlePaths(source: RouteRecord[]): PathsObject;
@@ -0,0 +1,3 @@
1
+ import type { SchemaObject } from "@omer-x/openapi-types/schema";
2
+ import type { ZodType } from "zod";
3
+ export declare function bundleSchemas(schemas: Record<string, ZodType>): Record<string, SchemaObject>;
@@ -0,0 +1 @@
1
+ export declare function transpile(rawCode: string): string;
@@ -0,0 +1,3 @@
1
+ import type { OpenApiDocument } from "@omer-x/openapi-types";
2
+ import type { ZodType } from "zod";
3
+ export default function generateOpenApiSpec(schemas: Record<string, ZodType>): Promise<OpenApiDocument>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omer-x/next-openapi-json-generator",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
5
5
  "keywords": [
6
6
  "next.js",