Reltio Connect

 View Only
  • 1.  Java POJO Object from Entity Json

    Posted 12-03-2021 16:45

    Hello, I am working to call the Relio API /entities endpoint to insert/update data from a Java/SpringBoot application. Is there a way to generate Java objects that would match up (via Jackson) to the expected API call so that I do not have to manually create all the POJO's by hand? I have previous experience using the plugin related to jsonschema2pojo but I would almost be expecting Reltio to have all the request/response types available from some library jar that can be imported. If that was the case I would simply be able to populate the values and call the API with the created object and would be good to go.

    Thanks for the help.



  • 2.  RE: Java POJO Object from Entity Json

    Reltio Employee
    Posted 12-06-2021 19:25
    @ryan krebsbach, thanks for posting.  It should be possible to write some code to process the response for this https://developer.reltio.com/private/swagger.htm?module=Configuration#/Data%20Model/getEntityTypesForTenant and generate some java/python/javascript code to marshall/unmarshall the customers entity into a POJO. I have asked around and as far as I can tell, no one has written anything.

    Not to completely pawn this off, but if you write some code to call the Reltio api and create the POJOs I'm sure others would be interested in it - maybe as an open source project. I will continue to ask around, and let's see if others here have anything that might be helpful. Feel free to add some of the things you learn along the way, as it seems some others are already interested in this. 


  • 3.  RE: Java POJO Object from Entity Json

    Reltio Employee
    Posted 12-06-2021 19:32
    @ryan krebsbach,

    One other point - the Java Marshall/unmarshall code would need to handle schema changes - we allow customers to change the schema periodically. So you would need to handle those complications, and also the actual schemas and Java POJOs fir one customer might not work for another customer. We customize the entity schema for each customer. Even between the dev/test/prod tenant the schema might well be different. Just some of the issues you might need to handle.


  • 4.  RE: Java POJO Object from Entity Json

    Posted 01-03-2022 10:56
    @Chris Detzel that makes sense to me if the schemas are in theory all different per customer. Just for reference if anybody else if trying something similar, I currently have our specific types generating via custom coding using codemodel using this blog post for a jumping off point for using is (since the actual codemodel documentation is pretty much nonexistent). If I am able to somewhat genericize the code/process I reply to this post with some code for others to use.