VOOZH about

URL: https://www.nuget.org/packages/Boxed.AspNetCore.Swagger/

⇱ NuGet Gallery | Boxed.AspNetCore.Swagger 10.0.0




👁 Image
Boxed.AspNetCore.Swagger 10.0.0

Prefix Reserved
This package has a SemVer 2.0.0 package version: 10.0.0+build.460.
dotnet add package Boxed.AspNetCore.Swagger --version 10.0.0
 
 
NuGet\Install-Package Boxed.AspNetCore.Swagger -Version 10.0.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Boxed.AspNetCore.Swagger" Version="10.0.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Boxed.AspNetCore.Swagger" Version="10.0.0" />
 
Directory.Packages.props
<PackageReference Include="Boxed.AspNetCore.Swagger" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Boxed.AspNetCore.Swagger --version 10.0.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Boxed.AspNetCore.Swagger, 10.0.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Boxed.AspNetCore.Swagger@10.0.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Boxed.AspNetCore.Swagger&version=10.0.0
 
Install as a Cake Addin
#tool nuget:?package=Boxed.AspNetCore.Swagger&version=10.0.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

👁 .NET Boxed Banner

👁 Twitter URL
👁 Twitter Follow

.NET Core Extensions and Helper NuGet packages. If you are looking for the .NET Boxed project templates, you can find them here.

Boxed.Mapping

👁 Boxed.Mapping
👁 Boxed.Mapping NuGet Package Downloads

A simple and fast (fastest?) object to object mapper that does not use reflection. Read A Simple and Fast Object Mapper for more information.

public class MapFrom
{
 public bool BooleanFrom { get; set; }
 public int IntegerFrom { get; set; }
 public List<MapFromChild> ChildrenFrom { get; set; }
}
public class MapFromChild
{
 public DateTimeOffset DateTimeOffsetFrom { get; set; }
 public string StringFrom { get; set; }
}
 
public class MapTo
{
 public bool BooleanTo { get; set; }
 public int IntegerTo { get; set; }
 public List<MapToChild> ChildrenTo { get; set; }
}
public class MapToChild
{
 public DateTimeOffset DateTimeOffsetTo { get; set; }
 public string StringTo { get; set; }
}

public class DemoMapper : IMapper<MapFrom, MapTo>
{
 private readonly IMapper<MapFromChild, MapToChild> childMapper;
 
 public DemoMapper(IMapper<MapFromChild, MapToChild> childMapper) => this.childMapper = childMapper;
 
 public void Map(MapFrom source, MapTo destination)
 {
 destination.BooleanTo = source.BooleanFrom;
 destination.IntegerTo = source.IntegerFrom;
 destination.ChildrenTo = childMapper.MapList(source.ChildrenFrom);
 }
}

public class DemoChildMapper : IMapper<MapFromChild, MapToChild>
{
 public void Map(MapFromChild source, MapToChild destination)
 {
 destination.DateTimeOffsetTo = source.DateTimeOffsetFrom;
 destination.StringTo = source.StringFrom;
 }
}

public class UsageExample
{
 private readonly IMapper<MapFrom, MapTo> mapper = new DemoMapper();
 
 public MapTo MapOneObject(MapFrom source) => this.mapper.Map(source);
 
 public MapTo[] MapArray(List<MapFrom> source) => this.mapper.MapArray(source);
 
 public List<MapTo> MapList(List<MapFrom> source) => this.mapper.MapList(source);
 
 public IAsyncEnumerable<MapTo> MapAsyncEnumerable(IAsyncEnumerable<MapFrom> source) =>
 this.mapper.MapEnumerableAsync(source);
}

Also includes IImmutableMapper<TSource, TDestination> which is for mapping to immutable types like C# 9 record's and can also be used for enum types.

public record MapFrom(bool BooleanFrom, int IntegerFrom);
public record MapTo(bool BooleanTo, int IntegerTo);

public class DemoImmutableMapper : IImmutableMapper<MapFrom, MapTo>
{
 public MapTo Map(MapFrom source) => 
 new MapTo(source.BooleanFrom, source.IntegerFrom);
}

Boxed.AspNetCore

👁 Boxed.AspNetCore
👁 Boxed.AspNetCore NuGet Package Downloads

Provides ASP.NET Core middleware, MVC filters, extension methods and helper code for an ASP.NET Core project.

Fluent Interface Extensions

ILoggingBuilder Extensions

loggingBuilder
 .AddIfElse(
 hostingEnvironment.IsDevelopment(),
 x => x.AddConsole(...).AddDebug(),
 x => x.AddSerilog(...));

IConfiguration Extensions

this.configuration = new ConfigurationBuilder()
 .SetBasePath(hostingEnvironment.ContentRootPath)
 .AddJsonFile("config.json")
 .AddJsonFile($"config.{hostingEnvironment.EnvironmentName}.json", optional: true)
 .AddIf(
 hostingEnvironment.IsDevelopment(),
 x => x.AddUserSecrets())
 .AddEnvironmentVariables()
 .AddApplicationInsightsSettings(developerMode: !hostingEnvironment.IsProduction())
 .Build();

IApplicationBuilder Extensions

application
 .UseIfElse(
 environment.IsDevelopment(),
 x => x.UseDeveloperExceptionPage(),
 x => x.UseStatusCodePagesWithReExecute("/error/{0}/"))
 .UseIf(
 environment.IsStaging(),
 x => x.UseStagingSpecificMiddleware())
 .UseStaticFiles()
 .UseMvc();

SEO Friendly URL's

[HttpGet("product/{id}/{title}", Name = "GetProduct")]
public IActionResult GetProduct(int id, string title)
{
 var product = this.productRepository.Find(id);
 if (product == null)
 {
 return this.NotFound();
 }

 // Get the actual friendly version of the title.
 string friendlyTitle = FriendlyUrlHelper.GetFriendlyTitle(product.Title);

 // Compare the title with the friendly title.
 if (!string.Equals(friendlyTitle, title, StringComparison.Ordinal))
 {
 // If the title is null, empty or does not match the friendly title, return a 301 Permanent
 // Redirect to the correct friendly URL.
 return this.RedirectToRoutePermanent("GetProduct", new { id = id, title = friendlyTitle });
 }

 // The URL the client has browsed to is correct, show them the view containing the product.
 return this.View(product);
}

Canonical URL's

Boxed.AspNetCore.Swagger

👁 Boxed.AspNetCore.Swagger
👁 Boxed.AspNetCore.Swagger NuGet Package Downloads

Provides ASP.NET Core middleware, MVC filters, extension methods and helper code for an ASP.NET Core project implementing Swagger (OpenAPI).

Boxed.AspNetCore.TagHelpers

👁 Boxed.AspNetCore.TagHelpers
👁 Boxed.AspNetCore.TagHelpers NuGet Package Downloads

ASP.NET Core tag helpers for Subresource Integrity (SRI), Referrer meta tags, OpenGraph (Facebook) and Twitter social network meta tags. Read more at:

Subresource Integrity (SRI)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js" 
 asp-subresource-integrity-src="~/js/jquery.min.js"></script>

Social Network Meta Tags

Twitter Cards

<twitter-card-summary-large-image username="@@RehanSaeedUK">

Open Graph (Facebook)

<open-graph-website site-name="My Website"
 title="Page Title"
 main-image="@(new OpenGraphImage(
 Url.AbsoluteContent("~/img/1200x630.png"),
 ContentType.Png,
 1200,
 630))"
 determiner="OpenGraphDeterminer.Blank">

Boxed.DotnetNewTest

👁 Boxed.DotnetNewTest
👁 Boxed.DotnetNewTest NuGet Package Downloads

A unit test framework for project templates built using dotnet new.

  1. Install dotnet new based project templates from a directory.
  2. Run dotnet restore, dotnet build and dotnet publish commands.
  3. For ASP.NET Core project templates you can run dotnet run which gives you a HttpClient that you can use to call the app and run further tests.
public class ApiTemplateTest
{
 public ApiTemplateTest() => DotnetNew.Install<ApiTemplateTest>("ApiTemplate.sln").Wait();

 [Theory]
 [InlineData("StatusEndpointOn", "status-endpoint=true")]
 [InlineData("StatusEndpointOff", "status-endpoint=false")]
 public async Task RestoreAndBuild_CustomArguments_IsSuccessful(string name, params string[] arguments)
 {
 using (var tempDirectory = TempDirectory.NewTempDirectory())
 {
 var dictionary = arguments
 .Select(x => x.Split('=', StringSplitOptions.RemoveEmptyEntries))
 .ToDictionary(x => x.First(), x => x.Last());
 var project = await tempDirectory.DotnetNew("api", name, dictionary);
 await project.DotnetRestore();
 await project.DotnetBuild();
 }
 }

 [Fact]
 public async Task Run_DefaultArguments_IsSuccessful()
 {
 using (var tempDirectory = TempDirectory.NewTempDirectory())
 {
 var project = await tempDirectory.DotnetNew("api", "DefaultArguments");
 await project.DotnetRestore();
 await project.DotnetBuild();
 await project.DotnetRun(
 @"Source\DefaultArguments",
 async (httpClient, httpsClient) =>
 {
 var httpResponse = await httpsClient.GetAsync("status");
 Assert.Equal(HttpStatusCode.OK, httpResponse.StatusCode);
 });
 }
 }
}

Continuous Integration

Name Operating System Status History
Azure Pipelines Ubuntu 👁 Azure Pipelines Ubuntu Build Status
Azure Pipelines Mac 👁 Azure Pipelines Mac Build Status
Azure Pipelines Windows 👁 Azure Pipelines Windows Build Status
Azure Pipelines Overall 👁 Azure Pipelines Overall Build Status
👁 Azure DevOps Build History
GitHub Actions Ubuntu, Mac & Windows 👁 GitHub Actions Status
👁 GitHub Actions Build History
AppVeyor Ubuntu, Mac & Windows 👁 AppVeyor Build Status
👁 AppVeyor Build History

Contributions and Thanks

Please view the contributing guide for more information.

  • VictorioBerra - Helping to create the Boxed.DotnetNewTest NuGet package.
Product Versions Compatible and additional computed target framework versions.
.NET net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 was computed.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Boxed.AspNetCore.Swagger:

Repository Stars
Dotnet-Boxed/Templates
.NET project templates with batteries included, providing the minimum amount of code required to get you going faster.
Version Downloads Last Updated
10.0.0 495,816 11/9/2021
9.1.0 45,700 3/11/2021
9.0.1 315 9/14/2023
9.0.0 7,836 2/5/2021
8.0.0 7,792 11/23/2020
7.1.1 65,798 6/1/2020
7.1.0 340 6/1/2020
7.0.1-preview.0.29 372 4/3/2020
7.0.0 20,653 1/20/2020
6.0.1 2,967 12/16/2019
6.0.0 2,853 11/30/2019
5.1.0 19,305 7/14/2019
5.1.0-beta-0000 1,181 9/3/2019
5.0.0 17,014 12/27/2018
4.0.0 3,298 11/9/2018
3.0.1 4,871 10/1/2018
3.0.0 15,769 7/13/2018
2.0.0 4,797 6/6/2018
1.1.0 2,554 5/25/2018
1.0.0 3,006 5/6/2018