From 33f0965f6f27fd5351204e543b11cb898fb6297f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Brunat?= Date: Mon, 24 Aug 2026 14:15:08 +0200 Subject: [PATCH 1/2] chore: release 0.2.1 Bump the version in pyproject.toml and __init__.py, and add the 0.2.1 section to the CHANGELOG: the slash-only fqdn fix and create_domain(). --- CHANGELOG.md | 18 ++++++++++++++++++ pyproject.toml | 2 +- src/clever_cloud/__init__.py | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0682026..c1856b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project are documented in this file. +## 0.2.1 + +### Fixed + +- A domain whose `fqdn` is only slashes no longer yields `Domain(domain="")`. + `Domain.from_api_response()` validated the raw field and stripped the trailing + slashes afterwards, so `{"fqdn": "/"}` passed validation. The stripped value is + what gets validated now, and it raises the same `InvalidResponseError` as a + missing field. + +### Added + +- `create_domain()` attaches a domain (vhost) to an application. The name is + stripped of its trailing slash before being percent-encoded, so it round-trips + with `Domain.domain` and a path suffix such as `example.com/api` stays part of + the vhost name. Deployments that answer with an empty body are supported: the + returned `Domain` then carries the requested name. + ## 0.2.0 Addresses the security, correctness and design audit tracked in diff --git a/pyproject.toml b/pyproject.toml index 3d7e779..e7384ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "uv_build" [project] name = "clevercloud-sdk" -version = "0.2.0" +version = "0.2.1" description = "Python SDK for Clever Cloud" readme = "README.md" license = "Apache-2.0" diff --git a/src/clever_cloud/__init__.py b/src/clever_cloud/__init__.py index 5ea159c..cea4c6c 100644 --- a/src/clever_cloud/__init__.py +++ b/src/clever_cloud/__init__.py @@ -53,7 +53,7 @@ ) from clever_cloud.oauth_dance import OAuthConsumer, OAuthDance, RequestToken -__version__ = "0.2.0" +__version__ = "0.2.1" __all__ = [ "ApiTokenCredentials", From 3e6137af1bab2318c352bfdd13ac39691d52fe1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Brunat?= Date: Tue, 25 Aug 2026 14:35:52 +0200 Subject: [PATCH 2/2] docs: reference issue #9 in the 0.2.1 changelog section Matches the convention of the 0.2.0 section, which opens on the issue it addresses. --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1856b7..c390fc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project are documented in this file. ## 0.2.1 +Addresses [issue #9](https://github.com/CleverCloud/clevercloud-sdk-python/issues/9), +which reported how `Domain` parses its payload and the absence of a method to +attach a domain to an application. + ### Fixed - A domain whose `fqdn` is only slashes no longer yields `Domain(domain="")`.