Several fixes and optimizations all over the library #28
@@ -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 []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user