ProductBarcode: return an array of BarcodeProduct instead of one

This commit is contained in:
Crumb Owl
2025-07-02 11:54:24 +02:00
parent 09f29d82f4
commit a3c13a8a74
8 changed files with 197 additions and 36 deletions

View File

@@ -219,7 +219,10 @@
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/repo.ItemCreate"
"type": "array",
"items": {
"$ref": "#/definitions/repo.BarcodeProduct"
}
}
}
}
@@ -3093,6 +3096,37 @@
"TypeTime"
]
},
"repo.BarcodeProduct": {
"type": "object",
"properties": {
"barcode": {
"type": "string"
},
"imageBase64": {
"type": "string"
},
"imageURL": {
"type": "string"
},
"item": {
"$ref": "#/definitions/repo.ItemCreate"
},
"manufacturer": {
"type": "string"
},
"modelNumber": {
"description": "Identifications",
"type": "string"
},
"notes": {
"description": "Extras",
"type": "string"
},
"search_engine_name": {
"type": "string"
}
}
},
"repo.Group": {
"type": "object",
"properties": {

View File

@@ -646,6 +646,27 @@ definitions:
- TypeNumber
- TypeBoolean
- TypeTime
repo.BarcodeProduct:
properties:
barcode:
type: string
imageBase64:
type: string
imageURL:
type: string
item:
$ref: '#/definitions/repo.ItemCreate'
manufacturer:
type: string
modelNumber:
description: Identifications
type: string
notes:
description: Extras
type: string
search_engine_name:
type: string
type: object
repo.Group:
properties:
createdAt:
@@ -1564,7 +1585,9 @@ paths:
"200":
description: OK
schema:
$ref: '#/definitions/repo.ItemCreate'
items:
$ref: '#/definitions/repo.BarcodeProduct'
type: array
security:
- Bearer: []
summary: Search EAN from Barcode