suretype icon indicating copy to clipboard operation
suretype copied to clipboard

Typesafe JSON (Schema) validator

Results 20 suretype issues
Sort by recently updated
recently updated
newest added

Hi, thanks for this great project! Is there an api documentation available anywhere?

Say I have: ``` const paginatedListSchema = v.object({ limit: v.number().integer().gt(0).default(10), skip: v.number().integer().gte(0).default(0), }); ``` And I want to have a schema that extends it?, something like: ``` const newSchema =...

The project I'm working on is currently on Joi and Suretype looks like a very promising improvement, as it would save us from manually writing the TS interfaces, will improve...

Hi! I think it currently isn't possible to create the following schema: ```json { "type": "object", "properties": { "x": { "type": "integer" } }, "required": [ "x" ], "not": {...

I have encountered a problem in which an object with keys '1', '2', etc. and values of one type does not pass validation but the error message is wrong. MySchema:...

Hi, it seems the library currently does not support `'uuid'` as format, even though it is a valid string format [in the current standard](https://json-schema.org/draft/2020-12/json-schema-validation.html). I'm aware that this library tries...

Hi there! Currently I have to manually do this: ```ts export const assertPostMetaData: ( data: unknown ) => asserts data is PostMetaData = compile(postMetaDataSchema, { ensure: true, }); ``` Would...

The `defaults` option is not working correctly. In the following example, I have two approaches, both of which are faulty. ### should fill in defaults with require In this case,...

While not explicitly supported, the following code works: ``` v.string().format('uuid' as Formats) ``` Could you please add it to the official list of supported string formats?

I was wondering about a use-case I have typescript and I want to generate JSON-schema (without creating `suretype` types). If there can be a utility function (ie: `tsToJsonSchema()`) that can...