NSwagStudio: A Windows desktop app for generating API client code in C# or TypeScript.You can take advantage of NSwag's code generation capabilities by choosing one of the following options: Register the Swagger generator and the Swagger UI middlewares Public void Configure(IApplicationBuilder app) In the Startup.Configure method, enable the middleware for serving the generated Swagger specification and the Swagger UI:.Public void ConfigureServices(IServiceCollection services) In the Startup.ConfigureServices method, register the required Swagger services:.Run the following command: dotnet add TodoApi.csproj package NSwag.AspNetCoreĪdd and configure Swagger in your ASP.NET Core app by performing the following steps: Select the "NSwag.AspNetCore" package from the results pane and click Add Package.Set the Add Packages window's Source drop-down to "". Right-click the Packages folder in Solution Pad > Add Packages.Select the "NSwag.AspNetCore" package from the Browse tab and click Install.Enter "NSwag.AspNetCore" in the search box.Right-click the project in Solution Explorer > Manage NuGet Packages.Navigate to the directory in which the TodoApi.csproj file existsĮxecute the following command: Install-Package NSwag.AspNetCore Go to View > Other Windows > Package Manager Console
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |