Skip to content

Commit 14f0a32

Browse files
committed
#126: added extra test
1 parent 624af5d commit 14f0a32

File tree

6 files changed

+31
-0
lines changed

6 files changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Person:
2+
path: user/person/
3+
type: object
4+
properties:
5+
firstName:
6+
include_if_null: true
7+
type: String?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// GENERATED CODE - DO NOT MODIFY BY HAND
2+
3+
import 'package:json_annotation/json_annotation.dart';
4+
5+
part 'person.g.dart';
6+
7+
@JsonSerializable(explicitToJson: true)
8+
class Person {
9+
@JsonKey(name: 'firstName')
10+
final String? firstName;
11+
12+
const Person({
13+
this.firstName,
14+
});
15+
16+
factory Person.fromJson(Map<String, dynamic> json) => _$PersonFromJson(json);
17+
18+
Map<String, dynamic> toJson() => _$PersonToJson(this);
19+
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: model_generator_example
2+
3+
model_generator:
4+
config_path: model_generator/config.yaml

0 commit comments

Comments
 (0)