michiel/jsonapi-rust

How to add relationships to a model

Closed this issue · 2 comments

I'm in need of creating new resources on an endpoint from data structures in Rust, and I'm having some difficulty figuring out how to add related resources to the model when I send it to the server. How would I go from a data structure, to serializing it with required relationships (ie: foreign keys)?

I've figured it out. I had removed the has one T from the model declaration.

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.