add contracts
This commit is contained in:
101
api/openapi.yaml
101
api/openapi.yaml
@ -1440,6 +1440,92 @@ paths:
|
||||
$ref: '#/components/schemas/note'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
/v1/contracts:
|
||||
get:
|
||||
tags: [ "contract" ]
|
||||
summary: Return all normalized contracts
|
||||
operationId: methods.get_contracts
|
||||
responses:
|
||||
'200':
|
||||
description: contracts response
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/contract'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
post:
|
||||
tags: [ "contract" ]
|
||||
summary: Insert a contract
|
||||
operationId: methods.insert_contract
|
||||
requestBody:
|
||||
description: contract
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contract'
|
||||
responses:
|
||||
'200':
|
||||
description: contract successfully inserted
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/contract'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
/v1/contracts/{contractId}:
|
||||
get:
|
||||
tags: [ "contract" ]
|
||||
summary: Return the normalized contract with given id
|
||||
operationId: methods.get_contract
|
||||
parameters:
|
||||
- name: contractId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
responses:
|
||||
'200':
|
||||
description: contract response
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/contract'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
put:
|
||||
tags: [ "contract" ]
|
||||
summary: Update a contract
|
||||
operationId: methods.update_contract
|
||||
parameters:
|
||||
- name: contractId
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
requestBody:
|
||||
description: contract
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/contract'
|
||||
responses:
|
||||
'200':
|
||||
description: contract successfully inserted
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/contract'
|
||||
security:
|
||||
- jwt: ['secret']
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# ATTENTION: This file will not be parsed by Cheetah
|
||||
@ -1818,6 +1904,21 @@ components:
|
||||
type: integer
|
||||
note:
|
||||
type: string
|
||||
contract:
|
||||
description: contract
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
supplier:
|
||||
type: string
|
||||
content:
|
||||
type: string
|
||||
identifier:
|
||||
type: string
|
||||
notes:
|
||||
type: string
|
||||
nullable: true
|
||||
|
||||
# -------------------------------------------------------------------
|
||||
# ATTENTION: This file will not be parsed by Cheetah
|
||||
|
Reference in New Issue
Block a user