A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Azure/azure-sdk-for-java/wiki/Working-with-AutoRest below:

Working with AutoRest · Azure/azure-sdk-for-java Wiki · GitHub

AutoRest is the name of the tool we use to generate the communication layer that lies beneath the API we expose to our users. AutoRest saves us from having to write a lot of network communication code, and instead we can direct our focus towards building a great user experience on top of this generated code. Our goal should be to expose as little, and ideally none, of the generated code to the user.

Getting started with AutoRest
  1. Fork and clone this GitHub repo.
git clone https://github.com/Azure/autorest.java.git
  1. Build the package using Maven
mvn clean package -Dlocal
  1. Run npm install. You need v10 version of Node.JS installed.
  2. Run npm install -g autorest.
  3. Run AutoRest commands like this:

To generate code from a local README file:

autorest --java --use=C:\work\autorest.java\ C:\swagger\updated\Blob\readme.md --output-folder=C:\work\azure-sdk-for-java\storage\client\ --namespace=com.azure.storage.blob --sync-methods=none --generate-client-interfaces=false --enable-xml --required-parameter-client-methods

To generate code from a json swagger spec accessed from a URL:

autorest --java --use:./ --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/search/data-plane/Azure.Search/preview/2019-05-06-preview/searchservice.json --namespace=com.azure.search.service --output-folder=generated-code --sync-methods=all --client-side-validations=true --add-context-parameter=true --context-client-method-parameter=true 

Option name: license-header

Option values:

Option Value Header MICROSOFT_MIT MICROSOFT_APACHE MICROSOFT_MIT_NO_VERSION MICROSOFT_APACHE_NO_VERSION MICROSOFT_MIT_NO_CODEGEN MICROSOFT_MIT_SMALL MICROSOFT_MIT_SMALL_NO_CODEGEN NONE
  1. --use=<path to your autorest.java clone>
  2. If the input is a JSON spec, use --input-file=<local path of URL of JSON file>, if it's a README.md file, remove --input-file=
  3. --enable-xml --required-parameter-client-methods are not needed for services other than Storage
  4. autorest --reset to remove all extensions; or autorest --version=<string> to specify the autorest.core version

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4