-
Notifications
You must be signed in to change notification settings - Fork 57
feat: add support for locales=* Contentful responses #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…cript-codegen into feat/localization-flag
@stevenpetryk btw, can you please explain the importance of this line? contentful-typescript-codegen/src/renderers/typescript/renderInterfaceProperty.ts Line 13 in 20dfe19
From what I understand, if a key is present in the json fetched from contentful api, it will not be contentful-typescript-codegen/src/renderers/typescript/renderInterfaceProperty.ts Line 10 in 20dfe19
|
8bbedc1
to
542b456
Compare
542b456
to
9d76a9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done. Thanks a bunch for the contribution.
I'll admit, this is based on some odd typings in Intercom's marketing site codebase 😆I don't know if it's still necessary. |
🎉 This PR is included in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #20
Overview
Add a new
--localization
flag. When enabled, generated fields will wrapped inLocalizedField
helper , for example:This flag is very useful when entries are being fetched with
locale="*"
.Notes
field.required
is ignored, because contentful api ignores it as well.Asset
This change is