Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Marshmallow to serialize Host #399

Open
Glutexo opened this issue Aug 15, 2019 · 0 comments
Open

Use Marshmallow to serialize Host #399

Glutexo opened this issue Aug 15, 2019 · 0 comments

Comments

@Glutexo
Copy link
Collaborator

Glutexo commented Aug 15, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant