schema_builder 0.2.0 copy "schema_builder: ^0.2.0" to clipboard
schema_builder: ^0.2.0 copied to clipboard

Generate JSON schemas from Dart classes with ease! Use annotations to define schemas, customize fields, and integrate with APIs.

example/main.dart

import 'package:schema_builder/json_schema.dart';

@JsonSchema(
  title: 'Person',
  description: 'A person with a name and age.',
)
class Person {
  @SchemaValue(
    title: 'Full Name',
    description: 'The full name of the person.',
  )
  final String name;

  @SchemaValue(
    title: 'Age',
    description: 'The age of the person.',
  )
  final int age;

  @SchemaValue(ignore: true) // This field will be ignored in the schema
  final String secret;

  Person({
    required this.name,
    required this.age,
    required this.secret,
  });
}
1
likes
0
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

Generate JSON schemas from Dart classes with ease! Use annotations to define schemas, customize fields, and integrate with APIs.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, build, build_config, flutter, glob, json_annotation, source_gen

More

Packages that depend on schema_builder