chore(docs): Refactor API Reference (#1883)

This commit is contained in:
Shahed Nasser
2022-08-05 15:06:12 +03:00
committed by GitHub
parent b126ab4dec
commit 73383cc466
625 changed files with 52358 additions and 11660 deletions

View File

@@ -0,0 +1,79 @@
post:
operationId: PostNotes
summary: Creates a Note
description: Creates a Note which can be associated with any resource as required.
x-authenticated: true
requestBody:
content:
application/json:
schema:
required:
- resource_id
- resource_type
- value
properties:
resource_id:
type: string
description: The ID of the resource which the Note relates to.
resource_type:
type: string
description: The type of resource which the Note relates to.
value:
type: string
description: The content of the Note to create.
tags:
- Note
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
note:
$ref: ../components/schemas/note.yaml
get:
operationId: GetNotes
summary: List Notes
x-authenticated: true
description: Retrieves a list of notes
parameters:
- in: query
name: limit
description: The number of notes to get
schema:
type: number
default: '50'
- in: query
name: offset
description: The offset at which to get notes
schema:
type: number
default: '0'
- in: query
name: resource_id
description: The ID which the notes belongs to
schema:
type: string
tags:
- Note
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
notes:
type: array
items:
$ref: ../components/schemas/note.yaml
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of items skipped before these items
limit:
type: integer
description: The number of items per page