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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

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/@microsoft.azure/autorest-core");

    const autorestInstance = await autorest.create();
    autorestInstance.AddConfiguration({
        "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')) {

autorest

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

MIT
Latest version published 11 months ago

Package Health Score

88 / 100
Full package analysis