packages/openapi-ts/README.md
Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Use unprefixed schema names from external files unless conflicts exist
Ran `pnpm test:update` to regenerate all test snapshots after implementing conditional schema name prefixing. External schemas now use unprefixed names (e.g., "Foo") instead of prefixed names (e.g., "external_Foo") when there are no naming conflicts.
This affects all OpenAPI test snapshots across 2.0.x, 3.0.x, and 3.1.x versions.
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
- Update type definition to support both Record and bulk callback function
- Implement bulk callback iteration for OpenAPI v2 and v3
- Add comprehensive tests for bulk callback functionality
- Support async operations for both patterns
- All tests passing (61/61)
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
The fixDanglingRefs() function was handling invalid OpenAPI/JSON Schema usage where external files use local-looking refs (e.g., #/components/schemas/SchemaB) to reference schemas in other external files.
Per JSON Schema and OpenAPI specifications, a ref starting with # is a local reference to the current document only. Cross-file references must use proper relative or absolute URIs.
Removed:
- fixDanglingRefs() function from bundle.ts
- Cross-file reference test case
- Test spec files: cross-file-ref-*.json
- Associated snapshot file
Invalid specs should fail with clear errors rather than being silently "fixed". Users with such specs should be asked to use correct syntax like "file2.json#/components/schemas/SchemaB".
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>
Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>