diff --git a/test/core/definitions/serialization_test.dart b/test/core/definitions/serialization_test.dart index d1774112..c9c108bd 100644 --- a/test/core/definitions/serialization_test.dart +++ b/test/core/definitions/serialization_test.dart @@ -165,5 +165,29 @@ void main() { action.toJson(), ); }); + + test("DataSchemas", () async { + final dataSchemaJson = { + "@type": [ + "foo", + "bar", + ], + "properties": { + "baz": { + "type": "string", + }, + }, + }; + + final dataSchema = DataSchema.fromJson( + dataSchemaJson, + PrefixMapping(), + ); + + expect( + dataSchemaJson, + dataSchema.toJson(), + ); + }); }); }