Schema class

Top-level schema representation parsed from the user's JSON file.

This mirrors the user-provided schema shape closely to keep parsing simple, while enabling nested response trees and presentation configuration for code generation.

Constructors

Schema({Api? api, Map<String, dynamic>? response, Map<String, (Map<String, dynamic>, bool)>? responses, Config? config, bool isList = false, bool isMultiResponse = false})
Schema.fromJson(Map<String, dynamic> json)
factory

Properties

api Api?
final
config Config?
final
hashCode int
The hash code for this object.
no setterinherited
isList bool
Whether the response is an array at the root level (single-response mode).
final
isMultiResponse bool
True when the response key uses the multi-response format.
final
response Map<String, dynamic>?
Single-response mode: the flat field map (or null in multi-response mode).
final
responses Map<String, (Map<String, dynamic>, bool)>?
Multi-response mode: map of entity-key → (field map, isList flag).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

responseParser(dynamic response) → (Map<String, dynamic>, bool)
Unwraps array responses for single-response mode, returning inner element map and flag.