added api docs
This commit is contained in:
35
interface/api/recipients/archive.yaml
Normal file
35
interface/api/recipients/archive.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
get:
|
||||
tags: [Recipients]
|
||||
summary: Archive/unarchive recipient
|
||||
operationId: recipientsArchive
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
|
||||
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
|
||||
- name: archived
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: boolean
|
||||
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
|
||||
responses:
|
||||
'200':
|
||||
description: Archive state updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
8
interface/api/recipients/bodies/recipient.yaml
Normal file
8
interface/api/recipients/bodies/recipient.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
components:
|
||||
requestBodies:
|
||||
RecipientBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/recipient.yaml#/components/schemas/RecipientRequest
|
||||
32
interface/api/recipients/create.yaml
Normal file
32
interface/api/recipients/create.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
post:
|
||||
tags: [Recipients]
|
||||
summary: Create recipient
|
||||
operationId: recipientsCreate
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
|
||||
requestBody:
|
||||
$ref: ./bodies/recipient.yaml#/components/requestBodies/RecipientBody
|
||||
responses:
|
||||
'201':
|
||||
description: Recipient created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'409':
|
||||
$ref: ../response/operation.yaml#/components/responses/Conflict
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
32
interface/api/recipients/list.yaml
Normal file
32
interface/api/recipients/list.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
get:
|
||||
tags: [Recipients]
|
||||
summary: List recipients
|
||||
operationId: recipientsList
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/org_ref.yaml#/components/parameters/OrgRef
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
|
||||
- $ref: ../parameters/offset.yaml#/components/parameters/Offset
|
||||
- $ref: ../parameters/archived.yaml#/components/parameters/Archived
|
||||
responses:
|
||||
'200':
|
||||
description: Recipient list
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
62
interface/api/recipients/object.yaml
Normal file
62
interface/api/recipients/object.yaml
Normal file
@@ -0,0 +1,62 @@
|
||||
get:
|
||||
tags: [Recipients]
|
||||
summary: Get recipient by reference
|
||||
operationId: recipientsGet
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
|
||||
responses:
|
||||
'200':
|
||||
description: Recipient data
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
|
||||
delete:
|
||||
tags: [Recipients]
|
||||
summary: Delete recipient
|
||||
operationId: recipientsDelete
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/recipients_ref.yaml#/components/parameters/RecipientsRef
|
||||
- $ref: ../parameters/cascade.yaml#/components/parameters/Cascade
|
||||
responses:
|
||||
'200':
|
||||
description: Recipient deleted
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
4
interface/api/recipients/request/recipient.yaml
Normal file
4
interface/api/recipients/request/recipient.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
components:
|
||||
schemas:
|
||||
RecipientRequest:
|
||||
$ref: ../../../models/recipient/recipient.yaml#/components/schemas/Recipient
|
||||
15
interface/api/recipients/response/recipient.yaml
Normal file
15
interface/api/recipients/response/recipient.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
components:
|
||||
schemas:
|
||||
RecipientsAuthData:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
- recipients
|
||||
properties:
|
||||
accessToken:
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
recipients:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../models/recipient/recipient.yaml#/components/schemas/Recipient
|
||||
30
interface/api/recipients/update.yaml
Normal file
30
interface/api/recipients/update.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
put:
|
||||
tags: [Recipients]
|
||||
summary: Update recipient
|
||||
operationId: recipientsUpdate
|
||||
security:
|
||||
- bearerAuth: []
|
||||
requestBody:
|
||||
$ref: ./bodies/recipient.yaml#/components/requestBodies/RecipientBody
|
||||
responses:
|
||||
'200':
|
||||
description: Recipient updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/recipient.yaml#/components/schemas/RecipientsAuthData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'404':
|
||||
$ref: ../response/operation.yaml#/components/responses/NotFound
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
Reference in New Issue
Block a user