Interactive Documentation Try .Net

NEW TOOLTo capture reader interest, Microsoft has launched a new tool, “Try .Net” for the community to read the docs, run the code, and edit all in on place.This article demonstrates how to use “Try .Net” to create interactive documentation, both Online & Offline, for .Net Core.PrerequisitesTo make documentation interactive, we need the following toolsTry .Net tool: How to install … Continue reading Interactive Documentation Try .Net

Configure annotations in Swagger documentation for asp.net core api

.NET Core PROGRAMMINGSwashbuckle proposes some useful annotations to enrich documentation. This article describes how to enable annotations.PrerequisitesHow to configure swagger for asp.net core API?Getting StartedStep 1: Install below package:Swashbuckle.AspNetCore.AnnotationsStep 2: Add below code inside ConfigureServices function in startup.cs fileservices.AddSwaggerGen(c =>{c.EnableAnnotations();});CONFIGURESERVICES FUNCTION INSIDE STARTUP.CS FILEHow to add Operation AnnotationSwaggerOperation is a useful attribute where you can … Continue reading Configure annotations in Swagger documentation for asp.net core api

Swagger Configuration for .Net Core Api

.NET PROGRAMMINGThis article demonstrates how to attach swagger UI.PrerequisitesHow to create a .net core web API project in visual studio Link.Getting StartedStep 1: Install below two nuget packages :Swashbuckle.AspNetCore.SwaggerSwashbuckle.AspNetCore.AnnotationsStep 2: Add swagger.json configuration file in project root directory.Step 3: Add below code to startup.cs file, under ConfigureServices function (Refer Screenshot)services.AddSwaggerGen(c => { c.SwaggerDoc(“v1”, new Swashbuckle.AspNetCore.Swagger.Info { Title = … Continue reading Swagger Configuration for .Net Core Api