Skip to main content

Module schema_helpers

Module schema_helpers 

Source

Functions§

integer_schema
Returns a plain integer schema without the non-standard “format”: “uint” that schemars emits by default for usize/u32 fields.
option_ast_limit_schema
Returns a nullable integer schema for Option<usize> ast_recursion_limit fields. Enforces minimum: 1 because 0 would limit tree-sitter traversal to the root node only, silently returning zero results. Passing 0 is treated as unlimited at runtime; the schema minimum signals to callers that 0 is not a useful value.
option_integer_schema
Returns a nullable integer schema for Option / Option fields.
option_page_size_schema
Returns a nullable integer schema for Option<usize> page_size fields. Enforces minimum: 1 to prevent callers from sending page_size=0, which would cause paginate_slice to make no progress and loop on the same cursor.