@pikku/openapi-parser 0.12.8 → 0.12.10
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 +21 -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 +1 -1
- 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.ts +22 -9
- package/src/zod-codegen.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @pikku/openapi-parser
|
|
2
2
|
|
|
3
|
+
## 0.12.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 02fca80: Fix OpenAPI-to-addon codegen robustness across 2521 real-world specs (77% → 97.8% pass rate).
|
|
8
|
+
|
|
9
|
+
- Cycle detection and depth limits in schema generation to prevent stack overflows
|
|
10
|
+
- Schema partitioning: shared types file for multi-referenced schemas, inline for single-use (fixes crash on large specs)
|
|
11
|
+
- Topological sort with z.lazy() for circular schema references
|
|
12
|
+
- Validate default value types and enum membership before emitting .default()
|
|
13
|
+
- Skip refinements (.min/.max) on incompatible Zod types
|
|
14
|
+
- Sanitize reserved words and digit-leading names in function/type identifiers
|
|
15
|
+
- Deduplicate schema names, imports, and object properties
|
|
16
|
+
- 117 unit tests covering all edge cases
|
|
17
|
+
|
|
18
|
+
## 0.12.9
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- 2ce0733: Fix credential services template variable passing, duplicate body/path param collision, and add credentialOverrides to wireAddon.
|
|
23
|
+
|
|
3
24
|
## 0.12.8
|
|
4
25
|
|
|
5
26
|
### 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 {};
|