diff --git a/docs/resources/llama-stack-spec.html b/docs/resources/llama-stack-spec.html index cd92a10f5..050a16223 100644 --- a/docs/resources/llama-stack-spec.html +++ b/docs/resources/llama-stack-spec.html @@ -2893,9 +2893,16 @@ ] }, "URL": { - "type": "string", - "format": "uri", - "pattern": "^(https?://|file://|data:)" + "type": "object", + "properties": { + "uri": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "uri" + ] }, "UserMessage": { "type": "object", diff --git a/docs/resources/llama-stack-spec.yaml b/docs/resources/llama-stack-spec.yaml index 08db0699e..b5a209e89 100644 --- a/docs/resources/llama-stack-spec.yaml +++ b/docs/resources/llama-stack-spec.yaml @@ -3105,9 +3105,13 @@ components: title: A single turn in an interaction with an Agentic System. type: object URL: - format: uri - pattern: ^(https?://|file://|data:) - type: string + additionalProperties: false + properties: + uri: + type: string + required: + - uri + type: object UnregisterDatasetRequest: additionalProperties: false properties: diff --git a/llama_stack/apis/common/content_types.py b/llama_stack/apis/common/content_types.py index 316a4a5d6..121218a29 100644 --- a/llama_stack/apis/common/content_types.py +++ b/llama_stack/apis/common/content_types.py @@ -11,15 +11,10 @@ from llama_models.schema_utils import json_schema_type, register_schema from pydantic import BaseModel, Field, model_validator -@json_schema_type( - schema={"type": "string", "format": "uri", "pattern": "^(https?://|file://|data:)"} -) +@json_schema_type class URL(BaseModel): uri: str - def __str__(self) -> str: - return self.uri - class _URLOrData(BaseModel): url: Optional[URL] = None