ham-fisted, manually wired... but working (#967)

This commit is contained in:
Michael Quigley
2025-05-30 12:59:10 -04:00
parent 2cecf14143
commit a7899b3a98
11 changed files with 77 additions and 2 deletions

View File

@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**version** | **str** | | [optional]
**shares** | [**List[Share]**](Share.md) | | [optional]
## Example

View File

@ -35,6 +35,7 @@ class TestAgentStatus200Response(unittest.TestCase):
model = AgentStatus200Response()
if include_optional:
return AgentStatus200Response(
version = '',
shares = [
zrok_api.models.share.share(
share_token = '',

View File

@ -17,7 +17,7 @@ import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from zrok_api.models.share import Share
from typing import Optional, Set
@ -27,8 +27,9 @@ class AgentStatus200Response(BaseModel):
"""
AgentStatus200Response
""" # noqa: E501
version: Optional[StrictStr] = None
shares: Optional[List[Share]] = None
__properties: ClassVar[List[str]] = ["shares"]
__properties: ClassVar[List[str]] = ["version", "shares"]
model_config = ConfigDict(
populate_by_name=True,
@ -88,6 +89,7 @@ class AgentStatus200Response(BaseModel):
return cls.model_validate(obj)
_obj = cls.model_validate({
"version": obj.get("version"),
"shares": [Share.from_dict(_item) for _item in obj["shares"]] if obj.get("shares") is not None else None
})
return _obj