-
Notifications
You must be signed in to change notification settings - Fork 211
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 support for attributes of custom defined types #159
Add support for attributes of custom defined types #159
Conversation
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@CrushedPixel Please confirm that you are ok with my changes to your CL and I will merge this. |
LGTM. Thanks for addressing this! |
@CrushedPixel I realized there're no docs for this. Can you send a PR to this branch with README and godoc comment updates for this functionality. Also, can you write tests for things like, type MyCustomType map[string]interface{}
type MyCustomSliceType []map[string]interface{} ? Sorry, I guess we have a little more to do on this. |
https://gist.github.com/shwoodard/9ea721936aee624f3f2f9e20db533961 This test fails. Adding values for the "slicemaptype" property breaks the parser. Two options, we can fix the parser to support these cases, or we can document that this feature is only meant for types that extend builtins like int32, float64, bool, string, etc. What do you think, @aren55555, @CrushedPixel? |
In my opinion I think we should support all type permutations for these deep attribute fields/values. If not, I can see documenting the supported types difficult. Not to mention we will be inundated by GH issues like "Why doesn't type X work as an attr?" |
This is #136 rebased on top of current google/jsonapi master after merge of #99.
Small adjustments were made,