PromptArgument.fromJson constructor
Construct from the spec JSON shape — convenient for callers that don't want to import this typed class (e.g., generic adapters).
Implementation
factory PromptArgument.fromJson(Map<String, dynamic> json) {
return PromptArgument(
name: json['name'] as String,
description: (json['description'] ?? '') as String,
required: (json['required'] ?? false) as bool,
defaultValue: json['default'] as String?,
);
}