Use Marshmallow to serialize Host
Glutexo opened this issue · 0 comments
Glutexo commented
It is possible to use Marshmallow Schema to ensure validity of serialized JSON objects. A delete event from #392 is a proof of concept for this. Apart from ensuring the schema, it would also remove a need for manual formatting of DateTime values.
Possible caveats:
- Small change the output format of the DateTimes: +00:00 for timezone instead of Z. Still valid ISO 8601.
- Necessity to carefully verify that the Marshmallow and Swagger schemas are compatible.
Another option would be to completely ditch schemas for output. The outputs are generates by our code, which is inherently trusted and is covered by tests.