Skip to content
Snippets Groups Projects
Commit 0ed721ec authored by BEAUVAIS ANTOINE's avatar BEAUVAIS ANTOINE
Browse files

Updated OpenAPI specification.

parent bc1a07f2
1 merge request!13Attempt to get OpenAPI specification working.
This commit is part of merge request !13. Comments created here will be created in the context of that merge request.
openapi: "3.0.0"
info:
version: 0.0.1-20210924
version: 0.0.1-20210926
title: SIL ERP BACK
description: Interface API between the SIL ERP services and the BACK component.
# termsOfService: https://git.unistra.fr/erp-sil/back
......@@ -70,6 +70,26 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/retrieveStocks:
get:
description: |
Returns the stocks for each item (their quantity).
operationId: retrieveStocks
responses:
'200':
description: List of stock entries.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Stock'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/submitTransaction:
post:
description: Submits a new transaction into the system.
......@@ -134,22 +154,44 @@ components:
subscriberPrice:
type: number
example: 0.8
Stock:
type: object
required:
- id
- itemId
- itemName
- quantity
properties:
id:
type: integer
example: 1
itemId:
type: integer
example: 1
itemName:
type: string
example: "Jus d'orange"
quantity:
type: integer
example: 25
Transaction:
type: object
required:
- item
- type
- quantity
- amount
properties:
item:
type: integer
example: 1
type:
type: integer
description: ACHAT, REGLEMENT, VENTE, ENCAISSEMENT
enum: [1, 2, 3, 4]
example: 1
quantity:
type: integer
example: 5
amount:
type: number
example: 4.0
ErrorMessage:
type: object
required:
......
......@@ -4,8 +4,6 @@
*/
package fr.unistra.sil.erp.back.model;
import java.math.BigDecimal;
/**
* Representation of a transaction.
*
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment