feat: add path validation for archive, provider, sandbox, step, and identity IDs (#5526)
- Add validation for archive_id in archives.py - Add validation for provider_id in providers.py - Add validation for sandbox_config_id in sandbox_configs.py - Add validation for step_id in steps.py - Add validation for identity_id in identities.py - Update validators.py to include new primitives and remove mcp_server - Regenerate OpenAPI schema and SDK 🤖 Generated with Claude Code Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,23 @@ import re
|
||||
from fastapi import Path
|
||||
|
||||
# TODO: extract this list from routers/v1/__init__.py and ROUTERS
|
||||
primitives = ["agent", "message", "run", "job", "group", "block", "file", "folder", "source", "tool", "mcp_server"]
|
||||
primitives = [
|
||||
"agent",
|
||||
"message",
|
||||
"run",
|
||||
"job",
|
||||
"group",
|
||||
"block",
|
||||
"file",
|
||||
"folder",
|
||||
"source",
|
||||
"tool",
|
||||
"archive",
|
||||
"provider",
|
||||
"sandbox",
|
||||
"step",
|
||||
"identity",
|
||||
]
|
||||
|
||||
PRIMITIVE_ID_PATTERNS = {
|
||||
# f-string interpolation gets confused because of the regex's required curly braces {}
|
||||
|
||||
Reference in New Issue
Block a user