spot
ts-json-schema-generator
Our great sponsors
spot | ts-json-schema-generator | |
---|---|---|
2 | 11 | |
525 | 1,270 | |
1.5% | 2.9% | |
8.7 | 9.1 | |
11 days ago | 8 days ago | |
TypeScript | TypeScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
spot
-
Show /r/rust: a Rust implementation of the Realworld demo app spec using Axum and SQLx, written by a co-author of SQLx.
That's obviously not a great situation, so I've started experimenting with airtasker/spot which uses a Typescript-based DSL to generate OpenAPI specs. It's a decent stopgap, although I would love it if we could adapt something like this to Rust using doc-comments and attributes or something so the documentation can live in the code itself.
-
Anyone using decorators, or some other form of inline documentation, to generate an openapi spec file based on a typescript library?
https://github.com/grantila/typeconv/ https://github.com/airtasker/spot https://github.com/vega/ts-json-schema-generator
ts-json-schema-generator
-
Automating API Documentation: A Journey from TypeScript to OpenAPI and Schema Governence with Optic
3. Generate JSON schemas with the ts-json-schema-generator package
-
Is using zod as the primary source of truth for Typescript types sensible/sustainable?
We user ts-json-schema-generator to create the schemas directly from TS types.
-
Transpiling Typescript into Rust
Maybe this vscode extension can work for you. It can turn Json samples into structs. this can help you turn typescript to Json. Maybe you can automate it.
-
Game engine in web - part 2 - data oriented system
Now we have to parse the JSON containing our scene and validate that this JSON is valid according to what we expect. For that we are going to use the JSON Schema along with ts-json-schema-generator to generate said schema automatically and ajv to validate JSON against the generated schema.
-
Anyone using decorators, or some other form of inline documentation, to generate an openapi spec file based on a typescript library?
https://github.com/grantila/typeconv/ https://github.com/airtasker/spot https://github.com/vega/ts-json-schema-generator
- TypeScript runtime type-checking - designed for simple use, through to enforcing API payload schema
-
Testing in production: using JSON Schema for 3rd party API response validation
Most people do not write JSON Schema by hand. Typescript is one of the popular tools: https://github.com/vega/ts-json-schema-generator
-
Types to JSON Schemas
There's ts-json-schema-generator that generates a json schema starting from a ts class/interface. There's also a vscode extension that uses that library if you need to quickly generate a schema: https://marketplace.visualstudio.com/items?itemName=marcoq.vscode-typescript-to-json-schema
What are some alternatives?
zod-to-json-schema - Converts Zod schemas to Json schemas
typebox - Json Schema Type Builder with Static Type Resolution for TypeScript
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
trpc-openapi - OpenAPI support for tRPC 🧩
typescript-json-validator - Automatically generate a validator using JSON Schema and AJV for any TypeScript type.
realworld-axum-sqlx - A Rust implementation of the Realworld demo app spec using Axum and SQLx.
typeconv - Convert between JSON Schema, TypeScript, GraphQL, Open API and SureType
zod - TypeScript-first schema validation with static type inference
docker-rust - The official Docker images for Rust
Snowplow - The enterprise-grade behavioral data engine (web, mobile, server-side, webhooks), running cloud-natively on AWS and GCP
awesome-jsonschema - A curated list of awesome JSON Schema resources, tutorials, tools, and more.