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

Review using Sourcery for code generation models #30

Open
brennanMKE opened this issue Mar 28, 2017 · 1 comment
Open

Review using Sourcery for code generation models #30

brennanMKE opened this issue Mar 28, 2017 · 1 comment

Comments

@brennanMKE
Copy link
Collaborator

brennanMKE commented Mar 28, 2017

See Sourcery.

The models first require a list of properties with various types and some are optional. The init function must then know the keys and structure of the JSON file in order to process it properly and also handle the non-optional and optional properties. It may not be an easy task to generate this code but if it is possible it would greatly simplify development for an API client.

A model like Map shows how the properties and init function handle non-optional and optional values when parsing the JSON.

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

No branches or pull requests

1 participant