I have a project where incoming data is declared a...
# getting-started
p
I have a project where incoming data is declared as a json schema. I'd like to generate dtos from the json schema on compile time. Can you recommend a library for that?
s
You can generate the Kotlin data classes from here- https://www.json2kt.com
j
Unfortunately that doesn't take json schema files This is a problem we ran into as well, we just ended up hand-maintaining a DTO that matches the schema
p
I prefer "offline" but compile time thing, like https://www.jsonschema2pojo.org/ But that one fails on schemas like this:
👀 1
You can check it online on the URL above