next-openapi-gen 0.0.6 → 0.0.7

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.
@@ -19,6 +19,7 @@ const getPackageManager = async () => {
19
19
  async function createDocsPage() {
20
20
  const paths = ["app", "api-docs"];
21
21
  const srcPath = path.join(process.cwd(), "src");
22
+ const { outputFile } = openapiTemplate;
22
23
  if (fs.existsSync(srcPath)) {
23
24
  paths.unshift("src");
24
25
  }
@@ -37,7 +38,7 @@ const SwaggerUI = dynamic(() => import("swagger-ui-react"), {
37
38
  export default async function ApiDocsPage() {
38
39
  return (
39
40
  <section>
40
- <SwaggerUI url="/swagger.json" />
41
+ <SwaggerUI url="/${outputFile}" />
41
42
  </section>
42
43
  );
43
44
  }
@@ -11,10 +11,10 @@ export default {
11
11
  description: "Local development server",
12
12
  },
13
13
  ],
14
- paths: {},
15
- apiPath: "./src/app/api",
14
+ apiDir: "./src/app/api",
15
+ schemaDir: "./src",
16
16
  docsUrl: "api-docs",
17
17
  ui: "swagger",
18
- outputPath: "./public/swagger.json",
18
+ outputFile: "swagger.json",
19
19
  includeOpenApiRoutes: true,
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-openapi-gen",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Automatically generate OpenAPI documentation for Next.js API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",