ricokahler / sanity-codegen

Generate TypeScript types from your Sanity.io schemas
sanity-codegen-dev.vercel.app
MIT License
270 stars 19 forks source link

Support for `.` name spacing in field object name #258

Open tomjamesallen opened 2 years ago

tomjamesallen commented 2 years ago

I've been trying to get codegen up and running with the Sanity Connect for Shopify starter and I'm running into some issues. Some of the object definitions contain periods to namespace fields e.g. seo.singleton. When used to create type names this is throwing a syntax error.

Screenshot 2022-03-14 at 07 37 22 Screenshot 2022-03-14 at 07 37 32

Is it possible to add support for converting . in field names to an underscore or dropping it all together to avoid this issue?