spring-projects/spring-batch-extensions

Replace `notion-sdk-jvm` with custom Spring Rest Client

scordio opened this issue · 1 comments

Currently, Notion SDK JVM is used as an underlying dependency to call the Notion API.

Although it gives the benefit of accessing the API from Java without additional effort, it has a few downsides:

  • Brings Gson and Kotlin transitively
  • Does not have a module descriptor
  • Could slow down the adoption of new API types released by Notion

An alternative could be to adopt one of the Rest Client options that Spring provides.

Hi @fahmikudo, regarding scordio/spring-batch-notion#37 (comment):

Interested
Can you explain which part needs to be improved integration test? Or maybe there is an explanatory document?
Maybe if I have free time I will try to contribute.

In short, the notion-sdk-jvm module I'm using hides away the complexity of calling the Notion REST API.

I introduced some tests based on Wiremock, but they don't provide comprehensive coverage for what notion-sdk-jvm does under the hood.

For this reason, before taking up this issue, I would like to introduce more robust tests that could ideally point to an actual database instance on notion.so. I haven't had the time to sketch such tests, but I'll let you know once I come up with something.