This commit is contained in:
2025-09-27 22:57:59 +08:00
parent 8a458ff0a4
commit ed26244cdb
12585 changed files with 1914308 additions and 3474 deletions

View File

@@ -0,0 +1,94 @@
openapi: 3.0.3
info:
title: 条形码识别端口 API
version: 1.0.0
description: 本地视觉识别 EAN-13 的测试接口定义(示例)。
servers:
- url: http://localhost:8000
paths:
/recognize/ean13:
post:
summary: 识别 EAN-13✅ 完全实现Pyzbar+自研回退UI 与服务端可用)
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
"200":
description: 成功
content:
application/json:
schema:
type: object
properties:
code:
type: string
description: EAN-13 数字串(未识别为空字符串)
message:
type: string
type:
type: string
description: 命中的主类型;未识别为空
others:
type: array
items:
type: object
properties:
type:
type: string
code:
type: string
"400":
description: 参数错误
"500":
description: 服务器错误
/api/barcode/scan:
post:
summary: 图片上传并识别 EAN-13✅ 完全实现)
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
file:
type: string
format: binary
responses:
"200":
description: 成功
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
barcodeType:
type: string
example: EAN13
barcode:
type: string
example: 6901234567892
"400":
description: 无法识别或参数错误
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: false
message:
type: string
example: 无法识别,请重新上传