Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trpc-labs/onetyped
one schema to rule them all
https://github.com/trpc-labs/onetyped
typebox typescript zod
Last synced: 3 months ago
JSON representation
one schema to rule them all
- Host: GitHub
- URL: https://github.com/trpc-labs/onetyped
- Owner: trpc-labs
- License: mit
- Created: 2022-05-04T04:59:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-05T16:02:49.000Z (almost 2 years ago)
- Last Synced: 2024-06-23T18:00:28.777Z (5 months ago)
- Topics: typebox, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 350 KB
- Stars: 32
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# onetyped
one schema to rule them all
## What is it?
onetyped is a universal way to describe data. I built this to painlessly convert to and from different formats primarily for use in dev tools.
## Why not Zod or (insert validation framework here)?
Zod is great, but its primary use case is for validation and that shows. onetyped is not a validation framework, it's a data description framework. It optimizes for traversing your schema's shape and converting it to different formats and back.
## Integrations
- [Zod](https://github.com/sachinraja/onetyped/tree/main/packages/zod#readme)
- [TypeScript](https://github.com/sachinraja/onetyped/tree/main/packages/typescript#readme)
- [TypeBox](https://github.com/sachinraja/onetyped/tree/main/packages/typebox#readme)## Usage
Use [`@onetyped/core`](https://github.com/sachinraja/onetyped/tree/main/packages/core#readme) to define your onetyped schema. You can also use an integration to derive a schema from a different format. With this schema, you can use an integration to convert to a different format. You can also traverse the nodes of your onetyped schema and do as you wish with the definition (essentially: you can create your own integrations).