Back to Azure Sdk For

Azure SDK Code Generation for Data Plane

sdk/maps/Azure.Maps.Geolocation/src/autorest.md

2019-05-16T16-521.3 KB
Original Source

Azure SDK Code Generation for Data Plane

Run dotnet build /t:GenerateCode to generate code.

AutoRest Configuration

see https://aka.ms/autorest

yaml
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/3e81da30a1358b6ffcbc7ff222aae5f483971d32/specification/maps/data-plane/Geolocation/preview/1.0/geolocation.json
title: MapsGeolocationClient
openapi-type: data-plane
tag: 1.0
add-credentials: true
# at some point those credentials will move away to Swagger according to [this](https://github.com/Azure/autorest/issues/3718)
credential-default-policy-type: BearerTokenCredentialPolicy
credential-scopes: https://atlas.microsoft.com/.default
generation1-convenience-client: true
sync-methods: None
license-header: MICROSOFT_MIT_NO_VERSION
namespace: Azure.Maps.Geolocation
public-clients: false
clear-output-folder: true
data-plane: true
skip-csproj: true
helper-namespace: Azure.Maps.Common

remove unused "security" section

yaml
directive:
- from: swagger-document
  where: $.securityDefinitions
  transform: |
    $["azure_auth"] = $["AADToken"];
    delete $["AADToken"];
- from: swagger-document
  where: '$.security[0]'
  transform: |
    $["azure_auth"] = $["AADToken"];
    delete $["AADToken"];
- from: swagger-document
  where: $.securityDefinitions
  transform: |
    $["SharedKey"]["in"] = "header";