spectra library

Spectra - Transform Dart data classes into JSON Schema, OpenAPI, and Protobuf specifications.

A powerful code generator that extracts type information from your Dart classes and generates schema definitions in multiple formats.

Classes

ArraySpec
Specification for array/list types.
BoolSpec
Specification for boolean types.
Converter
Applies a custom converter to a field for schema generation.
EnumSpec
Specification for enumeration types.
EnumValueSpec
Specification for a single enum value.
Field
Customizes schema generation for a specific field or parameter.
Ignore
Excludes a field from schema generation.
MapSpec
Specification for map/dictionary types.
NumberSpec
Specification for numeric types (integer and floating-point).
ObjectSpec
Specification for object types with named properties.
PropertySpec
Specification for an object property.
RefSpec
Specification for a reference to another type.
SpecConverter
Custom schema converter for complex types.
Spectra
Marks a class for schema generation.
SpectraOutput
Marks a static getter as an output target for generated schema.
StringSpec
Specification for string types.
TypeSpec
Base class for all type specifications.
UnionSpec
Specification for union/sealed class types.

Enums

SpectraFormat
Output format options for schema generation.
StringFormat
String format hints for schema generation.

Constants

ignore → const Ignore
Convenience constant for Ignore.
spectra → const Spectra
Convenience constant for Spectra with default options.
spectraOutput → const SpectraOutput
Convenience constant for SpectraOutput.