How to use the autorest.AutoRest 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 Azure / autorest / src / vscode-autorest / server / document-context.ts View on Github external
public get autorest(): AutoRest {
    if (!this._autoRest) {
      this._autoRest = new AutoRest(this, this.configurationFile);
      this._autoRest.AddConfiguration({ "output-artifact": ["swagger-document", "swagger-document.map"] });

      this.Manager.listenForResults(this._autoRest);
      this.autorest.GeneratedFile.Subscribe((instance, artifact) => {
        this._outputs.set(artifact.uri, artifact.content);
      })
      this._autoRest.Finished.Subscribe((autorest, success) => {
        this.cancel = () => true;

        if (success) {
          this.FlushDiagnostics(true);
          this.ClearDiagnostics();
        }
        this.Manager.verbose(`AutoRest Process Finished with '${success}'.`);
      })
    }

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