export async function runAutorest()

in generator/autorest.ts [30:51]


export async function runAutorest(readme: string, tmpFolder: string) {
    const autoRestParams = [
        `--use=@autorest/modelerfour`,
        `--use=${extensionDir}`,
        '--bicep',
        `--output-folder=${tmpFolder}`,
        '--multiapi',
        '--title=none',
        // This is necessary to avoid failures such as "ERROR: Semantic violation: Discriminator must be a required property." blocking type generation.
        // In an ideal world, we'd raise issues in https://github.com/Azure/azure-rest-api-specs and force RP teams to fix them, but this isn't very practical
        // as new validations are added continuously, and there's often quite a lag before teams will fix them - we don't want to be blocked by this in generating types.
        `--skip-semantics-validation`,
        `--arm-schema=true`,
        readme,
    ];

    if (constants.autoRestVerboseOutput) {
        autoRestParams.push('--verbose');
    }

    return await execAutoRest(tmpFolder, autoRestParams);
}