-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmojobrain-api.yml
113 lines (112 loc) · 2.57 KB
/
mojobrain-api.yml
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
openapi: 3.0.0
info:
title: MojoBrain - Headless CMS in Mojolicious
version: "1"
description: Perl CMS for Bloggers
servers:
- url: /api/v1
paths:
/login:
post:
summary: Login to MojoBrain
x-mojo-to: "Controller::Auth::Login#login"
operationId: userLogin
tags:
- login
parameters:
- name: username
in: query
description: email id of the user
schema:
type: string
- name: password
in: query
description: Password of the user
schema:
type: string
responses:
200:
description: User object
content:
application/json:
schema:
$ref: "#/components/schemas/Login"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/register:
post:
summary: User Registration to MojoBrain
x-mojo-to: "Controller::Auth::Login#register"
operationId: userRegister
tags:
- register
parameters:
- name: username
in: query
description: email id of the user
schema:
type: string
- name: password
in: query
description: Password of the user
schema:
type: string
- name: confirm_password
in: query
description: Confirm Password of the user
schema:
type: string
responses:
200:
description: User object
content:
application/json:
schema:
$ref: "#/components/schemas/Login"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
schemas:
Login:
required:
- username
- password
properties:
username:
type: string
password:
type: string
tag:
type: string
Register:
required:
- username
- password
- confirm_password
properties:
username:
type: string
password:
type: string
confirm_password:
type: string
tag:
type: string
Error:
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string