Skip to content

fix: support empty schemas for Type.Any() and Type.Unknown()#11

Merged
eropple merged 3 commits intomainfrom
ed/schema-any-fix
Feb 3, 2026
Merged

fix: support empty schemas for Type.Any() and Type.Unknown()#11
eropple merged 3 commits intomainfrom
ed/schema-any-fix

Conversation

@eropple
Copy link
Owner

@eropple eropple commented Feb 3, 2026

Summary

  • Fix schema validation to allow empty schemas {} (valid in OAS 3.1 / JSON Schema 2020-12)
  • TypeBox 1.x's Type.Any() and Type.Unknown() both produce {}, which was incorrectly rejected
  • Replace ESLint/Husky tooling with Biome/Lefthook for faster, simpler linting and git hooks

Changes

Bug fix:

  • src/spec-transforms/find.ts: Changed the strict type check to allow empty schemas, returning early instead of throwing

Tooling:

  • Removed: ESLint, Prettier, Husky, lint-staged
  • Added: Biome (linting + formatting), Lefthook (git hooks)
  • Git hooks now run typecheck, lint, and full test suite on both commit and push

Test plan

  • Added tests for Type.Any() and Type.Unknown() in spec-transforms.spec.ts
  • All 74 tests pass
  • TypeScript compilation passes
  • Biome lint passes

Empty schemas are valid in OpenAPI 3.1 (JSON Schema 2020-12) and mean
"any value". TypeBox 1.x's Type.Any() and Type.Unknown() both produce
{}, which was incorrectly rejected by findTaggedSchemasInSchemas.
- Remove ESLint, Prettier, Husky, and lint-staged
- Add Biome for linting and formatting
- Add Lefthook for git hooks (pre-commit and pre-push)
- Hooks run typecheck, lint, and full test suite on both commit and push
- Auto-fix formatting and import organization across codebase
@eropple eropple merged commit fbd6ce6 into main Feb 3, 2026
4 checks passed
@eropple eropple deleted the ed/schema-any-fix branch February 3, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant