Documented the optional amiibo wrapper property behaviour at the OpenAPI specification in the library target.

This commit is contained in:
2026-07-26 10:07:47 +02:00
parent 2b34b5a497
commit 5b60892c2c
2 changed files with 5 additions and 1 deletions
@@ -157,6 +157,7 @@ private extension AmiiboLiveClient {
.map { Amiibo($0) }
.sorted { $0.identifier < $1.identifier }
case .none:
// The service returns `"amiibo": null` when an `id` filter matches nothing.
return []
}
}
+4 -1
View File
@@ -564,7 +564,10 @@ components:
$ref: '#/components/schemas/GameSeries'
# Wrapper Entities
AmiiboWrapper:
description: A response wrapper that contains zero, one, or more amiibos.
description: |
A response wrapper that contains zero, one, or more amiibos.
Note: Unlike the other response wrappers, the `amiibo` property is deliberately not required: the service returns `"amiibo": null` when an `id` filter matches nothing, and an empty list when other filters match nothing. The property must therefore remain optional for decoding to succeed in both cases.
type: object
properties:
amiibo: