Add delivery and supplier HTTP APIs with expanded response docs.

Wire store-backed CRUD for goods receipts and suppliers, and teach the API doc generator to expand $ref/allOf/array samples so route markdown shows full JSON shapes.
This commit is contained in:
seb
2026-08-06 05:32:48 +02:00
parent a748bd5f5c
commit 1860f38640
52 changed files with 2515 additions and 66 deletions

View File

@@ -110,6 +110,96 @@
* gsprpinfo:
* type: string
* nullable: true
* Supplier:
* type: object
* required: [id, name, createdAt, updatedAt]
* properties:
* id:
* type: integer
* name:
* type: string
* createdAt:
* type: string
* format: date-time
* updatedAt:
* type: string
* format: date-time
* DeliverySummary:
* type: object
* required: [id, number, type, supplierId, date]
* properties:
* id:
* type: integer
* number:
* type: string
* type:
* type: string
* enum: [delivery]
* supplierId:
* type: integer
* nullable: true
* description: manifest.entity_id
* date:
* type: string
* format: date-time
* DeliveryLine:
* type: object
* required: [id, articleId, sku, amount, net, transactedAmount, rebate, tax, comment]
* properties:
* id:
* type: integer
* articleId:
* type: integer
* nullable: true
* sku:
* type: string
* nullable: true
* amount:
* type: number
* net:
* type: number
* transactedAmount:
* type: number
* rebate:
* type: number
* tax:
* type: number
* description: tax.rate
* comment:
* type: string
* nullable: true
* DeliveryLineInput:
* type: object
* required: [sku, amount, net, tax]
* properties:
* sku:
* type: string
* amount:
* type: number
* net:
* type: number
* tax:
* type: number
* description: Tax rate (resolved via tax.ensure)
* rebate:
* type: number
* description: Defaults to 0
* transactedAmount:
* type: number
* description: Defaults to amount
* comment:
* type: string
* nullable: true
* Delivery:
* allOf:
* - $ref: '#/components/schemas/DeliverySummary'
* - type: object
* required: [lines]
* properties:
* lines:
* type: array
* items:
* $ref: '#/components/schemas/DeliveryLine'
* ArticleImage:
* type: object
* required: [picId, sort, full, thumb, hash, thumbHash]