next-openapi-gen 1.0.2 → 1.0.4

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.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mariusz Winnik
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -17,6 +17,7 @@ Generate OpenAPI `3.0`, `3.1`, and `3.2` from the routes and schemas you already
17
17
  - Target `3.0`, `3.1`, or `3.2` from the same route metadata with version-aware finalization.
18
18
  - Ship interactive docs quickly with built-in UI scaffolding for Scalar, Swagger, Redoc, Stoplight Elements, or RapiDoc.
19
19
  - Fall back on checker-assisted App Router response inference when explicit `@response` tags are missing.
20
+ - Keep richer Zod 4 and TypeScript output in modern targets with selective runtime-assisted Zod export and checker fallback for advanced type constructs.
20
21
 
21
22
  ## Quick start
22
23
 
@@ -159,6 +160,8 @@ See [apps/next-app-mixed-schemas](./apps/next-app-mixed-schemas) for a full work
159
160
  For more adoption patterns, see
160
161
  [docs/workflows-and-integrations.md](./docs/workflows-and-integrations.md).
161
162
 
163
+ When you target modern OpenAPI output, the Zod path can also split request and response component refs when a supported Zod 4 schema emits different input and output JSON Schema shapes, while the TypeScript path can use selective checker fallback for mapped, conditional, template-literal, and import-based named types.
164
+
162
165
  ### Generate docs from Drizzle schemas
163
166
 
164
167
  `next-openapi-gen` works well with `drizzle-zod`, so your database schema, validation, and API docs can share the same source of truth.
package/bin/cli.mjs ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "node:fs";
4
+
5
+ const cliModuleUrl = new URL("../dist/cli.js", import.meta.url);
6
+
7
+ if (!fs.existsSync(cliModuleUrl)) {
8
+ process.stderr.write(
9
+ "The next-openapi-gen CLI has not been built yet. Run `pnpm exec turbo run build --filter=next-openapi-gen...` first.\n",
10
+ );
11
+ process.exit(1);
12
+ }
13
+
14
+ await import(cliModuleUrl.href);
package/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-openapi-gen",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Automatically generate OpenAPI 3.0, 3.1, and 3.2 documentation from Next.js projects, with support for Zod schemas, TypeScript types, and reusable OpenAPI fragments.",
5
5
  "keywords": [
6
6
  "api",
@@ -23,10 +23,11 @@
23
23
  "url": "git+ssh://git@github.com/tazo90/next-openapi-gen.git"
24
24
  },
25
25
  "bin": {
26
- "next-openapi-gen": "./dist/cli.js",
27
- "openapi-gen": "./dist/cli.js"
26
+ "next-openapi-gen": "./bin/cli.mjs",
27
+ "openapi-gen": "./bin/cli.mjs"
28
28
  },
29
29
  "files": [
30
+ "bin",
30
31
  "dist",
31
32
  "templates",
32
33
  "README.md"
@@ -71,8 +72,8 @@
71
72
  "@types/node": "^25.5.0",
72
73
  "conventional-changelog-cli": "^5.0.0",
73
74
  "np": "^11.0.2",
74
- "oxfmt": "^0.42.0",
75
- "oxlint": "^1.57.0",
75
+ "oxfmt": "^0.43.0",
76
+ "oxlint": "^1.58.0",
76
77
  "tsup": "^8.5.1"
77
78
  },
78
79
  "engines": {