Created
January 14, 2023 09:38
-
-
Save owain68/00dfaaccb5caea65063b4062d21f75ef to your computer and use it in GitHub Desktop.
Example of using kontent-model-generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as dotenv from 'dotenv' | |
dotenv.config({path: '../.env'}) | |
import { generateModelsAsync } from '@kontent-ai/model-generator'; | |
const { projectId, apiKey } = process.env; | |
(async () => { | |
await generateModelsAsync({ | |
sdkType: 'delivery', | |
projectId, | |
isEnterpriseSubscription: true, | |
apiKey, | |
addTimestamp: true, | |
elementResolver: 'camelCase', | |
exportRoles: false | |
// outputDir: 'generated-models' | |
}) | |
// … | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment