Add: author search region for matching

This commit is contained in:
Nicholas Wallace 2024-05-19 01:33:00 +00:00
parent f32ef3d01c
commit 37d029e01a
3 changed files with 30 additions and 8 deletions

View file

@ -279,6 +279,8 @@ paths:
$ref: '#/components/schemas/authorSearchName' $ref: '#/components/schemas/authorSearchName'
asin: asin:
$ref: '../objects/entities/Author.yaml#/components/schemas/authorAsin' $ref: '../objects/entities/Author.yaml#/components/schemas/authorAsin'
region:
$ref: '../schemas.yaml#/components/schemas/region'
responses: responses:
'200': '200':
description: matchAuthorById OK description: matchAuthorById OK

View file

@ -357,14 +357,18 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"oneOf": [ "type": "object",
{ "properties": {
"q": {
"$ref": "#/components/schemas/authorSearchName"
},
"asin": {
"$ref": "#/components/schemas/authorAsin" "$ref": "#/components/schemas/authorAsin"
}, },
{ "region": {
"$ref": "#/components/schemas/authorSearchName" "$ref": "#/components/schemas/region"
}
} }
]
} }
} }
} }
@ -591,6 +595,9 @@
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
"type": "object",
"properties": {
"authors": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/components/schemas/authorExpanded" "$ref": "#/components/schemas/authorExpanded"
@ -598,6 +605,8 @@
} }
} }
} }
}
}
}, },
"404": { "404": {
"$ref": "#/components/responses/library404" "$ref": "#/components/responses/library404"
@ -1348,6 +1357,12 @@
"type": "string", "type": "string",
"example": "Terry Goodkind" "example": "Terry Goodkind"
}, },
"region": {
"description": "The region used to search.",
"type": "string",
"example": "us",
"default": "us"
},
"libraryName": { "libraryName": {
"description": "The name of the library.", "description": "The name of the library.",
"type": "string", "type": "string",

View file

@ -55,3 +55,8 @@ components:
type: boolean type: boolean
example: true example: true
default: false default: false
region:
description: The region used to search.
type: string
example: 'us'
default: 'us'