Skip to content

Commit 3b9c7a6

Browse files
committed
Add basic set up for the new flag with translations by Copilot
1 parent 81b2894 commit 3b9c7a6

18 files changed

+80
-32
lines changed

src/ProjectTemplates/Web.ProjectTemplates/WebApiAot-CSharp.csproj.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@
1010
<PublishAot>true</PublishAot>
1111
</PropertyGroup>
1212

13+
<!--#if (EnableOpenAPI) -->
14+
<ItemGroup>
15+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="${MicrosoftAspNetCoreOpenApiVersion}" Condition="'$(EnableOpenAPI)' == 'True'" />
16+
</ItemGroup>
17+
1318
</Project>

src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/dotnetcli.host.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@
2121
"UseProgramMain": {
2222
"longName": "use-program-main",
2323
"shortName": ""
24+
},
25+
"DisableOpenAPI": {
26+
"longName": "no-openapi",
27+
"shortName": ""
2428
}
2529
},
2630
"usageExamples": [
2731
""
2832
]
29-
}
33+
}

src/ProjectTemplates/Web.ProjectTemplates/content/WebApiAot-CSharp/.template.config/ide.host.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@
99
"isVisible": true,
1010
"persistenceScope": "shared",
1111
"persistenceScopeName": "Microsoft"
12+
},
13+
{
14+
"id": "DisableOpenAPI",
15+
"name": {
16+
"text": "Enable _OpenAPI support",
17+
"overrideDefaultText": true
18+
},
19+
"description": {
20+
"text": "Enables OpenAPI (Swagger) support",
21+
"overrideDefaultText": true
22+
},
23+
"invertBoolean": true,
24+
"isVisible": true,
25+
"defaultValue": "true",
26+
"persistenceScope": "templateGroup"
1227
}
1328
]
14-
}
29+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Microsoft",
33
"name": "ASP.NET Core Web API (native AOT)",
4-
"description": "Šablona projektu pro vytvoření webového rozhraní RESTful API s využitím minimálních rozhraní API ASP.NET Core publikovaných jako native AOT.",
4+
"description": "Šablona projektu pro vytvoření webového rozhraní RESTful API s využitím minimálních rozhraní API ASP.NET Core publikovaných jako native AOT, s volitelnou podporou OpenAPI.",
55
"symbols/ExcludeLaunchSettings/description": "Určuje, jestli se má z vygenerované šablony vyloučit soubor launchSettings.json.",
66
"symbols/kestrelHttpPort/description": "Číslo portu, který se má použít pro koncový bod HTTP v souboru launchSettings.json.",
77
"symbols/iisHttpPort/description": "Číslo portu, který se má použít pro koncový bod IIS Express HTTP v souboru launchSettings.json.",
@@ -10,6 +10,7 @@
1010
"symbols/skipRestore/description": "Pokud se tato možnost zadá, přeskočí automatické obnovení projektu při vytvoření.",
1111
"symbols/UseProgramMain/displayName": "Nepoužívat _příkazy nejvyšší úrovně",
1212
"symbols/UseProgramMain/description": "Určuje, jestli se má místo příkazů nejvyšší úrovně generovat explicitní třída Program a metoda Main.",
13+
"symbols/DisableOpenAPI/description": "Zakázání podpory OpenAPI (Swagger)",
1314
"postActions/restore/description": "Obnoví balíčky NuGet vyžadované tímto projektem.",
1415
"postActions/restore/manualInstructions/default/text": "Spustit dotnet restore"
15-
}
16+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Microsoft",
33
"name": "ASP.NET Core Web-API (native AOT)",
4-
"description": "Eine Projektvorlage zum Erstellen einer RESTful-Web-API mit ASP.NET Core minimalen APIs, die als native AOT veröffentlicht wurden.",
4+
"description": "Eine Projektvorlage zum Erstellen einer RESTful-Web-API mit ASP.NET Core minimalen APIs, die als native AOT veröffentlicht wurden, mit optionaler Unterstützung für OpenAPI.",
55
"symbols/ExcludeLaunchSettings/description": "Ob launchSettings.json aus der generierten Vorlage ausgeschlossen werden soll.",
66
"symbols/kestrelHttpPort/description": "Portnummer, die für den HTTP Endpunkt in launchSettings.json verwendet werden soll.",
77
"symbols/iisHttpPort/description": "Portnummer, die für den IIS Express HTTP Endpunkt in launchSettings.json verwendet werden soll.",
@@ -10,6 +10,7 @@
1010
"symbols/skipRestore/description": "Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.",
1111
"symbols/UseProgramMain/displayName": "Keine Anweisungen_der obersten Ebene verwenden",
1212
"symbols/UseProgramMain/description": "Gibt an, ob anstelle von Anweisungen der obersten Ebene eine explizite Programmklasse und eine Main-Methode generiert werden soll.",
13+
"symbols/DisableOpenAPI/description": "Deaktivieren Sie die OpenAPI (Swagger) Unterstützung",
1314
"postActions/restore/description": "„NuGet-Pakete“ wiederherstellen, die für dieses Projekt erforderlich sind.",
1415
"postActions/restore/manualInstructions/default/text": "„dotnet restore“ ausführen"
15-
}
16+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Microsoft",
33
"name": "ASP.NET Core Web API (native AOT)",
4-
"description": "A project template for creating a RESTful Web API using ASP.NET Core minimal APIs published as native AOT.",
4+
"description": "A project template for creating a RESTful Web API using ASP.NET Core minimal APIs published as native AOT, with optional support for OpenAPI.",
55
"symbols/ExcludeLaunchSettings/description": "Whether to exclude launchSettings.json from the generated template.",
66
"symbols/kestrelHttpPort/description": "Port number to use for the HTTP endpoint in launchSettings.json.",
77
"symbols/iisHttpPort/description": "Port number to use for the IIS Express HTTP endpoint in launchSettings.json.",
@@ -10,6 +10,7 @@
1010
"symbols/skipRestore/description": "If specified, skips the automatic restore of the project on create.",
1111
"symbols/UseProgramMain/displayName": "Do not use _top-level statements",
1212
"symbols/UseProgramMain/description": "Whether to generate an explicit Program class and Main method instead of top-level statements.",
13+
"symbols/DisableOpenAPI/description": "Disable OpenAPI (Swagger) support",
1314
"postActions/restore/description": "Restore NuGet packages required by this project.",
1415
"postActions/restore/manualInstructions/default/text": "Run 'dotnet restore'"
15-
}
16+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Microsoft",
33
"name": "API web ASP.NET Core (native AOT)",
4-
"description": "Una plantilla de proyecto para crear una API web RESTful utilizando las API mínimas de ASP.NET Core publicadas como native AOT.",
4+
"description": "Una plantilla de proyecto para crear una API web RESTful utilizando las API mínimas de ASP.NET Core publicadas como native AOT, con soporte opcional para OpenAPI.",
55
"symbols/ExcludeLaunchSettings/description": "Indica si se va a excluir launchSettings.json de la plantilla generada.",
66
"symbols/kestrelHttpPort/description": "Número de puerto que se va a usar para el punto de conexión HTTP en launchSettings.json.",
77
"symbols/iisHttpPort/description": "Número de puerto que se va a usar para el punto de conexión HTTP de IIS Express en launchSettings.json.",
@@ -10,6 +10,7 @@
1010
"symbols/skipRestore/description": "Si se especifica, se omite la restauración automática del proyecto durante la creación.",
1111
"symbols/UseProgramMain/displayName": "No usar instrucciones de _nivel superior",
1212
"symbols/UseProgramMain/description": "Indica si se debe generar una clase Program explícita y un método Main en lugar de instrucciones de nivel superior.",
13+
"symbols/DisableOpenAPI/description": "Deshabilitar la compatibilidad con OpenAPI (Swagger)",
1314
"postActions/restore/description": "Restaure los paquetes NuGet necesarios para este proyecto.",
1415
"postActions/restore/manualInstructions/default/text": "Ejecutar \"dotnet restore\""
15-
}
16+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Microsoft",
33
"name": "API web ASP.NET Core (AOT natif)",
4-
"description": "Modèle de projet pour la création d’une API web RESTful à l’aide de ASP.NET Core api minimales publiées en tant qu’AOT natif.",
4+
"description": "Modèle de projet pour la création d’une API web RESTful à l’aide de ASP.NET Core api minimales publiées en tant qu’AOT natif, avec prise en charge optionnelle d’OpenAPI.",
55
"symbols/ExcludeLaunchSettings/description": "Indique s’il faut exclure launchSettings.json du modèle généré.",
66
"symbols/kestrelHttpPort/description": "Numéro de port à utiliser pour le point de terminaison HTTP dans launchSettings.json.",
77
"symbols/iisHttpPort/description": "Numéro de port à utiliser pour le point de terminaison HTTP IIS Express dans launchSettings.json.",
@@ -10,6 +10,7 @@
1010
"symbols/skipRestore/description": "S’il est spécifié, ignore la restauration automatique du projet lors de la création.",
1111
"symbols/UseProgramMain/displayName": "N’utilisez pas _d’instructions de niveau supérieur.",
1212
"symbols/UseProgramMain/description": "Indique s’il faut générer une classe Programme explicite et une méthode Main au lieu d’instructions de niveau supérieur.",
13+
"symbols/DisableOpenAPI/description": "Désactiver la prise en charge d’OpenAPI (Swagger)",
1314
"postActions/restore/description": "Restaurez les packages NuGet requis par ce projet.",
1415
"postActions/restore/manualInstructions/default/text": "Exécuter « dotnet restore »"
15-
}
16+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Microsoft",
33
"name": "API Web di ASP.NET Core (native AOT)",
4-
"description": "Modello di progetto per la creazione di un'API Web RESTful tramite API minime di ASP.NET Core pubblicate come native AOT.",
4+
"description": "Modello di progetto per la creazione di un'API Web RESTful tramite API minime di ASP.NET Core pubblicate come native AOT, con supporto opzionale per OpenAPI.",
55
"symbols/ExcludeLaunchSettings/description": "Indica se escludere launchSettings.json dal modello generato.",
66
"symbols/kestrelHttpPort/description": "Numero di porta da usare per l'endpoint HTTP in launchSettings.json.",
77
"symbols/iisHttpPort/description": "Numero di porta da usare per l'endpoint HTTP in launchSettings.json.",
@@ -10,6 +10,7 @@
1010
"symbols/skipRestore/description": "Se specificato, ignora il ripristino automatico del progetto durante la creazione.",
1111
"symbols/UseProgramMain/displayName": "Non usare_istruzioni di primo livello",
1212
"symbols/UseProgramMain/description": "Indica se generare una classe Program esplicita e un metodo Main anziché istruzioni di primo livello.",
13+
"symbols/DisableOpenAPI/description": "Disabilita il supporto di OpenAPI (Swagger)",
1314
"postActions/restore/description": "Ripristina i pacchetti NuGet richiesti da questo progetto.",
1415
"postActions/restore/manualInstructions/default/text": "Esegui 'dotnet restore'"
15-
}
16+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Microsoft",
33
"name": "ASP.NET Core Web API (native AOT)",
4-
"description": "最小限の API.NET Core API を使用して RESTful Web API を作成するプロジェクト テンプレート。native AOT として公開されます。",
4+
"description": "最小限の API.NET Core API を使用して RESTful Web API を作成するプロジェクト テンプレート。native AOT として公開されます。OpenAPI のサポートもオプションで利用できます。",
55
"symbols/ExcludeLaunchSettings/description": "生成されたテンプレートから launchSettings.json を除外するかどうか。",
66
"symbols/kestrelHttpPort/description": "launchSettings.json の HTTP エンドポイントに使用するポート番号。",
77
"symbols/iisHttpPort/description": "launchSettings.json の IIS Express HTTP エンドポイントに使用するポート番号。",
@@ -10,6 +10,7 @@
1010
"symbols/skipRestore/description": "指定した場合、作成時にプロジェクトの自動復元がスキップされます。",
1111
"symbols/UseProgramMain/displayName": "最上位レベルのステートメントを使用しない(_T)",
1212
"symbols/UseProgramMain/description": "最上位レベルのステートメントではなく、明示的な Program クラスと Main メソッドを生成するかどうか。",
13+
"symbols/DisableOpenAPI/description": "OpenAPI (Swagger) サポートを無効にする",
1314
"postActions/restore/description": "このプロジェクトに必要な NuGet パッケージを復元します。",
1415
"postActions/restore/manualInstructions/default/text": "'dotnet restore' を実行する"
15-
}
16+
}

0 commit comments

Comments
 (0)