chore: Remove unused model SuccessResponse
This commit is contained in:
@@ -3,7 +3,6 @@
|
|||||||
# Base models
|
# Base models
|
||||||
from .base import (
|
from .base import (
|
||||||
BaseResponse,
|
BaseResponse,
|
||||||
SuccessResponse,
|
|
||||||
IdResponse,
|
IdResponse,
|
||||||
StatusResponse,
|
StatusResponse,
|
||||||
)
|
)
|
||||||
@@ -81,7 +80,6 @@ from .webdav import (
|
|||||||
__all__ = [
|
__all__ = [
|
||||||
# Base models
|
# Base models
|
||||||
"BaseResponse",
|
"BaseResponse",
|
||||||
"SuccessResponse",
|
|
||||||
"IdResponse",
|
"IdResponse",
|
||||||
"StatusResponse",
|
"StatusResponse",
|
||||||
# Notes models
|
# Notes models
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"""Base Pydantic models for common response patterns."""
|
"""Base Pydantic models for common response patterns."""
|
||||||
|
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from typing import Any, Dict, Optional, Union
|
from typing import Optional, Union
|
||||||
|
|
||||||
from pydantic import BaseModel, Field, field_serializer
|
from pydantic import BaseModel, Field, field_serializer
|
||||||
|
|
||||||
@@ -35,13 +35,6 @@ class BaseResponse(BaseModel):
|
|||||||
return iso_string
|
return iso_string
|
||||||
|
|
||||||
|
|
||||||
class SuccessResponse(BaseResponse):
|
|
||||||
"""Generic success response."""
|
|
||||||
|
|
||||||
message: Optional[str] = Field(None, description="Optional success message")
|
|
||||||
data: Optional[Dict[str, Any]] = Field(None, description="Optional response data")
|
|
||||||
|
|
||||||
|
|
||||||
class IdResponse(BaseResponse):
|
class IdResponse(BaseResponse):
|
||||||
"""Response model for operations that return a new ID."""
|
"""Response model for operations that return a new ID."""
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from nextcloud_mcp_server.models.base import BaseResponse, SuccessResponse
|
from nextcloud_mcp_server.models.base import BaseResponse
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ def test_timestamp_format_validation():
|
|||||||
seen in MCP inspector. MCP expects RFC3339 format with timezone information.
|
seen in MCP inspector. MCP expects RFC3339 format with timezone information.
|
||||||
"""
|
"""
|
||||||
# Create a response object
|
# Create a response object
|
||||||
response = SuccessResponse(message="Test message")
|
response = BaseResponse()
|
||||||
|
|
||||||
# Serialize to JSON (mimics what MCP inspector sees)
|
# Serialize to JSON (mimics what MCP inspector sees)
|
||||||
json_str = response.model_dump_json()
|
json_str = response.model_dump_json()
|
||||||
|
|||||||
Reference in New Issue
Block a user