diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b47ef8d..f07160a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,14 @@ - **Feature:** Add `CreateIsolatedNetwork` functionality - **Feature:** Add `ImageFromVolumePayload` functionality - **Feature:** Add `SystemRoutes` to `UpdateRoutingTableOfAreaPayload` -- `kms`: [v0.5.0](services/kms/CHANGELOG.md#v050) - - **Feature:** Add regex field validator for `display_name` attribute in model classes `CreateKeyPayload`, `CreateKeyRingPayload`, `CreateWrappingKeyPayload` +- `kms`: + - [v0.6.0](services/kms/CHANGELOG.md#v060) + - Set fields `description` and `import_only` to required in response struct `Key` + - Set fields `description` and `public_key` to required in response struct `WrappingKey` + - Set field `description` to required in response struct `KeyRing` + - Set field `disabled` to required in response struct `Version` + - [v0.5.0](services/kms/CHANGELOG.md#v050) + - **Feature:** Add regex field validator for `display_name` attribute in model classes `CreateKeyPayload`, `CreateKeyRingPayload`, `CreateWrappingKeyPayload` - `sqlserverflex`: [v1.1.1](services/sqlserverflex/CHANGELOG.md#v111) - **Breaking change:** Add region parameter in `ListMetrics` method. Previously the method failed, because the region parameter was missing - `mongodbflex`: [v1.2.2](services/mongodbflex/CHANGELOG.md#v122) diff --git a/services/kms/CHANGELOG.md b/services/kms/CHANGELOG.md index 7e880f8b..8f6c4297 100644 --- a/services/kms/CHANGELOG.md +++ b/services/kms/CHANGELOG.md @@ -1,3 +1,9 @@ +## v0.6.0 +- Set fields `description` and `import_only` to required in response struct `Key` +- Set fields `description` and `public_key` to required in response struct `WrappingKey` +- Set field `description` to required in response struct `KeyRing` +- Set field `disabled` to required in response struct `Version` + ## v0.5.0 - **Feature:** Add regex field validator for `display_name` attribute in model classes `CreateKeyPayload`, `CreateKeyRingPayload`, `CreateWrappingKeyPayload` diff --git a/services/kms/pyproject.toml b/services/kms/pyproject.toml index 05e0dc30..39799395 100644 --- a/services/kms/pyproject.toml +++ b/services/kms/pyproject.toml @@ -3,7 +3,7 @@ name = "stackit-kms" [tool.poetry] name = "stackit-kms" -version = "v0.5.0" +version = "v0.6.0" authors = [ "STACKIT Developer Tools ", ] diff --git a/services/kms/src/stackit/kms/models/key.py b/services/kms/src/stackit/kms/models/key.py index d84f6172..899a96b8 100644 --- a/services/kms/src/stackit/kms/models/key.py +++ b/services/kms/src/stackit/kms/models/key.py @@ -50,15 +50,15 @@ class Key(BaseModel): description="This date is set when a key is pending deletion and refers to the scheduled date of deletion", alias="deletionDate", ) - description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field( - default=None, description="A user chosen description to distinguish multiple keys." + description: Annotated[str, Field(strict=True, max_length=256)] = Field( + description="A user chosen description to distinguish multiple keys." ) display_name: Annotated[str, Field(strict=True, max_length=64)] = Field( description="The display name to distinguish multiple keys.", alias="displayName" ) id: StrictStr = Field(description="A auto generated unique id which identifies the keys.") - import_only: Optional[StrictBool] = Field( - default=False, description="States whether versions can be created or only imported.", alias="importOnly" + import_only: StrictBool = Field( + description="States whether versions can be created or only imported.", alias="importOnly" ) key_ring_id: StrictStr = Field( description="The unique id of the key ring this key is assigned to.", alias="keyRingId" diff --git a/services/kms/src/stackit/kms/models/key_ring.py b/services/kms/src/stackit/kms/models/key_ring.py index 8d1d1f9b..195c97cd 100644 --- a/services/kms/src/stackit/kms/models/key_ring.py +++ b/services/kms/src/stackit/kms/models/key_ring.py @@ -31,8 +31,8 @@ class KeyRing(BaseModel): created_at: datetime = Field( description="The date and time the creation of the key ring was triggered.", alias="createdAt" ) - description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field( - default=None, description="A user chosen description to distinguish multiple key rings." + description: Annotated[str, Field(strict=True, max_length=256)] = Field( + description="A user chosen description to distinguish multiple key rings." ) display_name: Annotated[str, Field(strict=True, max_length=64)] = Field( description="The display name to distinguish multiple key rings.", alias="displayName" diff --git a/services/kms/src/stackit/kms/models/version.py b/services/kms/src/stackit/kms/models/version.py index 93fb87d5..06cd31f7 100644 --- a/services/kms/src/stackit/kms/models/version.py +++ b/services/kms/src/stackit/kms/models/version.py @@ -44,7 +44,7 @@ class Version(BaseModel): description="The scheduled date when a version's key material will be erased completely from the backend", alias="destroyDate", ) - disabled: Optional[StrictBool] = Field(default=False, description="States whether versions is enabled or disabled.") + disabled: StrictBool = Field(description="States whether versions is enabled or disabled.") key_id: StrictStr = Field(description="The unique id of the key this version is assigned to.", alias="keyId") key_ring_id: StrictStr = Field( description="The unique id of the key ring the key of this version is assigned to.", alias="keyRingId" diff --git a/services/kms/src/stackit/kms/models/wrapping_key.py b/services/kms/src/stackit/kms/models/wrapping_key.py index 422ead66..e7b3f748 100644 --- a/services/kms/src/stackit/kms/models/wrapping_key.py +++ b/services/kms/src/stackit/kms/models/wrapping_key.py @@ -38,8 +38,8 @@ class WrappingKey(BaseModel): created_at: datetime = Field( description="The date and time the creation of the wrapping key was triggered.", alias="createdAt" ) - description: Optional[Annotated[str, Field(strict=True, max_length=256)]] = Field( - default=None, description="A user chosen description to distinguish multiple wrapping keys." + description: Annotated[str, Field(strict=True, max_length=256)] = Field( + description="A user chosen description to distinguish multiple wrapping keys." ) display_name: Annotated[str, Field(strict=True, max_length=64)] = Field( description="The display name to distinguish multiple wrapping keys.", alias="displayName" @@ -50,9 +50,7 @@ class WrappingKey(BaseModel): description="The unique id of the key ring this wrapping key is assigned to.", alias="keyRingId" ) protection: Protection - public_key: Optional[StrictStr] = Field( - default=None, description="The public key of the wrapping key.", alias="publicKey" - ) + public_key: StrictStr = Field(description="The public key of the wrapping key.", alias="publicKey") purpose: WrappingPurpose state: StrictStr = Field(description="The current state of the wrapping key.") __properties: ClassVar[List[str]] = [ @@ -134,8 +132,13 @@ def to_dict(self) -> Dict[str, Any]: * `None` is only added to the output dict for nullable fields that were set at model initialization. Other fields with value `None` are ignored. + * OpenAPI `readOnly` fields are excluded. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set( + [ + "public_key", + ] + ) _dict = self.model_dump( by_alias=True,