Consuming dynamic REST or GraphQL API endpoints without static typing creates brittle runtime failures in production applications. Manually writing boilerplate data transfer objects (DTOs), serialization tags, and nested structs is slow and error-prone.
This generator infers structural schemas directly from representative JSON payloads: distinguishing between 64-bit floating point numbers and integers, analyzing nested objects and homogeneous arrays, mapping snake_case keys to idiomatic PascalCase fields, and outputting production-ready type definitions.
interface definitions with proper object nesting, array type arrays, and primitive typings.type ... struct blocks with idiomatic PascalCase field names and explicit `json:"key"` struct tags.BaseModel definitions with Field(..., alias="key") annotations, supporting Python's standard type hints (List, Optional).pub struct declarations equipped with #[derive(Serialize, Deserialize)] and #[serde(rename = "...")] attributes.UserItem or OrderItem), and binds the parent field as an array of that type.