Welcome to mirror list, hosted at ThFree Co, Russian Federation.

template.json « .template.config « WebApi-CSharp « content « Web.ProjectTemplates « ProjectTemplates « src - github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: edb6e3a7805cd66386cdabd43465064bce0f647c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
{
  "$schema": "http://json.schemastore.org/template",
  "author": "Microsoft",
  "classifications": [
    "Web",
    "WebAPI"
  ],
  "name": "ASP.NET Core Web API",
  "generatorVersions": "[1.0.0.0-*)",
  "description": "A project template for creating an ASP.NET Core application with an example Controller for a RESTful HTTP service. This template can also be used for ASP.NET Core MVC Views and Controllers.",
  "groupIdentity": "Microsoft.Web.WebApi",
  "precedence": "8000",
  "identity": "Microsoft.Web.WebApi.CSharp.6.0",
  "shortName": "webapi",
  "tags": {
    "language": "C#",
    "type": "project"
  },
  "sourceName": "Company.WebApplication1",
  "preferNameDirectory": true,
  "guids": [
    "09732173-2cef-46b7-83db-1334bcb079d3", // Tenant ID
    "53bc9b9d-9d6a-45d4-8429-2a2761773502" // Client ID
  ],
  "sources": [
    {
      "modifiers": [
        {
          "condition": "(windir == 'C:\\Windows')",
          "exclude": [
            "Properties/launchSettings.json"
          ]
        },
        {
          "condition": "(ExcludeLaunchSettings)",
          "exclude": [
            "Properties/launchSettings.json"
          ]
        },
        {
          "condition": "(UseMinimalAPIs)",
          "exclude": [
            "Controllers/WeatherForecastController.cs",
            "Program.cs",
            "WeatherForecast.cs"
          ]
        },
        {
          "condition": "(UseMinimalAPIs && (NoAuth || WindowsAuth))",
          "rename": {
            "Program.MinimalAPIs.WindowsOrNoAuth.cs": "Program.cs"
          },
          "exclude": [
            "Program.MinimalAPIs.OrgOrIndividualB2CAuth.cs"
          ]
        },
        {
          "condition": "(UseMinimalAPIs && (IndividualAuth || OrganizationalAuth))",
          "rename": {
            "Program.MinimalAPIs.OrgOrIndividualB2CAuth.cs": "Program.cs"
          },
          "exclude": [
            "Program.MinimalAPIs.WindowsOrNoAuth.cs"
          ]
        },
        {
          "condition": "(UseControllers)",
          "exclude": [
            "Program.MinimalAPIs.WindowsOrNoAuth.cs",
            "Program.MinimalAPIs.OrgOrIndividualB2CAuth.cs"
          ]
        }
      ]
    }
  ],
  "symbols": {
    "auth": {
      "type": "parameter",
      "datatype": "choice",
      "choices": [
        {
          "choice": "None",
          "description": "No authentication"
        },
        {
          "choice": "IndividualB2C",
          "description": "Individual authentication with Azure AD B2C"
        },
        {
          "choice": "SingleOrg",
          "description": "Organizational authentication for a single tenant"
        },
        {
          "choice": "Windows",
          "description": "Windows authentication"
        }
      ],
      "defaultValue": "None",
      "description": "The type of authentication to use"
    },
    "AAdB2CInstance": {
      "type": "parameter",
      "datatype": "string",
      "defaultValue": "https://qualified.domain.name.b2clogin.com/",
      "replaces": "https:////qualified.domain.name.b2clogin.com/",
      "description": "The Azure Active Directory B2C instance to connect to (use with IndividualB2C auth)."
    },
    "SignUpSignInPolicyId": {
      "type": "parameter",
      "datatype": "string",
      "defaultValue": "b2c_1_susi",
      "replaces": "MySignUpSignInPolicyId",
      "description": "The sign-in and sign-up policy ID for this project (use with IndividualB2C auth)."
    },
    "AADInstance": {
      "type": "parameter",
      "datatype": "string",
      "defaultValue": "https://login.microsoftonline.com/",
      "replaces": "https:////login.microsoftonline.com/",
      "description": "The Azure Active Directory instance to connect to (use with SingleOrg auth)."
    },
    "ClientId": {
      "type": "parameter",
      "datatype": "string",
      "replaces": "11111111-1111-1111-11111111111111111",
      "description": "The Client ID for this project (use with SingleOrg or IndividualB2C auth)."
    },
    "Domain": {
      "type": "parameter",
      "datatype": "string",
      "replaces": "qualified.domain.name",
      "description": "The domain for the directory tenant (use with SingleOrg or IndividualB2C auth)."
    },
    "DefaultScope": {
      "type": "parameter",
      "datatype": "string",
      "replaces": "api-scope",
      "defaultValue": "access_as_user",
      "description": "The API scope the client needs to request to provision an access token. (use with IndividualB2C, SingleOrg)."
    },
    "TenantId": {
      "type": "parameter",
      "datatype": "string",
      "replaces": "22222222-2222-2222-2222-222222222222",
      "description": "The TenantId ID of the directory to connect to (use with SingleOrg auth)."
    },
    "OrgReadAccess": {
      "type": "parameter",
      "datatype": "bool",
      "defaultValue": "false",
      "description": "Whether or not to allow this application read access to the directory (only applies to SingleOrg auth)."
    },
    "UserSecretsId": {
      "type": "parameter",
      "datatype": "string",
      "replaces": "aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502",
      "defaultValue": "aspnet-Company.WebApplication1-53bc9b9d-9d6a-45d4-8429-2a2761773502",
      "description": "The ID to use for secrets (use with OrgReadAccess or Individual auth)."
    },
    "ExcludeLaunchSettings": {
      "type": "parameter",
      "datatype": "bool",
      "defaultValue": "false",
      "description": "Whether to exclude launchSettings.json in the generated template."
    },
    "kestrelHttpPort": {
      "type": "parameter",
      "datatype": "integer",
      "description": "Port number to use for the HTTP endpoint in launchSettings.json."
    },
    "kestrelHttpPortGenerated": {
      "type": "generated",
      "generator": "port",
      "parameters": {
        "low": 5000,
        "high": 5300
      }
    },
    "kestrelHttpPortReplacer": {
      "type": "generated",
      "generator": "coalesce",
      "parameters": {
        "sourceVariableName": "kestrelHttpPort",
        "fallbackVariableName": "kestrelHttpPortGenerated"
      },
      "replaces": "5000"
    },
    "kestrelHttpsPort": {
      "type": "parameter",
      "datatype": "integer",
      "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
    },
    "kestrelHttpsPortGenerated": {
      "type": "generated",
      "generator": "port",
      "parameters": {
        "low": 7000,
        "high": 7300
      }
    },
    "kestrelHttpsPortReplacer": {
      "type": "generated",
      "generator": "coalesce",
      "parameters": {
        "sourceVariableName": "kestrelHttpsPort",
        "fallbackVariableName": "kestrelHttpsPortGenerated"
      },
      "replaces": "5001"
    },
    "iisHttpPort": {
      "type": "parameter",
      "datatype": "integer",
      "description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json."
    },
    "iisHttpPortGenerated": {
      "type": "generated",
      "generator": "port"
    },
    "iisHttpPortReplacer": {
      "type": "generated",
      "generator": "coalesce",
      "parameters": {
        "sourceVariableName": "iisHttpPort",
        "fallbackVariableName": "iisHttpPortGenerated"
      },
      "replaces": "8080"
    },
    "iisHttpsPort": {
      "type": "parameter",
      "datatype": "integer",
      "description": "Port number to use for the IIS Express HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
    },
    "iisHttpsPortGenerated": {
      "type": "generated",
      "generator": "port",
      "parameters": {
        "low": 44300,
        "high": 44399
      }
    },
    "iisHttpsPortReplacer": {
      "type": "generated",
      "generator": "coalesce",
      "parameters": {
        "sourceVariableName": "iisHttpsPort",
        "fallbackVariableName": "iisHttpsPortGenerated"
      },
      "replaces": "44300"
    },
    "OrganizationalAuth": {
      "type": "computed",
      "value": "(auth == \"SingleOrg\")"
    },
    "WindowsAuth": {
      "type": "computed",
      "value": "(auth == \"Windows\")"
    },
    "SingleOrgAuth": {
      "type": "computed",
      "value": "(auth == \"SingleOrg\")"
    },
    "IndividualAuth": {
      "type": "computed",
      "value": "(auth == \"IndividualB2C\")"
    },
    "IndividualB2CAuth": {
      "type": "computed",
      "value": "(auth == \"IndividualB2C\")"
    },
    "NoAuth": {
      "type": "computed",
      "value": "(!(IndividualAuth || OrganizationalAuth || WindowsAuth))"
    },
    "RequiresHttps": {
      "type": "computed",
      "value": "(OrganizationalAuth || IndividualAuth || !NoHttps)"
    },
    "NoHttps": {
      "type": "parameter",
      "datatype": "bool",
      "defaultValue": "false",
      "description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
    },
    "UseLocalDB": {
      "type": "parameter",
      "datatype": "bool",
      "defaultValue": "false",
      "description": "Whether to use LocalDB instead of SQLite. This option only applies if --auth Individual or --auth IndividualB2C is specified."
    },
    "UseMinimalAPIs": {
      "type": "parameter",
      "datatype": "bool",
      "defaultValue": "false",
      "description": "Whether to use mininmal APIs instead of controllers."
    },
    "Framework": {
      "type": "parameter",
      "description": "The target framework for the project.",
      "datatype": "choice",
      "choices": [
        {
          "choice": "net7.0",
          "description": "Target net7.0"
        }
      ],
      "replaces": "net7.0",
      "defaultValue": "net7.0"
    },
    "copyrightYear": {
      "type": "generated",
      "generator": "now",
      "replaces": "copyrightYear",
      "parameters": {
        "format": "yyyy"
      }
    },
    "skipRestore": {
      "type": "parameter",
      "datatype": "bool",
      "description": "If specified, skips the automatic restore of the project on create.",
      "defaultValue": "false"
    },
    "CalledApiUrl": {
      "type": "parameter",
      "datatype": "string",
      "replaces": "[WebApiUrl]",
      "defaultValue": "https://graph.microsoft.com/v1.0",
      "description": "URL of the API to call from the web app. This option only applies if --auth SingleOrg or --auth IndividualB2C is specified."
    },
    "CallsMicrosoftGraph": {
      "type": "parameter",
      "datatype": "bool",
      "defaultValue": "false",
      "description": "Specifies if the web app calls Microsoft Graph. This option only applies if --auth SingleOrg is specified."
    },
    "CalledApiScopes": {
      "type": "parameter",
      "datatype": "string",
      "replaces": "user.read",
      "description": "Scopes to request to call the API from the web app. This option only applies if --auth SingleOrg or --auth IndividualB2C is specified."
    },
    "GenerateApi": {
      "type": "computed",
      "value": "((IndividualB2CAuth || OrganizationalAuth) && (CalledApiUrl != \"https://graph.microsoft.com/v1.0\" || CalledApiScopes != \"user.read\"))"
    },
    "GenerateGraph": {
      "type": "computed",
      "value": "(OrganizationalAuth && CallsMicrosoftGraph)"
    },
    "GenerateApiOrGraph": {
      "type": "computed",
      "value": "(GenerateApi || GenerateGraph)"
    },
    "DisableOpenAPI": {
      "type": "parameter",
      "dataType": "bool",
      "defaultValue": "false",
      "description": "Disable OpenAPI (Swagger) support"
    },
    "EnableOpenAPI": {
      "type": "computed",
      "value": "(!DisableOpenAPI)"
    },
    "UseControllers": {
      "type": "computed",
      "value": "(!UseMinimalAPIs)"
    }
  },
  "primaryOutputs": [
    {
      "path": "Company.WebApplication1.csproj"
    }
  ],
  "defaultName": "WebApplication",
  "postActions": [
    {
      "condition": "(!skipRestore)",
      "description": "Restore NuGet packages required by this project.",
      "manualInstructions": [
        {
          "text": "Run 'dotnet restore'"
        }
      ],
      "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
      "continueOnError": true
    }
  ]
}