Documented the optional amiibo wrapper property behaviour at the OpenAPI specification in the library target.
This commit is contained in:
@@ -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 []
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user