Skip to content

Instantly share code, notes, and snippets.

@owain68
Created January 14, 2023 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save owain68/00dfaaccb5caea65063b4062d21f75ef to your computer and use it in GitHub Desktop.
Save owain68/00dfaaccb5caea65063b4062d21f75ef to your computer and use it in GitHub Desktop.
Example of using kontent-model-generator
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