sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md
Run dotnet build /t:GenerateCode to generate code.
title: PurviewAccount
input-file: https://github.com/Azure/azure-rest-api-specs/blob/b2bddfe2e59b5b14e559e0433b6e6d057bcff95d/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json
namespace: Azure.Analytics.Purview.Account
security: AADToken
security-scopes: https://purview.azure.net/.default
directive:
- from: swagger-document
where: $.parameters.endpoint
transform: >
if ($.format === undefined) {
$.format = "url";
}
directive:
- from: swagger-document
where: $.parameters
transform: >
$["collectionName"] = {
"in": "path",
"name": "collectionName",
"required": true,
"type": "string",
"x-ms-parameter-location": "client"
};
- from: swagger-document
where: $.paths..parameters[?(@.name=='collectionName')]
transform: >
$ = { "$ref": "#/parameters/collectionName" };
directive:
- from: swagger-document
where: $..[?(@.operationId !== undefined)]
transform: >
const mappingTable = {
"Collections_ListCollections": "Accounts_GetCollections",
"ResourceSetRules_ListResourceSetRules": "Accounts_GetResourceSetRules"
};
$.operationId = (mappingTable[$.operationId] ?? $.operationId);