EldenRingDatabase / erdb

JSON schema and data parser for ELDEN RING
MIT License
47 stars 8 forks source link

Generate JSON schema from models #10

Open veeenu opened 1 year ago

veeenu commented 1 year ago

Hi!

Thank you for this project, it is super useful and very nice to work with.

I'm building a tool in Rust and could use JSON schema files to automatically generate types. I opened this PR because I noticed pydantic exposes a feature to obtain JSON schemas. I believe this could be useful to other people who are using strong typing languages as well.

I'm opening this as draft, asking for guidance, because I'm not familiar with pydantic, and I'm not sure accessing the dunder methods is the best/cleanest thing to do; besides, some of the tables do not expose that property and I'm not sure what's the best way to ensure that we get everything.