dotnet aks api template
1.0.0
AKSの完全な機能、12ファクター、ASP.NETコアWeb APIを作成するためのdotnet newテンプレート。
dotnet new -i RobBell.AksApi.Template
テンプレートは、公式のNugetリポジトリから解決します。
Myapiという名前の新しいプロジェクトを作成するには:
dotnet new aksapi -n MyApi
その他のオプションは次のとおりです。
--controller-name The name of the default controller
Default: SampleController
--disable-open-api Disable OpenAPI (Swagger) support
Default: false
--disable-health-check Disable liveness and readiness support
Default: false
--disable-logging Disable Logging and AppInsights support
Default: false
--instrumentation-key The AppInsights application key if logging is enabled
Default: 11111111-1111-1111-11111111111111111
--skip-restore Skips the restore of the project on create
Default: false
dotnet restore dotnet new作成マップ1:1リポジトリを使用する必要がありますか? テンプレートを変更した後、以下のスクリプトを実行して、ローカルに梱包およびインストールします。
./pack-and-install.sh
完了したら、次のようにテンプレートから新しいプロジェクトを作成できます。
dotnet new aksapi
試す:
dotnet new -i RobBell.AksApi.Template --nuget-source https://api.nuget.org/v3/index.json
公式リポジトリからテンプレートのインストールを妨げるパッケージソースにプライベートNugetリポジトリがある場合があります。例えば:
C:Program Filesdotnetsdk3.1.403NuGet.targets(128,5):
error : Unable to load the service index for source https://myprivatenugetrepo.com/nuget/v3/index.json.
C:Program Filesdotnetsdk3.1.403NuGet.targets(128,5):
error : Response status code does not indicate success: 401 (Unauthorized).