This repository was archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata-store.yml
More file actions
135 lines (125 loc) · 2.31 KB
/
data-store.yml
File metadata and controls
135 lines (125 loc) · 2.31 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#Test with: http://editor.swagger.io/
swagger: '2.0'
info:
version: 1.0.0
title: Microservice for Data-Store
description: Javascript + GraphQL + MongoDB
license:
name: Software Architecture, 2019-II
host: localhost:4000
basePath: /
- http
consumes:
- application/json
produces:
- application/json
paths:
/graphql:
post:
summary: Receives all the mutations
operationId: creation-update-delete
parameters:
- name: user
in: body
required: true
description: Mutation
schema:
$ref: '#/definitions/User'
responses:
'200':
description: OK
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorModel'
get:
summary: Returns all the queries
operationId: read(query)
parameters:
- name: query
type: string
in: query
required: true
description: Query
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Game'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorModel'
definitions:
# Users
User:
type: object
required:
- id
- handle
- email
properties:
id:
type: string
handle:
type: string
email:
type: string
matches:
type: array
items:
type: string
won:
type: array
items:
type: string
Game:
type: object
required:
- id
- seed
properties:
id:
type: string
seed:
type: string
Match:
type: object
required:
- id
- user
- game
properties:
id:
type: string
user:
type: string
game:
type: string
winner:
type: string
Message:
type: object
required:
- id
- type
properties:
id:
type: string
type:
type: string
msg:
type: string
# Errors
ErrorModel:
type: object
required:
- message
- code
properties:
message:
type: string
code:
type: number
description:
type: object