Skip to content

Latest commit

 

History

History
145 lines (103 loc) · 4.19 KB

File metadata and controls

145 lines (103 loc) · 4.19 KB

digitaltwins

see https://aka.ms/autorest

This is the AutoRest configuration file for digitaltwins.

Getting Started

To build the SDKs for My API, simply install AutoRest via npm (npm install -g autorest) and then run:

autorest readme.md

To see additional help and options, run:

autorest --help

For other options on installation see Installing AutoRest on the AutoRest github page.


Configuration

Basic Information

These are the global settings for the digitaltwins.

openapi-type: arm
tag: package-2020-12

Tag: package-2020-12

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

input-file:
  - Microsoft.DigitalTwins/stable/2020-12-01/digitaltwins.json

Tag: package-2020-10

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

input-file:
  - Microsoft.DigitalTwins/stable/2020-10-31/digitaltwins.json

Tag: package-2020-03-01-preview

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

input-file:
  - Microsoft.DigitalTwins/preview/2020-03-01-preview/digitaltwins.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-powershell
  - repo: azure-sdk-for-python-track2
  - repo: azure-sdk-for-java
  - repo: azure-sdk-for-go
  - repo: azure-sdk-for-go-track2
  - repo: azure-sdk-for-js
  - repo: azure-sdk-for-ruby
    after_scripts:
      - bundle install && rake arm:regen_all_profiles['azure_mgmt_digitaltwins']
  - repo: azure-resource-manager-schemas

Go

See configuration in readme.go.md

Python

See configuration in readme.python.md

Ruby

See configuration in readme.ruby.md

TypeScript

See configuration in readme.typescript.md

CSharp

See configuration in readme.csharp.md

Java

See configuration in readme.java.md

Suppression

directive:
  - suppress: AvoidNestedProperties
    where: $.definitions.DigitalTwinsEndpointResource.properties.properties
    from: digitaltwins.json
    reason: |-
      Flattening properties generates SDK (using autorest) that does not support polymorphism.
      In this case DigitalTwinsEndpointResourceProperties is used as a base class for EventGrid, EventHub and ServiceBus. Flattening DigitalTwinsEndpointResourceProperties removes the link between DigitalTwinsEndpointResource and resources above.
  - suppress: TrackedResourceListByImmediateParent
    where: $.definitions
    from: digitaltwins.json
    reason: 'This is a proxy resource, not a tracked resource.'
  - suppress: EnumInsteadOfBoolean
    where: $.definitions.CheckNameResult.properties.nameAvailable
    from: digitaltwins.json
    reason: The value will always be a boolean.
  - suppress: SECRET_PROPERTY
    where: '$.definitions.ServiceBus.allOf["1"].properties.primaryConnectionString'
    from: digitaltwins.json
    reason: 'Secrets are obfuscated on GETs. E.g., "Endpoint=sb://mysb.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=***". This is to allow customers to identify the namespace of the resource.'
  - suppress: SECRET_PROPERTY
    where: '$.definitions.ServiceBus.allOf["1"].properties.secondaryConnectionString'
    from: digitaltwins.json
    reason: Secrets are obfuscated on read.
  - suppress: SECRET_PROPERTY
    where: '$.definitions.EventHub.allOf["1"].properties.connectionStringPrimaryKey'
    from: digitaltwins.json
    reason: Secrets are obfuscated on read.
  - suppress: SECRET_PROPERTY
    where: '$.definitions.EventHub.allOf["1"].properties.connectionStringSecondaryKey'
    from: digitaltwins.json
    reason: Secrets are obfuscated on read.
  - suppress: R4009
    from: digitaltwins.json
    reason: Warning raised to error while PR was being reviewed. Will implement in next version.