How to use the autorest.create function in autorest

To help you get started, we’ve selected a few autorest examples, based on popular ways it is used in public projects.

github microsoft / vscode-azuretools / kudu / gulpfile.js View on Github external
async function build() {
    // use local version of autorest extensions instead of global machine versions
    await autorest.initialize("./node_modules/");

    const autorestInstance = await autorest.create();
        "nodejs": {
            "package-name": "vscode-azurekudu",
            "license-header": "MICROSOFT_MIT_NO_VERSION",
            "add-credentials": "true",
        "title": "KuduClient",
        "input-file": path.join(__dirname, 'swagger.json')
    autorestInstance.Message.Subscribe((_, msg) => {
        if (msg.Channel !== 'file' && msg.Text) {
            console.log(msg.FormattedMessage || msg.Text);
    autorestInstance.GeneratedFile.Subscribe((_, file) => {
        if (file.uri.includes('lib')) {


The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is an OpenAPI spec that describes the REST API.

Latest version published 2 months ago

Package Health Score

95 / 100
Full package analysis