fix(specs): narrow Detection type enum to each subclass's own value

Each Detection subclass now declares only its own type value in the enum
rather than sharing the full ['runtime', 'framework'] list. This prevents
SDK validators from accepting invalid values on concrete models.
This commit is contained in:
Chirag Aggarwal
2026-04-16 13:16:13 +05:30
parent 6dc17c91bc
commit 98ec9e45c4
@@ -15,7 +15,7 @@ abstract class Detection extends Model
'description' => 'Repository detection type.',
'default' => $type,
'example' => $type,
'enum' => ['runtime', 'framework'],
'enum' => [$type],
])
->addRule('variables', [
'type' => Response::MODEL_DETECTION_VARIABLE,