Comments (4)
@beerlington we have a schema with the following relationships:
defmodule MyApp.Client do
use Ecto.Schema
import Ecto.Changeset
schema "clients" do
has_many :addresses, MyApp.Address
embeds_one :document, MyApp.Document
end
end
Our API accepts the addresses
and document
properties inside the clients
document, and we want to respond with the validation errors of those associations as expected. Ecto won't store the errors on the clients
changeset, but we need to traverse the inner Changesets using traverse_errors
to collect those errors when rendering it on the API.
from ja_serializer.
I think it got missed as this project changed hands around that time and it just fell through the cracks. I'd definitely be interested in supporting that if there's a good use case for it. Without JSON API having good support for creating nested records in v1.0 of the spec, what is your use case? I just want to make sure I understand how it would be used so the tests reflect that.
from ja_serializer.
I would also be interested in seeing this implemented.
from ja_serializer.
What workarounds are you folks using until this is implemented?
from ja_serializer.
Related Issues (20)
- Considering migrating to Jason? HOT 4
- How to get a custom attribute value formatter to work properly. HOT 4
- Remove Poison dependency
- Can not start app without poison
- Association links instead of data HOT 2
- phoenix 1.4.4 app errors due to Poison being required despite trying to use Jason HOT 3
- Omitting prev/next links when higher than total page number
- Offer camelCase keys
- Links won't use the page_base_url HOT 7
- Optional json-api version member ? HOT 4
- cannot use relationship named `location` HOT 1
- Using JaSerializer.PhoenixView results in no function clause matching in Plug.Conn.resp/3 HOT 2
- deep_format_keys implementation & mix release duplication error HOT 3
- Missing documentation for testing Phoenix controller responses HOT 2
- Serializer not loaded relationships model HOT 4
- Sparse field param for function based attribute breaks HOT 3
- Should links be output for an empty relationship? HOT 3
- Type ignored on relationship definition HOT 5
- Is it possible to use ja_serializer with a newly generated Phoenix 1.7.7 app? HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ja_serializer.