Skip to content

Latest commit

 

History

History
176 lines (124 loc) · 4.57 KB

File metadata and controls

176 lines (124 loc) · 4.57 KB

Reservations

see https://aka.ms/autorest

This is the AutoRest configuration file for Reservations RP.


Getting Started

To build the SDK for Reservations, simply Install AutoRest and in this folder, run:

autorest

To see additional help and options, run:

autorest --help


Configuration

Basic Information

These are the global settings for the Reservations API.

openapi-type: arm
tag: package-preview-2019-07-19

Tag: package-preview-2019-07-19

These settings apply only when --tag=package-preview-2019-07-19 is specified on the command line.

input-file:
  - Microsoft.Capacity/preview/2019-07-19/quota.json
  - Microsoft.Capacity/preview/2019-04-01/reservations.json

Tag: package-preview-2019-04

These settings apply only when --tag=package-preview-2019-04 is specified on the command line.

input-file:
  - Microsoft.Capacity/preview/2019-04-01/reservations.json

Tag: package-2018-06

These settings apply only when --tag=package-2018-06 is specified on the command line.

input-file:
- Microsoft.Capacity/preview/2018-06-01/reservations.json

Tag: package-2017-11

These settings apply only when --tag=package-2017-11 is specified on the command line.

input-file:
- Microsoft.Capacity/stable/2017-11-01/reservations.json

Code Generation

Swagger to SDK

This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself.

swagger-to-sdk:
  - repo: azure-sdk-for-net
  - repo: azure-sdk-for-python
  - repo: azure-sdk-for-go
  - repo: azure-sdk-for-js
  - repo: azure-sdk-for-node

C#

These settings apply only when --csharp is specified on the command line. Please also specify --csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>.

csharp:
  azure-arm: true
  license-header: MICROSOFT_MIT_NO_VERSION
  namespace: Microsoft.Azure.Management.Reservations
  output-folder: $(csharp-sdks-folder)/reservations/Microsoft.Azure.Management.Reservations/src/Generated
  clear-output-folder: true

Python

These settings apply only when --python is specified on the command line. Please also specify --python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>. Use --python-mode=update if you already have a setup.py and just want to update the code itself.

python-mode: create
python:
  azure-arm: true
  license-header: MICROSOFT_MIT_NO_VERSION
  payload-flattening-threshold: 2
  namespace: azure.mgmt.reservations
  package-name: azure-mgmt-reservations
  package-version: 0.3.2
  clear-output-folder: true
python:
  no-namespace-folders: true
  output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations
python:
  basic-setup-py: true
  output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations

Go

See configuration in readme.go.md

Multi-API/Profile support for AutoRest v3 generators

AutoRest V3 generators require the use of --tag=all-api-versions to select api files.

This block is updated by an automatic script. Edits may be lost!

# include the azure profile definitions from the standard location
require: $(this-folder)/../../../profiles/readme.md

# all the input files across all versions
input-file:
  - $(this-folder)/Microsoft.Capacity/preview/2019-04-01/reservations.json
  - $(this-folder)/Microsoft.Capacity/preview/2018-06-01/reservations.json
  - $(this-folder)/Microsoft.Capacity/stable/2017-11-01/reservations.json

If there are files that should not be in the all-api-versions set, uncomment the exclude-file section below and add the file paths.

#exclude-file: 
#  - $(this-folder)/Microsoft.Example/stable/2010-01-01/somefile.json

Validation

Suppression

directive:
  - suppress: OperationsAPIImplementation
    reason: We do have a operations api as "/providers/{providerName}/operations"
    from: quota.json
    where: $.paths
  - suppress: RequiredPropertiesMissingInResourceModel
	reason: QuotaRequestDetails doesn't have any property like - 'name', 'id' and 'type' in its hierarchy.
	from: quota.json
	where: $.paths