Makspll.PathfinderLib 0.3.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Makspll.PathfinderLib --version 0.3.2                
NuGet\Install-Package Makspll.PathfinderLib -Version 0.3.2                
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="Makspll.PathfinderLib" Version="0.3.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Makspll.PathfinderLib --version 0.3.2                
#r "nuget: Makspll.PathfinderLib, 0.3.2"                
#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.
// Install Makspll.PathfinderLib as a Cake Addin
#addin nuget:?package=Makspll.PathfinderLib&version=0.3.2

// Install Makspll.PathfinderLib as a Cake Tool
#tool nuget:?package=Makspll.PathfinderLib&version=0.3.2                

Pathfinder

<p align="center"> <img src="https://i.imgur.com/TEDoP2L.jpeg" alt="Pathfinder" width="300"/> </p>

Finds and outputs all API routes found in a .NET assembly in textual or JSON format.

Features

  • Attribute based routing
  • Conventional routing (templates + defaults have to be specified in a config file)
  • .NET core support
  • .NET framework support
  • JSON and Text output
  • Configurable backing lib for projects with custom routing mechanisms

Installation

Prerequisites

  • .NET 7 or later installed (only for running CLI, not in your project)

CLI

  • dotnet tool install -g Makspll.Pathfinder

Usage

pathfinder --help
dotnet build your-project
pathfinder **/bin/**/yourdllname.dll -o Text

image

Configuration

Config file

The program is configured via pathfinder.json files found in your project. If the file is not found you can specify a path via the -c flag.

Currently the file needs to specify all your conventional routing configuration (anything that isn't attribute based).

.NET framework

In .NET framework projects, you will need to specify whether each of your routes is an MVC or API route. This is done by adding a Type field to each route in the config file.

{
    "ConventionalRoutes": [
        {
            "Template": "conventionalprefix/{controller}/{action}",
            "Type": "MVC"
        },
        {
            "Template": "conventionalprefix2/{controller}",
            "Defaults": {
                "action": "DefaultAction"
            },
            "Type": "MVC"
        },
        {
            "Template": "conventionalwithnoactionspecs",
            "Defaults": {
                "controller": "DefaultConventional",
                "action": "DefaultAction"
            },
            "Type": "MVC"
        },
        {
            "Template": "apiconventionalprefix/{controller}/{action}",
            "Type": "API"
        },
        {
            "Template": "apiconventionalprefix2/{controller}",
            "Defaults": {
                "action": "DefaultAction"
            },
            "Type": "API"
        },
        {
            "Template": "apiconventionalwithnoactionspecs",
            "Defaults": {
                "controller": "ApiDefaultConventionalApi",
                "action": "DefaultAction"
            },
            "Type": "API"
        }
    ]
}

.NET core

.NET core does not make such a distinction, you shouldn't specify the type of controller:

{
    "ConventionalRoutes": [
        {
            "Template": "conventionalprefix/{controller}/{action}"
        },
        {
            "Template": "conventionalprefix2/{controller}",
            "Defaults": {
                "action": "DefaultAction"
            }
        },
        {
            "Template": "conventionalwithnoactionspecs",
            "Defaults": {
                "controller": "DefaultConventional",
                "action": "DefaultAction"
            }
        }
    ]
}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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
0.4.2 89 11/9/2024
0.4.1 77 11/8/2024
0.4.0 75 11/8/2024
0.3.2 82 11/1/2024
0.3.1 81 10/31/2024
0.3.0 80 10/29/2024
0.2.2 79 10/29/2024
0.2.1 76 10/29/2024
0.2.0 81 10/28/2024
0.1.2 79 10/28/2024
0.1.1 72 10/28/2024
0.1.0 85 10/28/2024