Arshid.Aspire.ApiDocs.Extensions 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Arshid.Aspire.ApiDocs.Extensions --version 1.0.1
                    
NuGet\Install-Package Arshid.Aspire.ApiDocs.Extensions -Version 1.0.1
                    
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="Arshid.Aspire.ApiDocs.Extensions" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Arshid.Aspire.ApiDocs.Extensions" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Arshid.Aspire.ApiDocs.Extensions" />
                    
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 Arshid.Aspire.ApiDocs.Extensions --version 1.0.1
                    
#r "nuget: Arshid.Aspire.ApiDocs.Extensions, 1.0.1"
                    
#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.
#addin nuget:?package=Arshid.Aspire.ApiDocs.Extensions&version=1.0.1
                    
Install Arshid.Aspire.ApiDocs.Extensions as a Cake Addin
#tool nuget:?package=Arshid.Aspire.ApiDocs.Extensions&version=1.0.1
                    
Install Arshid.Aspire.ApiDocs.Extensions as a Cake Tool

<p align="center"> <a href="https://github.com/zandiarash/Arshid-Aspire-ApiDocs-Extensions"> <img src="https://github.com/user-attachments/assets/e0324879-a50d-43ec-9cbf-6a5d241e6ee0"> </a> </p>

<h1 align="center">Arshid Aspire ApiDocs Extensions</h1>

An extension to add Swagger, OpenApi, Scalar, CustomUrl and CustomRoute to .Net Aspire.

You can have ApiDocs and also your custom links in your .Net Aspire Dashboard like this : AspireDashboard

📦 How To

Simply add this nuget package
Arshid.Aspire.ApiDocs.Extensions

Nuget Package

Then add these lines for the project that has Swagger, Scalar or etc.

📦 Example

using Arshid.Aspire.ApiDocs.Extensions;

var apiService = builder.AddProject<Projects.AspireApp1_ApiService>("apiservice")
    .WithScalar()
    .WithSwagger()
    .WithOpenApi()
    .WithCustomUrl("https://127.0.0.1:5000/CustomRoute/CustomPage1")
    .WithRoute("/CustomRoute/CustomPage2"); //The URL become something like this {protocol}://{url}:{port}/CustomRoute/CustomPage2

Usage

If you are not familiar with Swagger, Scalar, OpenApi and similar tools please read from this article :

net-9-revolutionizing-documentation-of-apis-from-swashbuckle-to-scalar

🤝 Contributing is welcome

If you would like to contribute, please feel free to create a Pull Request.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.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

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.1.0 195 a month ago
1.0.2 113 2 months ago
1.0.1 91 2 months ago
1.0.0 98 2 months ago