Skip to content

Commit

Permalink
Fix double dots in template file name extensions (Azure#33520)
Browse files Browse the repository at this point in the history
* Fix double dots in template file name extensions

Fixes Azure#33515 and may be solution or work around to dotnet/sdk#29962

* Resolve PR feedback
  • Loading branch information
heaths authored Jan 18, 2023
1 parent a50e4d4 commit d8e17af
Showing 1 changed file with 67 additions and 61 deletions.
128 changes: 67 additions & 61 deletions sdk/template/.template.config/template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"$schema": "http://json.schemastore.org/template",
"classifications": [ "Azure", "ClassLibrary" ],
"classifications": [
"Azure",
"ClassLibrary"
],
"identity": "Azure.Template",
"name": "Azure DataPlane SDK template: client project",
"shortName": "azsdkdpg",
Expand Down Expand Up @@ -67,50 +70,50 @@
"symbols": {
"serviceDirectory": {
"type": "parameter",
"datatype":"text",
"datatype": "text",
"isRequired": true,
"description": "The Azure client serviceDirectory name. ie. purview. It equals to the name of the directory in the specification folder of the azure-rest-api-specs repo that contains the REST API definition file."
},
"groupName": {
"type": "parameter",
"datatype":"text",
"datatype": "text",
"isRequired": true,
"description": "The Azure namespace group the service belongs to. e.g. IoT",
"replaces": "GroupName"
},
"clientName": {
"type": "parameter",
"datatype":"text",
"datatype": "text",
"isRequired": true,
"description": "The Azure client library name. ie. PurviewAccount. It equals to the client title",
"replaces": "ProviderFullName"
},
"swagger": {
"type": "parameter",
"datatype":"text",
"datatype": "text",
"isRequired": false,
"description": "The swagger file link. It can be local file e.g. ./swagger/compute.json or premlink, e.g. https://github.com/dpokluda/azure-rest-api-specs/blob/be397aa65510bd4e8f87da539af2b0025f6f44ca/specification/deviceupdate/data-plane/Microsoft.DeviceUpdate/preview/2020-09-01/deviceupdate.json",
"replaces": "SwaggerFileLink"
},
"securityScopes": {
"type": "parameter",
"datatype":"text",
"datatype": "text",
"isRequired": false,
"description": "The Azure security scopes. ie. https://api.adu.microsoft.com/.default",
"defaultValue": "",
"replaces": "securityScopes"
},
"securityHeaderName": {
"type": "parameter",
"datatype":"text",
"datatype": "text",
"isRequired": false,
"description": "The Azure key header name.",
"defaultValue": "",
"replaces": "securityHeaderName"
},
"tagVersion": {
"type": "parameter",
"datatype":"text",
"datatype": "text",
"isRequired": false,
"description": "The optional parameter specifies the tag in the README.MD. If empty, the default tag in the README.MD is used.",
"defaultValue": "",
Expand Down Expand Up @@ -189,18 +192,18 @@
"ClientNameWithSuffix": {
"type": "generated",
"generator": "join",
"parameters": {
"symbols": [
{
"type": "ref",
"value": "ClientNameCapitalCase"
},
{
"type": "const",
"value": "Client"
"parameters": {
"symbols": [
{
"type": "ref",
"value": "ClientNameCapitalCase"
},
{
"type": "const",
"value": "Client"
}
],
"separator": ""
],
"separator": ""
},
"description": "Renames files containing 'TemplateClient'",
"fileRename": "TemplateClient",
Expand All @@ -218,23 +221,23 @@
"valueSource": "serviceDirectory",
"valueTransform": "firstUpperCase"
},
"ServiceDirectoryPath": {
"type": "generated",
"generator": "join",
"parameters": {
"symbols": [
{
"type": "const",
"value": "sdk/"
},
{
"type": "ref",
"value": "ServiceNameLowercase"
}
],
"separator": ""
},
"replaces": "sdk/template"
"ServiceDirectoryPath": {
"type": "generated",
"generator": "join",
"parameters": {
"symbols": [
{
"type": "const",
"value": "sdk/"
},
{
"type": "ref",
"value": "ServiceNameLowercase"
}
],
"separator": ""
},
"replaces": "sdk/template"
},
"PackageName": {
"type": "generated",
Expand All @@ -254,7 +257,8 @@
"value": "ClientNameCapitalCase"
}
],
"separator": "."
"separator": ".",
"removeEmptyValues": true
},
"replaces": "Azure.Template"
},
Expand Down Expand Up @@ -312,7 +316,7 @@
],
"separator": "_"
},
"replaces": "Azure_Template"
"replaces": "Azure_Template"
},
"projectFileName": {
"type": "generated",
Expand All @@ -328,43 +332,45 @@
"value": "."
}
],
"separator": ""
"separator": "",
"removeEmptyValues": true
},
"fileRename": "Azure.Template."
},
"YamlServiceDirectory": {
"type": "generated",
"generator": "join",
"parameters": {
"symbols": [
{
"type": "const",
"value": "ServiceDirectory: "
},
{
"type": "ref",
"value": "ServiceNameLowercase"
}
],
"separator": ""
"symbols": [
{
"type": "const",
"value": "ServiceDirectory: "
},
{
"type": "ref",
"value": "ServiceNameLowercase"
}
],
"separator": ""
},
"replaces": "ServiceDirectory: template"
},
"AzureResourceProviderNamespace": {
"type": "generated",
"generator": "join",
"parameters": {
"symbols": [
{
"type": "const",
"value": "Microsoft"
},
{
"type": "ref",
"value": "ServiceNameCapitalCase"
}
],
"separator": "."
"symbols": [
{
"type": "const",
"value": "Microsoft"
},
{
"type": "ref",
"value": "ServiceNameCapitalCase"
}
],
"separator": ".",
"removeEmptyValues": true
},
"replaces": "Microsoft.Template"
},
Expand Down

0 comments on commit d8e17af

Please sign in to comment.