Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion activitysmith_openapi/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.2.0/python'
self.user_agent = 'OpenAPI-Generator/1.2.1/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion activitysmith_openapi/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.0.0\n"\
"SDK Package Version: 1.2.0".\
"SDK Package Version: 1.2.1".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
1 change: 0 additions & 1 deletion activitysmith_openapi/docs/MetricValueUpdateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Latest metric value to display in widgets.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | [**MetricValueUpdateRequestValue**](MetricValueUpdateRequestValue.md) | |
**timestamp** | **datetime** | Optional ISO timestamp for when the metric value was measured. Defaults to the server receive time. | [optional]

## Example

Expand Down
2 changes: 1 addition & 1 deletion activitysmith_openapi/docs/MetricsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Name | Type | Description | Notes
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Metric value updated | - |
**400** | Bad request (invalid key, value, or timestamp) | - |
**400** | Bad request (invalid key or value) | - |
**404** | Metric not found | - |
**429** | Rate limit exceeded | - |

Expand Down
11 changes: 4 additions & 7 deletions activitysmith_openapi/models/metric_value_update_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
import re # noqa: F401
import json

from datetime import datetime
from pydantic import BaseModel, ConfigDict, Field
from typing import Any, ClassVar, Dict, List, Optional
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from activitysmith_openapi.models.metric_value_update_request_value import MetricValueUpdateRequestValue
from typing import Optional, Set
from typing_extensions import Self
Expand All @@ -29,9 +28,8 @@ class MetricValueUpdateRequest(BaseModel):
Latest metric value to display in widgets.
""" # noqa: E501
value: MetricValueUpdateRequestValue
timestamp: Optional[datetime] = Field(default=None, description="Optional ISO timestamp for when the metric value was measured. Defaults to the server receive time.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["value", "timestamp"]
__properties: ClassVar[List[str]] = ["value"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -94,8 +92,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate({
"value": MetricValueUpdateRequestValue.from_dict(obj["value"]) if obj.get("value") is not None else None,
"timestamp": obj.get("timestamp")
"value": MetricValueUpdateRequestValue.from_dict(obj["value"]) if obj.get("value") is not None else None
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def make_instance(self, include_optional) -> MetricValueUpdateRequest:
model = MetricValueUpdateRequest()
if include_optional:
return MetricValueUpdateRequest(
value = None,
timestamp = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f')
value = None
)
else:
return MetricValueUpdateRequest(
Expand Down