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

Add strongly typed attribute updates #8

Closed
bellebethcooper opened this issue Jan 4, 2019 · 0 comments
Closed

Add strongly typed attribute updates #8

bellebethcooper opened this issue Jan 4, 2019 · 0 comments
Assignees

Comments

@bellebethcooper
Copy link
Owner

  • Create string, float, and int typed attribute update models

  • Create protocol for all 3 to conform to

  • Expect array of procotol in update func

  • Make protocol include func for returning [String: Any] based on model's properties

  • Use that func in update func to get dicts to turn into JSON

  • Optionally add validation to models to point out errors of mismatched value types, e.g. in string type, check if name matches all known non-string attributes, and throw error if so

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