attachToGroup method
Attaches this endpoint to an API group.
An endpoint may only belong to one group. Re-attaching to the same group is allowed so composition remains rerunnable.
Implementation
void attachToGroup(String groupName) {
final existing = _groupName;
if (existing != null && existing != groupName) {
throw StateError(
'Endpoint "$name" is already attached to API group "$existing".',
);
}
_groupName = groupName;
}