Giter VIP home page Giter VIP logo

Comments (4)

lucasmazza avatar lucasmazza commented on August 16, 2024 2

@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.

beerlington avatar beerlington commented on August 16, 2024

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.

theoks avatar theoks commented on August 16, 2024

I would also be interested in seeing this implemented.

from ja_serializer.

tadast avatar tadast commented on August 16, 2024

What workarounds are you folks using until this is implemented?

from ja_serializer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.