-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.yaml
53 lines (53 loc) · 1.99 KB
/
schema.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
openapi: 3.0.0
info:
version: 1.0.0
title: 'CatFacts API'
servers:
- url: https://cat-fact.herokuapp.com
paths:
/facts/random:
get:
operationId: randomFact
responses:
200:
description: 'Get a random `Fact`'
content:
application/json:
schema:
$ref: '#/components/schemas/Fact'
components:
schemas:
Fact:
type: object
properties:
_id:
type: string
description: 'Unique ID for the `Fact`'
__v:
type: integer
description: 'Version number of the `Fact`'
user:
type: string
description: 'ID of the `User` who added the `Fact`'
text:
type: string
description: 'The `Fact` itself'
updatedAt:
type: string
format: date-time
description: 'Date in which `Fact` was last modified'
sendDate:
type: string
description: 'If the `Fact` is meant for one time use, this is the date that it is used'
deleted:
type: boolean
description: 'Weather or not the `Fact` has been deleted (Soft deletes are used)'
source:
type: string
description: 'Can be `user` or `api`, indicates who added the fact to the DB'
used:
type: boolean
description: 'Weather or not the `Fact` has been sent by the CatBot. This value is reset each time every `Fact` is used'
type:
type: string
description: 'Type of animal the `Fact` describes (e.g. ‘cat’, ‘dog’, ‘horse’)'