evestera / json_typegen

Tools and libraries to create types for Rust, Kotlin, TypeScript and Python from JSON samples
https://typegen.vestera.as
Apache License 2.0
268 stars 26 forks source link

Add Python (pydantic) generation. #36

Closed falsetru closed 2 years ago

falsetru commented 2 years ago

Add Python pydantic generation. Most code originates from https://github.com/evestera/json_typegen/blob/d572c1eefd29d23f57961262b68eb9c130fc95fe/json_typegen_shared/src/generation/kotlin.rs .

evestera commented 2 years ago

Thank you for the PR! Sorry I took so long to get this merged. Looks like you've covered all the necessary details for adding a new output mode, and from what I've seen updating myself on python again, pydantic looks like a good one to have. 👍