GithubHelp home page GithubHelp logo

Comments (5)

gathogojr avatar gathogojr commented on July 30, 2024

Hi @johnwc. This is not an issue that should require a change to the library since it's not a bug in the implementation or a scenario that cuts across users of the library. Our advice is for you to create a custom ODataPayloadValueConverter that implements the behaviour you want and inject it into the DI container. See similar advise provided for a related case - #2464 (comment)

from odata.net.

johnwc avatar johnwc commented on July 30, 2024

@gathogojr i thought of doing that first, until I noticed there was no way to know what the details of the property is from that method. It only gets passed the raw value and its expected type. How do you suggest I throw an error inside my custom class with the name of the property?

Also, a lot of times things are not done because it only effects the library, sometimes things are done to help the developers and end users of the library. This is a perfect example of such that, it helps the end user know what is wrong and where it is.

from odata.net.

gathogojr avatar gathogojr commented on July 30, 2024

@johnwc I understand. We triaged this issue earlier today and came to the same conclusion as you have. A custom payload value converter won't make it possible to report the property that has an invalid value.
We'd be open to a pull request contribution if you're in a position to do that. Luckily we can introduce the change in ODataPayloadValueConverter with minimal/no risk of breaking other customers.

from odata.net.

johnwc avatar johnwc commented on July 30, 2024

@gathogojr Are you good with the changes I documented above?

from odata.net.

gathogojr avatar gathogojr commented on July 30, 2024

The suggestion looks okay. If you can publish a pull request then we can review. Add tests to verify the changes.

from odata.net.

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.