Table of Contents

Class PathTree

Namespace
TypedRest.CodeGeneration.Patterns
Assembly
TypedRest.CodeGeneration.dll

A tree-like structure organizing OpenApiPathItems based on path prefixes.

public class PathTree
Inheritance
object
PathTree

Properties

Children

A map of sub-paths to sub-trees.

public IDictionary<string, PathTree> Children { get; }

Property Value

IDictionary<string, PathTree>

Item

The OpenApiPathItem at this level of the tree, if any.

public OpenApiPathItem? Item { get; set; }

Property Value

OpenApiPathItem

Methods

Add(string[], OpenApiPathItem)

Adds a OpenApiPathItem to the tree.

public void Add(string[] path, OpenApiPathItem item)

Parameters

path string[]

The path of the item.

item OpenApiPathItem

The item.

From(OpenApiPaths)

Builds a PathTree from an OpenApiPaths collection.

public static PathTree From(OpenApiPaths paths)

Parameters

paths OpenApiPaths

Returns

PathTree