tonik_util

Runtime utilities for packages generated by Tonik.

This package provides encoding, decoding, and serialization functionality required by Tonik-generated API clients. It includes support for various OpenAPI parameter styles (form, simple, matrix, label, etc.) and handles JSON, form, and simple encoding/decoding.

Usage

Generated packages depend on tonik_util. Add it as a direct dependency when application code imports TonikResult, TonikCancellation, or ServerConfig:

dart pub add tonik_util

Documentation

For complete documentation and usage examples, see the main Tonik package.

Features

  • JSON encoding and decoding with type safety
  • Form encoding and decoding for query parameters and request bodies
  • Simple encoding for path and query parameters
  • Support for various OpenAPI parameter styles
  • DateTime and Date handling with timezone support
  • Backend-neutral results, cancellation, and client configuration
  • Custom exception types for encoding/decoding errors

License

See LICENSE file.

Libraries

tonik_util
Runtime tools for packages generated by Tonik.