Skip to content

Latest commit

 

History

History
236 lines (172 loc) · 7.27 KB

File metadata and controls

236 lines (172 loc) · 7.27 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-2023-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-2024-04

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

input-file:
  - Microsoft.ResourceGraph/stable/2024-04-01/resourcegraph.json
  - Microsoft.ResourceGraph/stable/2024-04-01/graphquery.json
  - Microsoft.ResourceGraph/preview/2021-06-01-preview/resourceshistory.json
  - Microsoft.ResourceGraph/preview/2020-09-01-preview/resourcechanges.json

Tag: package-preview-2023-09

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

input-file:
  - Microsoft.ResourceGraph/preview/2023-09-01-preview/resourcecopilot.json
  - Microsoft.ResourceGraph/preview/2023-09-01-preview/resourcegraph.json
  - Microsoft.ResourceGraph/preview/2021-06-01-preview/resourceshistory.json
  - Microsoft.ResourceGraph/preview/2020-09-01-preview/resourcechanges.json

Tag: package-2022-10

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

input-file:
  - Microsoft.ResourceGraph/stable/2022-10-01/resourcegraph.json
  - Microsoft.ResourceGraph/stable/2022-10-01/graphquery.json
  - Microsoft.ResourceGraph/preview/2021-06-01-preview/resourceshistory.json
  - Microsoft.ResourceGraph/preview/2020-09-01-preview/resourcechanges.json

Tag: package-preview-2021-06

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

input-file:
  - Microsoft.ResourceGraph/preview/2021-06-01-preview/resourcegraph.json
  - Microsoft.ResourceGraph/preview/2021-06-01-preview/resourceshistory.json

Tag: package-preview-2021-03

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

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

Tag: package-2021-03

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

input-file:
  - Microsoft.ResourceGraph/stable/2021-03-01/resourcegraph.json
  - Microsoft.ResourceGraph/stable/2021-03-01/graphquery.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
  - Microsoft.ResourceGraph/stable/2019-04-01/graphquery.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-track2
  - 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
  - repo: azure-powershell

Python

See configuration in readme.python.md

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.
  - suppress: XmsIdentifierValidation
    from: resourcecopilot.json
    where: $.definitions.Error.properties.details
    reason: Adding x-ms-identifiers to Error details array results in SDK breaking changes.

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