Several fixes and optimizations all over the library #28

Merged
javier merged 22 commits from library/several-fixes-and-optimizations into main 2026-07-26 09:56:33 +00:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit 5b60892c2c - Show all commits
@@ -157,6 +157,7 @@ private extension AmiiboLiveClient {
.map { Amiibo($0) } .map { Amiibo($0) }
.sorted { $0.identifier < $1.identifier } .sorted { $0.identifier < $1.identifier }
case .none: case .none:
// The service returns `"amiibo": null` when an `id` filter matches nothing.
return [] return []
} }
} }
+4 -1
View File
@@ -564,7 +564,10 @@ components:
$ref: '#/components/schemas/GameSeries' $ref: '#/components/schemas/GameSeries'
# Wrapper Entities # Wrapper Entities
AmiiboWrapper: 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 type: object
properties: properties:
amiibo: amiibo: