Adding Descriptions to Swagger Generated OpenAPI Documentation

Enhancing API Documentation Swashbuckle tooling for Swagger provides an easy way to document APIs in ASP.NET Core with out of the box functionality that creates a lot without additional customization. The OpenAPI spec allows for a lot of additional description to be included, and by annotating your code in appropriate places the Swagger generation can automatically fill these for you. Many of these additional descriptions also show up in the automatically generated Swagger UI....

September 30, 2023 · 7 min · 1327 words · John Bowen

Embedding appsettings.json Files for Single File Publishing

Appsettings.json Files The configuration system in ASP.NET Core is a flexible way to manage settings, with each of the different providers made available to apps as a unified IConfiguration object. Under normal circumstances adding settings to appsettings.json and environment specific appsettings files is an easy way to configure an app being deployed as a container or set of files on a web server, while also being flexible at development time. In other cases an app needs to be deployed as a single package with a fixed set of configuration settings included that shouldn’t be editable by end users....

August 20, 2023 · 4 min · 840 words · John Bowen

Adding Bearer Token Authentication to Swagger API Test UI in ASP.NET Core

Swagger OpenApi Doc Generation The Swagger tooling provided by Swashbuckle in ASP.NET Core can be used to auto-generate OpenAPI docs and a test UI for exercising your API through the browser without external tooling. The basic setup only requires a few lines of code and is currently optionally included in many of the standard dotnet templates that produce APIs. A simple setup includes adding two services and two middleware registrations:...

July 27, 2023 · 6 min · 1079 words · John Bowen

Maintaining Window Size and Position in MAUI Apps on Desktop

MAUI Desktop Windows With roots in Xamarin Forms, MAUI is primarily geared toward mobile OS environments. But with its ability to run on both Windows and Mac desktops it can be a useful option for desktop .NET apps to go cross-platform. Some desktop specific features can be painful to use, or even entirely unavailable, but things are improving with each release. Restoring window sizing and placement across app relaunches is one feature that makes a big usability difference for desktop apps, but doesn’t come for free....

June 17, 2023 · 3 min · 594 words · John Bowen

SQL Saturday LA 2023 - Easy Data Transfer Using (and Extending) the Cosmos DB Data Migration Tool

Thanks to everyone for attending and to the organizers and sponsors for a great event! Slides Data Migration Tool GitHub Project GUI Branch CSV Extension PR Data Migration Tool in Microsoft Docs SQL Saturday

June 10, 2023 · 1 min · 34 words · John Bowen