Open joeswann opened 2 years ago
There is a reproduction of this issue at https://github.com/1of1studio/repro-sanity-codegen - the only customisation is to add an alias for a sanity ui component to no-op in order to get sanity-codegen to run.
Note: Will require a projectId in sanity.json to run sanity of course
Note: Have opened a discussion on the other repo too -- https://github.com/sanity-io/sanity-shopify-studio/issues/4
Update: After some discussion on the other repo (link in previous comment) it appears that according to them periods should be fine in these cases and that their use of periods is not the cause of the issue.
Hopefully this isn't a use other door situation in the making!
Hoping to get some feedback on this if possible!
In the process of installing a reasonably official sanity template -- sanity-io/sanity-shopify-studio (https://github.com/sanity-io/sanity-shopify-studio) template the cli validation for document names appears to reject the templates own naming system (specifically the use of periods).
Documentation on the sanity website says that documents are objects and field names for objects don't have periods - so this appears to contradict that. There are also objects with names like "seo.product" - documentation at https://www.sanity.io/docs/object-type#9a9a8b5c6404
There also appears to be a related discussion at https://github.com/ricokahler/sanity-codegen/issues/55
It seems like the Sanity documentation is more likely to be out of date than the template is to be wrong(since the template works and has been created within the last three months), but this seems like a potential 'use other door' situation in terms of getting it resolved.
In the meantime - is there a way to override the allowPeriod validation without forking the entire repo?