Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Release (2025-XX-XX)
- `authorization`: [v0.5.0](services/authorization/CHANGELOG.md#v050)
- Add new `etag` attribute to `Role` model class

## Release (2025-11-14)
- `cdn`:
- [v2.1.0](services/cdn/CHANGELOG.md#v210)
Expand Down
3 changes: 3 additions & 0 deletions services/authorization/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## v0.5.0
- Add new `etag` attribute to `Role` model class

## v0.4.1
- **Bugfix:** Prevent year 0 timestamp issue

Expand Down
2 changes: 1 addition & 1 deletion services/authorization/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "stackit-authorization"

[tool.poetry]
name = "stackit-authorization"
version = "v0.4.1"
version = "v0.5.0"
authors = [
"STACKIT Developer Tools <[email protected]>",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re # noqa: F401
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, Field, field_validator
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
from typing_extensions import Annotated, Self

from stackit.authorization.models.permission import Permission
Expand All @@ -30,10 +30,11 @@ class Role(BaseModel):
""" # noqa: E501

description: Annotated[str, Field(strict=True, max_length=255)]
etag: Optional[StrictStr] = None
id: Optional[Annotated[str, Field(strict=True)]] = None
name: Annotated[str, Field(strict=True)]
permissions: List[Permission]
__properties: ClassVar[List[str]] = ["description", "id", "name", "permissions"]
__properties: ClassVar[List[str]] = ["description", "etag", "id", "name", "permissions"]

@field_validator("id")
def id_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -110,6 +111,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
_obj = cls.model_validate(
{
"description": obj.get("description"),
"etag": obj.get("etag"),
"id": obj.get("id"),
"name": obj.get("name"),
"permissions": (
Expand Down