@pikku/openapi-parser 0.12.9 → 0.12.11
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/CHANGELOG.md +22 -0
- package/dist/codegen.d.ts +1 -0
- package/dist/codegen.js +586 -66
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/naming.d.ts +7 -0
- package/dist/naming.js +136 -11
- package/dist/openapi-to-zod-schema.d.ts +20 -7
- package/dist/openapi-to-zod-schema.js +245 -33
- package/dist/parse-openapi.js +22 -9
- package/dist/zod-codegen.d.ts +1 -1
- package/dist/zod-codegen.js +1 -1
- package/package.json +2 -2
- package/src/codegen.test.ts +782 -0
- package/src/codegen.ts +726 -74
- package/src/index.ts +2 -3
- package/src/naming.test.ts +260 -0
- package/src/naming.ts +155 -14
- package/src/openapi-to-zod-schema.test.ts +664 -0
- package/src/openapi-to-zod-schema.ts +270 -35
- package/src/parse-openapi.test.ts +23 -8
- package/src/parse-openapi.ts +22 -9
- package/src/zod-codegen.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @pikku/openapi-parser
|
|
2
2
|
|
|
3
|
+
## 0.12.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 41ce2cb: Upgrade to TypeScript 6 and raise the minimum Node.js version to 22.
|
|
8
|
+
|
|
9
|
+
All packages now build against `typescript@^6.0.3` and declare `engines.node >= 22`. Internal tooling (`ts-json-schema-generator`, `zod-to-ts`) was bumped to TypeScript 6-compatible releases.
|
|
10
|
+
|
|
11
|
+
## 0.12.10
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 02fca80: Fix OpenAPI-to-addon codegen robustness across 2521 real-world specs (77% → 97.8% pass rate).
|
|
16
|
+
- Cycle detection and depth limits in schema generation to prevent stack overflows
|
|
17
|
+
- Schema partitioning: shared types file for multi-referenced schemas, inline for single-use (fixes crash on large specs)
|
|
18
|
+
- Topological sort with z.lazy() for circular schema references
|
|
19
|
+
- Validate default value types and enum membership before emitting .default()
|
|
20
|
+
- Skip refinements (.min/.max) on incompatible Zod types
|
|
21
|
+
- Sanitize reserved words and digit-leading names in function/type identifiers
|
|
22
|
+
- Deduplicate schema names, imports, and object properties
|
|
23
|
+
- 117 unit tests covering all edge cases
|
|
24
|
+
|
|
3
25
|
## 0.12.9
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/codegen.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ interface CodegenFlags {
|
|
|
16
16
|
secret: boolean;
|
|
17
17
|
credential?: 'apikey' | 'bearer' | 'oauth2';
|
|
18
18
|
mcp?: boolean;
|
|
19
|
+
camelCase?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export declare function generateAddonFromOpenAPI(spec: ParsedSpec, vars: AddonVars, flags: CodegenFlags): Record<string, string>;
|
|
21
22
|
export {};
|