Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

migration created via bootstrap needs to account for dash in content type id #248

Open
Nintendot opened this issue Jan 20, 2022 · 1 comment

Comments

@Nintendot
Copy link

If the content type id is in the form of foo-bar, the migration src created would have defined constants in the same fashion, i.e:
const foo-bar = migration.createContentType('foo-bar') which obviously isn't semantically correct

I blame Contentful since obviously they allow dashes in id even though their web UI says otherwise:

SS/case 1: special chars not allowed, and rightfully so, notice error message says only letters numbers and underscores allowed
image

SS/case 2: dashes are accepted
image

@AnnaLeheta
Copy link

I also had an issue with trying to bootstrap existing content types. The ones that had dashes in the id (for example sort-text)failed and it was't easy to debug why. The error looked like this:
Screen Shot 2022-05-18 at 5 31 23 PM

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants