autorest Documentation

OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python

4,801 stars TypeSpec 1 file Β· ~7,519 tokens #azure#code-generator#csharp#golang#java#javascript#node#openapi
RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy autorest on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name autorest --restart always azure/autorest:latest

File: README.md

⚠️ Deprecation Notice

AutoRest is deprecated and will be retired on July 1, 2026.

AutoRest is no longer under active development. No new features, language generators, or plugins will be added.

The recommended successor to AutoRest is TypeSpec β€” a modern, actively developed API description language and code generation platform.

πŸ“Œ Deprecation tracking issue for more details: https://github.com/Azure/autorest/issues/5175

AutoRest

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

Release notes

Packages

Name Changelog Latest Next
Core functionality
autorest Changelog
@autorest/core Changelog
@autorest/modelerfour Changelog
Language generators
@autorest/csharp Changelog
@autorest/go Changelog
@autorest/java Changelog
@autorest/powershell Changelog
@autorest/python Changelog
@autorest/swift Changelog
@autorest/typescript Changelog
Internal packages
@autorest/codemodel Changelog
@autorest/common Changelog
@autorest/configuration Changelog
@autorest/extension-base Changelog
@azure-tools/extension Changelog
@azure-tools/codegen Changelog
@azure-tools/openapi Changelog
@azure-tools/deduplication Changelog
@azure-tools/datastore Changelog
@azure-tools/oai2-to-oai3 Changelog
@azure-tools/jsonschema Changelog

Getting Started using AutoRest

View our docs readme as a starting point to find both general information and language-generator specific information

Contributing

Contributing guide

Check our internal developer docs to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Autorest.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.


File: Readme.md

⚠️ Deprecation Notice

AutoRest is deprecated and will be retired on July 1, 2026.

AutoRest is no longer under active development. No new features, language generators, or plugins will be added.

The recommended successor to AutoRest is TypeSpec β€” a modern, actively developed API description language and code generation platform.

πŸ“Œ Deprecation tracking issue for more details: https://github.com/Azure/autorest/issues/5175

AutoRest

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

Release notes

Packages

Name Changelog Latest Next
Core functionality
autorest Changelog
@autorest/core Changelog
@autorest/modelerfour Changelog
Language generators
@autorest/csharp Changelog
@autorest/go Changelog
@autorest/java Changelog
@autorest/powershell Changelog
@autorest/python Changelog
@autorest/swift Changelog
@autorest/typescript Changelog
Internal packages
@autorest/codemodel Changelog
@autorest/common Changelog
@autorest/configuration Changelog
@autorest/extension-base Changelog
@azure-tools/extension Changelog
@azure-tools/codegen Changelog
@azure-tools/openapi Changelog
@azure-tools/deduplication Changelog
@azure-tools/datastore Changelog
@azure-tools/oai2-to-oai3 Changelog
@azure-tools/jsonschema Changelog

Getting Started using AutoRest

View our docs readme as a starting point to find both general information and language-generator specific information

Contributing

Contributing guide

Check our internal developer docs to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Autorest.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.


File: readme.md

⚠️ Deprecation Notice

AutoRest is deprecated and will be retired on July 1, 2026.

AutoRest is no longer under active development. No new features, language generators, or plugins will be added.

The recommended successor to AutoRest is TypeSpec β€” a modern, actively developed API description language and code generation platform.

πŸ“Œ Deprecation tracking issue for more details: https://github.com/Azure/autorest/issues/5175

AutoRest

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

Release notes

Packages

Name Changelog Latest Next
Core functionality
autorest Changelog
@autorest/core Changelog
@autorest/modelerfour Changelog
Language generators
@autorest/csharp Changelog
@autorest/go Changelog
@autorest/java Changelog
@autorest/powershell Changelog
@autorest/python Changelog
@autorest/swift Changelog
@autorest/typescript Changelog
Internal packages
@autorest/codemodel Changelog
@autorest/common Changelog
@autorest/configuration Changelog
@autorest/extension-base Changelog
@azure-tools/extension Changelog
@azure-tools/codegen Changelog
@azure-tools/openapi Changelog
@azure-tools/deduplication Changelog
@azure-tools/datastore Changelog
@azure-tools/oai2-to-oai3 Changelog
@azure-tools/jsonschema Changelog

Getting Started using AutoRest

View our docs readme as a starting point to find both general information and language-generator specific information

Contributing

Contributing guide

Check our internal developer docs to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Autorest.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.


File: docs/README.md

AutoRest Documentation

  1. Introduction

    • Get an introduction to the fundamental concepts of AutoRest
  2. Installing AutoRest

  3. Defining Clients with OpenAPI

  4. Generating Clients with AutoRest

    • How do I generate code? See here
  5. Using Your Generated Client

  6. Migrating from AutoRest 2.0 to 3.0

    • I have old generated code using the previous version of AutoRest. How do I upgrade my generation and use my new code?
  7. Developing with AutoRest

    • How do I generate or contribute to AutoRest in dev mode?
  8. Powershell documentation

    • How do I use AutoRest to build Powershell cmdlets?
  9. Use autorest via docker

  10. Troubleshooting

  11. FAQ


File: docs/Readme.md

AutoRest Documentation

  1. Introduction

    • Get an introduction to the fundamental concepts of AutoRest
  2. Installing AutoRest

  3. Defining Clients with OpenAPI

  4. Generating Clients with AutoRest

    • How do I generate code? See here
  5. Using Your Generated Client

  6. Migrating from AutoRest 2.0 to 3.0

    • I have old generated code using the previous version of AutoRest. How do I upgrade my generation and use my new code?
  7. Developing with AutoRest

    • How do I generate or contribute to AutoRest in dev mode?
  8. Powershell documentation

    • How do I use AutoRest to build Powershell cmdlets?
  9. Use autorest via docker

  10. Troubleshooting

  11. FAQ


File: docs/readme.md

AutoRest Documentation

  1. Introduction

    • Get an introduction to the fundamental concepts of AutoRest
  2. Installing AutoRest

  3. Defining Clients with OpenAPI

  4. Generating Clients with AutoRest

    • How do I generate code? See here
  5. Using Your Generated Client

  6. Migrating from AutoRest 2.0 to 3.0

    • I have old generated code using the previous version of AutoRest. How do I upgrade my generation and use my new code?
  7. Developing with AutoRest

    • How do I generate or contribute to AutoRest in dev mode?
  8. Powershell documentation

    • How do I use AutoRest to build Powershell cmdlets?
  9. Use autorest via docker

  10. Troubleshooting

  11. FAQ


File: docs/introduction.md

Introduction to AutoRest

The AutoRest tool generates client libraries for accessing RESTful web services. Input to AutoRest is a spec that describes the REST API using the OpenAPI Specification format.
Here we go into some of the general terms you'll see when going through our documentation and interacting with AutoRests.

What is OpenAPI?

OpenAPI is a specification language used to describe a web service API in terms of its operations and the data types it understands. It was originally conceived as a specification called Swagger, so you commonly see these two terms used interchangeably.

OpenAPI is primarily concerned with describing web services that follow the Representational State Transfer (REST) architectural model where operations are exposed via URI paths that accept HTTP verbs like GET, PUT, POST, and DELETE. These URI paths generally refer to β€œresources” understood by the service where the request and response bodies of most operations contain the details of the resource at that path. For example, a POST request with the body containing the desired state of a resource will create that resource, a PUT request with changes to some properties will update the resource, and a DELETE request will cause the resource to be deleted. OpenAPI provides a schema language which enables this type of API to be described in a machine-readable form, usually encoded in JSON.

The main swagger docs have a good example for the basic structure. For more information on how to write an OpenAPI definition for your service, feel free to refer to the main swagger docs or our own documentation for more AutoRest-specific information.

What is AutoRest?

AutoRest is a tool that provides a code generation framework for converting OpenAPI 2.0 and 3.0 specifications into client libraries for the services described by those specifications. It was developed by Microsoft around the time the OpenAPI Initiative was formed so that Azure service teams could start producing generated client libraries from new Swagger and OpenAPI 2.0 specifications. AutoRest has created a few extensions to augment swagger functionality (a lot were created due to OpenAPI2 shortcomings).

At the core of AutoRest is a flexible pipeline where a series of pre-configured phases transform and merge various OpenAPI input files to produce a β€œcode model” that can be consumed by a language-specific code generator. These code generator extensions will interpret the code model and produce code that aligns with the design guidelines for each language. The generated code for a language will use the corresponding Azure Core implementation so that we can provide configurable behavior for how HTTP requests are made in the generated code.

See our landing page to get started with writing your OpenAPI definitions and generating with AutoRest!