-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.yaml
160 lines (160 loc) · 4.22 KB
/
example.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
openapi: 3.0.0
info:
title: App API
version: 1.0.0
servers:
- url: 'http://app-api.local/api'
description: Development Server
paths:
/student/events:
post:
tags:
- Student
summary: Create event
operationId: 'App\Http\Controllers\Student\EventsController::store'
requestBody:
content:
application/json:
schema:
properties:
teacher_id:
description: Teacher id
type: integer
start:
description: Start event time
type: string
format: date
lesson_duration:
description: Lesson duration in minutes
type: integer
format: date
lessons_amount:
description: Amount of lessons
type: integer
format: date
type:
description: Store a newly created resource in storage.
type: string
enum:
- EVENT_TYPE_OFFTIME
type: object
responses:
'200':
description: Event created succesfully
content:
application/json:
schema:
$ref: '#/components/schemas/EventResource'
'401':
description: Unauthorized
'500':
description: Sever error
security:
- auth:
- '*'
'/student/events/{event}':
put:
tags:
- Student
summary: Get event information
operationId: 'App\Http\Controllers\Student\EventsController::update'
parameters:
- name: event
in: path
description: Event id
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
properties:
teacher_id:
description: Teacher id
type: integer
start:
description: Start event time
type: string
format: date
lesson_duration:
description: Lesson duration in minutes
type: integer
format: date
lessons_amount:
description: Amount of lessons
type: integer
format: date
type:
description: Update the specified resource in storage.
type: string
enum:
- EVENT_TYPE_OFFTIME
type: object
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/EventResource'
'401':
description: Unauthorized
'404':
description: Not found
'500':
description: Sever error
security:
- auth:
- '*'
components:
schemas:
EventResource:
title: Event
properties:
id:
description: Event id
type: integer
format: int64
teacherId:
description: Teacher id
type: integer
format: int64
studentId:
description: Student id
type: integer
format: int64
eventTipropertytle:
description: Event title
type: string
eventText:
description: Event notices
type: string
start:
description: Event start
type: string
format: date
lessonDuration:
description: Lesson duration
type: integer
format: int32
lessonsAmount:
description: Lesson amount
type: integer
format: int32
eventType:
description: Event type
type: string
type: object
xml:
name: Event
securitySchemes:
auth:
type: oauth2
flows:
password:
tokenUrl: 'http://student-app-api.local/api/login'
scopes: {}
tags:
- name: Student
description: ''