Map<String, Object?> toJson() => { 'name': name, if (schema != null) 'schema': schema, if (definition != null) 'definition': definition, };