Class PathTree
- Namespace
- TypedRest.CodeGeneration.Patterns
- Assembly
- TypedRest.CodeGeneration.dll
A tree-like structure organizing OpenApiPathItems based on path prefixes.
public class PathTree
- Inheritance
-
objectPathTree
Properties
Children
A map of sub-paths to sub-trees.
public IDictionary<string, PathTree> Children { get; }
Property Value
Item
The OpenApiPathItem at this level of the tree, if any.
public OpenApiPathItem? Item { get; set; }
Property Value
Methods
Add(string[], OpenApiPathItem)
Adds a OpenApiPathItem to the tree.
public void Add(string[] path, OpenApiPathItem item)
Parameters
pathstring[]The path of the item.
itemOpenApiPathItemThe item.
From(OpenApiPaths)
Builds a PathTree from an OpenApiPaths collection.
public static PathTree From(OpenApiPaths paths)
Parameters
pathsOpenApiPaths