Skip to content

Latest commit

 

History

History
179 lines (130 loc) · 5.17 KB

File metadata and controls

179 lines (130 loc) · 5.17 KB

ResourceGraph

see https://aka.ms/autorest

This is the AutoRest configuration file for ResourceGraph.


Getting Started

To build the SDK for ResourceGraph, 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 ResourceGraph API.

title: ResourceGraphClient
openapi-type: arm
tag: package-preview-2020-09

Validations

Run validations when --validate is specified on command line

azure-validator: true
semantic-validator: true
model-validator: true
message-format: json

Tag: package-preview-2020-09

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

input-file:
  - Microsoft.ResourceGraph/preview/2020-09-01-preview/resourcechanges.json
  - Microsoft.ResourceGraph/preview/2020-04-01-preview/resourcegraph.json
  - Microsoft.ResourceGraph/preview/2020-04-01-preview/resourceshistory.json

Tag: package-preview-2020-04

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

input-file:
  - Microsoft.ResourceGraph/preview/2020-04-01-preview/resourcegraph.json
  - Microsoft.ResourceGraph/preview/2020-04-01-preview/resourcechanges.json
  - Microsoft.ResourceGraph/preview/2020-04-01-preview/resourceshistory.json

Tag: package-2019-04

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

input-file:
  - Microsoft.ResourceGraph/stable/2019-04-01/resourcegraph.json

Tag: package-2018-09-preview

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

input-file:
  - Microsoft.ResourceGraph/preview/2018-09-01-preview/resourcegraph.json
  - Microsoft.ResourceGraph/preview/2018-09-01-preview/graphquery.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-java
  - repo: azure-sdk-for-go
  - repo: azure-sdk-for-js
  - repo: azure-sdk-for-trenton
  - repo: azure-resource-manager-schemas
    after_scripts:
      - node sdkauto_afterscript.js resourcegraph/resource-manager

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.ResourceGraph
  output-folder: $(csharp-sdks-folder)/resourcegraph/Microsoft.Azure.Management.ResourceGraph/src/Generated
  clear-output-folder: true

Java

See configuration in readme.java.md

Go

See configuration in readme.go.md

Suppression

directive:
  - suppress: ListInOperationName
    from: resourcegraph.json
    where: '$.paths["/providers/Microsoft.ResourceGraph/resourceChanges"].post.operationId'
    reason: |-
      1. Is this rule applicable? R1003 ListInOperationName says: "Per ARM SDK guidelines, each 'GET' operation on a resource should have "list" in the name...". However, this is POST, not GET.

      2. If the rule is applicable anyway, how should we fix it? Renaming it to ResourceChanges_List causes another warning:
              "OperationId should contain the verb: 'resourcechanges' in:'ResourceChanges_List'. Consider updating the operationId"
      Renaming it to ResourceChanges_ListResourceChanges causes yet another warning:
              "Per the Noun_Verb convention for Operation Ids, the noun 'ResourceChanges' should not appear after the underscore."
      Renaming it to ResourceChanges_Listresourcechanges seems to get rid of warnings, but the result looks very strange.
  - suppress: EnumInsteadOfBoolean
    where: $.definitions.ResourceChangesRequestParameters.properties.fetchPropertyChanges
    from: resourcegraph.json
    reason: This is a clear scenario for a boolean and will not have more than 2 values in the future.

AzureResourceSchema

See configuration in readme.azureresourceschema.md

cli

These settings apply only when --cli is specified on the command line.

cli:
  cli-name: ResourceGraph
  azure-arm: true
  license-header: MICROSOFT_MIT_NO_VERSION
  payload-flattening-threshold: 2
  namespace: azure.mgmt.ResourceGraph
  package-name: azure-mgmt-ResourceGraph
  clear-output-folder: false

Terraform

These settings apply only when --terraform is specified on the command line.

terraform:
  cli-name: ResourceGraph
  azure_arm: true
  license_header: MICROSOFT_MIT_NO_VERSION
  payload_flattening_threshold: 2
  namespace: azure.mgmt.ResourceGraph
  package_name: azure-mgmt-ResourceGraph
  clear-output-folder: false