tonik 0.0.2 copy "tonik: ^0.0.2" to clipboard
tonik: ^0.0.2 copied to clipboard

A Dart code generator for OpenAPI 3.0 and 3.1 specifications.


tonik logo

MIT License pub verion pub likes stars on github tests

Tonik #

A Dart code generator for OpenAPI 3.0 and 3.1 specifications.

Motivation #

There are already numerous projects available to generate Dart code from OpenAPI documents. But all lack certain, most often critical features. They might not support integer enums, composable data types (oneOf, anyOf, allOf), fail if you use existing class names in Dart or dependencies (e.g. Response of dio) or handle only success responses.

This package aims to overcome these shortcomings.

Features #

Usage #

Roadmap #

Short term goals #

  • allowReserved support for query parameters
  • format: uri mapping to Dart Uri
  • Add custom Date model in util package to handle format: date properly
  • E2E tests (using imposter?)
  • Full decoding and encoding support for all of, any of and one of
  • Support for x-dart-name, x-dart-type and x-dart-enums
  • Annotate deprecated fields methods and classes.
  • Respect nullable property on schema objects
  • Add doc strings based on fields in the spec to fields, classes and methods

Long term goals #

  • Supporting the not keyword
  • Encoding and decoding of application/x-www-form-urlencoded and text/plain
  • Optionally generating unknown enum case
  • Support for additionalProperties
  • Server Templating support
  • Remove build_runner dependency from all packages
  • Default values
  • Supporting byte and binary formatted strings

Non-goals #

  • Parameter encoding via content, see schema vs content
  • XML de- and encoding
  • Min, Max and multiple validation
  • Pattern validation
  • Remote and URL references
4
likes
0
points
381
downloads

Publisher

verified publisherottenweller.net

Weekly Downloads

A Dart code generator for OpenAPI 3.0 and 3.1 specifications.

Repository (GitHub)
View/report issues

Topics

#openapi #codegeneration #api #rest #swagger

License

unknown (license)

Dependencies

args, logging, tonik_core, tonik_generate, tonik_parse, yaml

More

Packages that depend on tonik