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

[QUESTION] Restrictions on data types that services may return. #20

Open
voyc-jean opened this issue Apr 7, 2020 · 2 comments
Open

Comments

@voyc-jean
Copy link
Contributor

I noticed that within the styleguide and examples, service functions / methods always return a Dict. Is returning more complext data, such as model instances, permissible?

PS, the one exception is this example, but I think this may be a mistake as a dict is ultimately returned.

@phalt
Copy link
Owner

phalt commented Apr 8, 2020

Good question:

For APIs:

All data returned from APIs must be serializable.

For Services there is no restriction :)

@voyc-jean
Copy link
Contributor Author

Great, thanks @phalt. I've created a PR [#21] which includes a few fixes, including the issue with the example which I originally mentioned.

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

2 participants