feat(api): add strict_names and batch node and link creation

This commit is contained in:
Mark Paronyan committed 2026-10-07 15:35:45 +03:00
1 parent 2fb7056cb9
commit e1a27dadcf
11 files changed
+359 -37

No files matched your search

+11
View File
@@ -20,6 +20,7 @@ from uuid import UUID, uuid4
from pydantic import BaseModel, Field, field_validator
from ..common import ErrorMessage
from ..update import PartialUpdateModel
from .labels import Label
@@ -97,6 +98,16 @@ class Link(LinkBase):
)
class LinkBatchResult(BaseModel):
"""
Outcome of one link of a batch creation request.
"""
status_code: int = Field(..., description="HTTP status code the same request would have returned on its own")
link: Optional[Link] = Field(None, description="The created link, set when status_code is 201")
error: Optional[ErrorMessage] = Field(None, description="The error, set when the link could not be created")
class UDPPortInfo(BaseModel):
"""
UDP port information.