Skip to content

Commit f80c112

Browse files
author
Oliver Kingston
committed
release: v0.1.1 — drop PhoneResult SPEC DRIFT comment block
postio-api 1.0.3 aligned the spec and runtime: PhoneResult.is_reachable is now boolean|nil (matches HLR return), and the runtime always emits every nullable field as explicit null instead of dropping them on parse failure. The .from_hash hash-lookup pattern naturally handles either shape, so no consumer-visible change beyond the dropped explanatory comment.
1 parent 617119c commit f80c112

4 files changed

Lines changed: 21 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ follows [SemVer](https://semver.org/).
66

77
## [Unreleased]
88

9+
## [0.1.1] — 2026-05-02
10+
11+
### Changed
12+
13+
- Drop the SPEC DRIFT block on `PhoneResult`. postio-api 1.0.3 aligned
14+
the spec with the runtime — `is_reachable` is bool|nil, and the
15+
runtime now always emits explicit nulls for every nullable field.
16+
The hash-lookup `.from_hash` already handled either shape, so no
17+
consumer-visible change.
18+
919
## [0.1.0] — 2026-05-02
1020

1121
Initial release. First Postio Ruby SDK on RubyGems.
@@ -35,5 +45,6 @@ Initial release. First Postio Ruby SDK on RubyGems.
3545
live API returns booleans there even though the spec says
3646
string-only. Aligned once postio-api ships a spec/runtime fix.
3747

38-
[Unreleased]: https://github.com/postio-uk/postio-ruby/compare/v0.1.0...HEAD
48+
[Unreleased]: https://github.com/postio-uk/postio-ruby/compare/v0.1.1...HEAD
49+
[0.1.1]: https://github.com/postio-uk/postio-ruby/releases/tag/v0.1.1
3950
[0.1.0]: https://github.com/postio-uk/postio-ruby/releases/tag/v0.1.0

CLAUDE.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ Local dev picks up `~/PROJECTS/ONNO/POSTIO/.env` via `set -a && source
6060
https://rubygems.org/profile/oidc/api_key_roles
6161
Bind to `(postio-uk/postio-ruby, release.yml, environment: rubygems)`.
6262

63-
## Spec drift
64-
65-
`PhoneResult` carries the same drift handling as the other SDKs: every
66-
nullable field defaults to `nil` (handled by hash lookup returning
67-
`nil` for missing keys), and `is_reachable` accepts either bool or
68-
string. Reapply if model is regenerated.
63+
## Spec ↔ runtime alignment
64+
65+
As of postio-api 1.0.3 the OpenAPI spec and runtime are aligned —
66+
`PhoneResult` is a clean mirror of the spec. The live API now always
67+
emits explicit nulls for every field (no missing-key fallbacks needed)
68+
and `is_reachable` is bool|nil only. If a future spec change
69+
re-introduces drift, prefer fixing it at the source (postio-api Zod
70+
schemas + handlers) over patching downstream.
6971

7072
## Secrets the CI needs
7173

lib/postio/models.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,6 @@ def self.from_hash(h)
109109
end
110110

111111
# PhoneResult — validation verdict for one phone number.
112-
#
113-
# SPEC DRIFT (2026-05-02): the OpenAPI spec marks every nullable
114-
# field as required, but on invalid input the live API drops them
115-
# entirely. The .from_hash fetcher uses h["..."] which returns nil
116-
# for missing keys, papering over the drift. Also: spec says
117-
# is_reachable is string|null, but the live API returns bool — we
118-
# accept either.
119112
PhoneResult = Data.define(
120113
:number, :is_valid, :is_possible, :type, :country_code, :country_name,
121114
:national_format, :international_format, :e164_format, :original_carrier,

lib/postio/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Postio
4-
VERSION = "0.1.0"
4+
VERSION = "0.1.1"
55
end

0 commit comments

Comments
 (0)