NodeExtensions extension

Extensions for OpenAPI Node model to add business logic capabilities

on

Properties

contentMap → Map<String, dynamic>

Available on Node, provided by the NodeExtensions extension

Get the content as a Map<String, dynamic>
no setter
validId → String

Available on Node, provided by the NodeExtensions extension

Get the ID with validation (throws if null)
no setter
validPathHash → String

Available on Node, provided by the NodeExtensions extension

Get the pathHash with validation (throws if null)
no setter
validRoot → String

Available on Node, provided by the NodeExtensions extension

Get the root with validation (throws if null)
no setter

Methods

copyWith({String? id, String? root, String? previous, String? pathHash, Map<String, dynamic>? content}) → Node

Available on Node, provided by the NodeExtensions extension

Create a copy of this node with updated fields
validate() → void

Available on Node, provided by the NodeExtensions extension

Validates that this node has all required fields for business operations

Static Methods

create({required String id, required String root, required String pathHash, required Map<String, dynamic> content, String? previous}) → Node

Available on Node, provided by the NodeExtensions extension

Create a Node from basic parameters with validation