Giter Site home page Giter Site logo

Introduce Lombok? about td-ameritrade-client HOT 4 OPEN

studerw avatar studerw commented on June 1, 2024
Introduce Lombok?

from td-ameritrade-client.

Comments (4)

studerw avatar studerw commented on June 1, 2024

I used this tool to generate most of the model classes: jsonschema2pojo. It makes the pojos okay, but the errors I've had were from TDA's schema isn't 100% accurate. So far I've caught most of them except for some of the responses to really complex trades that I've never tried, and actually don't even understand, lol.

Right now I have a couple types (e.g. order.cancelTime) that need special Jackson annotations, so if that could still be configured, I don't mind. You could do a PR for just switching to Lombock on, e.g., com.studerw.tda.model.account.Order, and I'll take a look.

from td-ameritrade-client.

vphilipnyc avatar vphilipnyc commented on June 1, 2024

Sounds fair. Let me come back to this. Looking at the codebase closer, I want to make sure Lombok and the JSON annotations don't cause any issues together.

The other consideration is that if you're planning on using the jsonschema2pojo tool each time there's a change with the TD API, then you'd be essentially undoing the Lombok change (and optionally re-applying them to reflect the TD API). Not trying to cause any headaches, but completely fine if Lombok is not a direction you'd want to take.

It would likely work really well for the PriceHistReq class, for example.

from td-ameritrade-client.

vphilipnyc avatar vphilipnyc commented on June 1, 2024

Also, I don't believe introducing Lombok would affect serialization, but if changes are made that are incompatible with serialization (e.g., fields are removed, types are changed, etc), then it could turn into a hassle. Just not sure whether this is a valid concern depending on how the project is used currently.

from td-ameritrade-client.

studerw avatar studerw commented on June 1, 2024

Thanks, @vphilipnyc! I'll try to introduce this to the next release

from td-ameritrade-client.

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.