Spaces:
Paused
Paused
File size: 844 Bytes
042f4ed | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Copyright (c) 2026 CrewHub. All rights reserved.
# Proprietary and confidential. See LICENSE for details.
"""Schemas for the A2A compliance validation endpoint."""
from typing import Literal
from pydantic import BaseModel, Field, field_validator
from src.schemas.agent import _validate_public_url
class ValidateRequest(BaseModel):
url: str = Field(max_length=500)
@field_validator("url")
@classmethod
def url_must_be_public(cls, v: str) -> str:
return _validate_public_url(v)
class ValidationCheck(BaseModel):
name: str
passed: bool
message: str
severity: Literal["error", "warning", "info"] = "error"
class ValidateResponse(BaseModel):
url: str
valid: bool
checks: list[ValidationCheck]
agent_name: str | None = None
skills_count: int = 0
suggestions: list[str] = []
|