Skip to content

Commit ad3d867

Browse files
Generator: Update SDK /services/auditlog (#2411)
* Generate auditlog * Generate authorization * Generate cdn * Generate git * Generate iaasalpha * Generate intake * Generate kms * Generate modelserving * Generate objectstorage * Generate resourcemanager * Generate scf * Generate serviceaccount * Generate serviceenablement * Generate ske * Add changelogs Signed-off-by: Alexander Dahmen <[email protected]> --------- Signed-off-by: Alexander Dahmen <[email protected]> Co-authored-by: Alexander Dahmen <[email protected]>
1 parent e553ab4 commit ad3d867

File tree

94 files changed

+1418
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1418
-55
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
## Release (2025-xx-xx)
2+
- `auditlog`: [v0.1.1](services/auditlog/CHANGELOG.md#v011)
3+
- **Bugfix:** Prevent year 0 timestamp issue
4+
- `authorization`: [v0.4.1](services/authorization/CHANGELOG.md#v041)
5+
- **Bugfix:** Prevent year 0 timestamp issue
6+
- `cdn`: [v1.7.1](services/cdn/CHANGELOG.md#v171)
7+
- **Bugfix:** Prevent year 0 timestamp issue
8+
- `git`: [v0.5.1](services/git/CHANGELOG.md#v051)
9+
- **Bugfix:** Prevent year 0 timestamp issue
10+
- `intake`: [v0.2.1](services/intake/CHANGELOG.md#v021)
11+
- **Bugfix:** Prevent year 0 timestamp issue
12+
- `kms`: [v0.4.1](services/kms/CHANGELOG.md#v041)
13+
- **Bugfix:** Prevent year 0 timestamp issue
14+
- `modelserving`: [v0.2.2](services/modelserving/CHANGELOG.md#v022)
15+
- **Bugfix:** Prevent year 0 timestamp issue
16+
- `objectstorage`: [v1.2.1](services/objectstorage/CHANGELOG.md#v121)
17+
- **Bugfix:** Prevent year 0 timestamp issue
18+
- `resourcemanager`: [v0.6.1](services/resourcemanager/CHANGELOG.md#v061)
19+
- **Bugfix:** Prevent year 0 timestamp issue
20+
- `scf`: [v0.2.1](services/scf/CHANGELOG.md#v021)
21+
- **Bugfix:** Prevent year 0 timestamp issue
22+
- `serviceaccount`: [v0.4.2](services/serviceaccount/CHANGELOG.md#v042)
23+
- **Bugfix:** Prevent year 0 timestamp issue
24+
- `serviceenablement`: [v1.1.1](services/serviceenablement/CHANGELOG.md#v111)
25+
- **Bugfix:** Prevent year 0 timestamp issue
26+
- `ske`: [v1.3.1](services/ske/CHANGELOG.md#v131)
27+
- **Bugfix:** Prevent year 0 timestamp issue
28+
129
## Release (2025-10-13)
230
- `observability`: [v0.11.0](services/observability/CHANGELOG.md#v0110)
331
- **Deprecation:** The `JaegerHttpTracesUrl` field is now deprecated in all relevant models and will be removed after 9th April 2026. Use the new `JaegerHttpUrl` field instead.

services/auditlog/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.1.1
2+
- **Bugfix:** Prevent year 0 timestamp issue
3+
14
## v0.1.0
25

36
- **New**: STACKIT Audit Log module for retrieving recorded actions and system changes. Download audit log entries for folders, organizations, and projects with time range filtering, pagination, and configurable result limits.

services/auditlog/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-auditlog"
33

44
[tool.poetry]
55
name = "stackit-auditlog"
6-
version = "v0.1.0"
6+
version = "v0.1.1"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

services/auditlog/src/stackit/auditlog/models/audit_log_entry_response.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import json
1717
import pprint
18+
import re # noqa: F401
1819
from datetime import datetime
1920
from typing import Any, ClassVar, Dict, List, Optional, Set
2021

@@ -118,13 +119,39 @@ class AuditLogEntryResponse(BaseModel):
118119
"visibility",
119120
]
120121

122+
@field_validator("event_time_stamp", mode="before")
123+
def event_time_stamp_change_year_zero_to_one(cls, value):
124+
"""Workaround which prevents year 0 issue"""
125+
if isinstance(value, str):
126+
# Check for year "0000" at the beginning of the string
127+
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
128+
if value.startswith("0000-01-01T") and re.match(
129+
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
130+
):
131+
# Workaround: Replace "0000" with "0001"
132+
return "0001" + value[4:] # Take "0001" and append the rest of the string
133+
return value
134+
121135
@field_validator("event_type")
122136
def event_type_validate_enum(cls, value):
123137
"""Validates the enum"""
124138
if value not in set(["ADMIN_ACTIVITY", "SYSTEM_EVENT", "POLICY_DENIED"]):
125139
raise ValueError("must be one of enum values ('ADMIN_ACTIVITY', 'SYSTEM_EVENT', 'POLICY_DENIED')")
126140
return value
127141

142+
@field_validator("received_time_stamp", mode="before")
143+
def received_time_stamp_change_year_zero_to_one(cls, value):
144+
"""Workaround which prevents year 0 issue"""
145+
if isinstance(value, str):
146+
# Check for year "0000" at the beginning of the string
147+
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
148+
if value.startswith("0000-01-01T") and re.match(
149+
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
150+
):
151+
# Workaround: Replace "0000" with "0001"
152+
return "0001" + value[4:] # Take "0001" and append the rest of the string
153+
return value
154+
128155
@field_validator("severity")
129156
def severity_validate_enum(cls, value):
130157
"""Validates the enum"""

services/auditlog/src/stackit/auditlog/models/error_response.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,19 @@
1515

1616
import json
1717
import pprint
18+
import re # noqa: F401
1819
from datetime import datetime
1920
from typing import Any, ClassVar, Dict, List, Optional, Set, Union
2021

21-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
22+
from pydantic import (
23+
BaseModel,
24+
ConfigDict,
25+
Field,
26+
StrictFloat,
27+
StrictInt,
28+
StrictStr,
29+
field_validator,
30+
)
2231
from typing_extensions import Self
2332

2433

@@ -33,6 +42,19 @@ class ErrorResponse(BaseModel):
3342
timestamp: Optional[datetime] = Field(default=None, description="Timestamp at which the error occurred.")
3443
__properties: ClassVar[List[str]] = ["message", "path", "status", "timestamp"]
3544

45+
@field_validator("timestamp", mode="before")
46+
def timestamp_change_year_zero_to_one(cls, value):
47+
"""Workaround which prevents year 0 issue"""
48+
if isinstance(value, str):
49+
# Check for year "0000" at the beginning of the string
50+
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
51+
if value.startswith("0000-01-01T") and re.match(
52+
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
53+
):
54+
# Workaround: Replace "0000" with "0001"
55+
return "0001" + value[4:] # Take "0001" and append the rest of the string
56+
return value
57+
3658
model_config = ConfigDict(
3759
populate_by_name=True,
3860
validate_assignment=True,

services/auditlog/src/stackit/auditlog/models/gateway_error_response.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717
import pprint
1818
from typing import Any, ClassVar, Dict, List, Optional, Set, Union
1919

20-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
20+
from pydantic import (
21+
BaseModel,
22+
ConfigDict,
23+
Field,
24+
StrictFloat,
25+
StrictInt,
26+
StrictStr,
27+
)
2128
from typing_extensions import Self
2229

2330

services/auditlog/src/stackit/auditlog/models/list_audit_log_entries_response.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717
import pprint
1818
from typing import Any, ClassVar, Dict, List, Optional, Set, Union
1919

20-
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
20+
from pydantic import (
21+
BaseModel,
22+
ConfigDict,
23+
Field,
24+
StrictFloat,
25+
StrictInt,
26+
StrictStr,
27+
)
2128
from typing_extensions import Self
2229

2330
from stackit.auditlog.models.audit_log_entry_response import AuditLogEntryResponse

services/authorization/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.4.1
2+
- **Bugfix:** Prevent year 0 timestamp issue
3+
14
## v0.4.0
25
- **Feature**: Add support for assignable subjects
36

services/authorization/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-authorization"
33

44
[tool.poetry]
55
name = "stackit-authorization"
6-
version = "v0.4.0"
6+
version = "v0.4.1"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

services/authorization/src/stackit/authorization/models/error_response.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515

1616
import json
1717
import pprint
18+
import re # noqa: F401
1819
from datetime import datetime
1920
from typing import Any, ClassVar, Dict, List, Optional, Set
2021

21-
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
22+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
2223
from typing_extensions import Self
2324

2425

@@ -34,6 +35,19 @@ class ErrorResponse(BaseModel):
3435
time_stamp: datetime = Field(alias="timeStamp")
3536
__properties: ClassVar[List[str]] = ["error", "message", "path", "status", "timeStamp"]
3637

38+
@field_validator("time_stamp", mode="before")
39+
def time_stamp_change_year_zero_to_one(cls, value):
40+
"""Workaround which prevents year 0 issue"""
41+
if isinstance(value, str):
42+
# Check for year "0000" at the beginning of the string
43+
# This assumes common date formats like YYYY-MM-DDTHH:MM:SS+00:00 or YYYY-MM-DDTHH:MM:SSZ
44+
if value.startswith("0000-01-01T") and re.match(
45+
r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\+\d{2}:\d{2}|Z)$", value
46+
):
47+
# Workaround: Replace "0000" with "0001"
48+
return "0001" + value[4:] # Take "0001" and append the rest of the string
49+
return value
50+
3751
model_config = ConfigDict(
3852
populate_by_name=True,
3953
validate_assignment=True,

0 commit comments

Comments
 (0)