enumProperty static method
Create an enum property schema
Implementation
static Map<String, dynamic> enumProperty({
required List<String> values,
String? description,
bool required = false,
String? defaultValue,
}) {
final schema = <String, dynamic>{
'type': 'string',
'enum': values,
if (description != null) 'description': description,
if (defaultValue != null) 'default': defaultValue,
};
return schema;
}