feat(normalsub): Implement flexible, path-based subscription URLs

Refactors the NormalSub feature to move away from a hardcoded `/sub/normal/` path and a restrictive single-word subpath. This change introduces support for multi-segment, slash-separated subpaths (e.g., `path/to/resource`), providing greater flexibility for creating descriptive and structured subscription URLs.
This commit is contained in:
ReturnFI
2025-11-29 20:22:22 +00:00
parent 5049209df5
commit 76472dfde5
9 changed files with 31 additions and 24 deletions

View File

@ -6,7 +6,7 @@ class StartInputBody(BaseModel):
port: int
class EditSubPathInputBody(BaseModel):
subpath: str = Field(..., min_length=1, pattern=r"^[a-zA-Z0-9]+$", description="The new subpath, must be alphanumeric.")
subpath: str = Field(..., min_length=1, pattern=r"^[a-zA-Z0-9]+(?:/[a-zA-Z0-9]+)*$", description="The new subpath, must be alphanumeric.")
class GetSubPathResponse(BaseModel):
subpath: Optional[str] = Field(None, description="The current NormalSub subpath, or null if not set/found.")