mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user