import 'package:json_annotation/json_annotation.dart'; part 'schema.g.dart'; @JsonSerializable() class Schema { Schema({ this.ref, this.oneOf, this.anyOf, this.allOf, this.description, this.deprecated, this.type, this.format, this.default_, this.enum_, this.properties, this.required, this.items, this.additionalProperties, }); factory Schema.fromJson(final Map json) => _$SchemaFromJson(json); Map toJson() => _$SchemaToJson(this); @JsonKey(name: r'$ref') final String? ref; final List? oneOf; final List? anyOf; final List? allOf; List? get ofs => oneOf ?? anyOf ?? allOf; final String? description; final bool? deprecated; final String? type; final String? format; @JsonKey(name: 'default') final dynamic default_; @JsonKey(name: 'enum') final List? enum_; final Map? properties; final List? required; final Schema? items; final bool? additionalProperties; }