60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
openapi: 3.0.3
|
|
info: { title: Final Exam API, version: 1.0.0 }
|
|
servers: [ { url: https://your-domain.com/api/v1 } ]
|
|
tags: [ { name: Finals } ]
|
|
security: [ { bearerAuth: [] } ]
|
|
|
|
paths:
|
|
/finals:
|
|
post:
|
|
tags: [Finals]
|
|
summary: Create or update final score
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required: [student_id, class_section_id]
|
|
properties:
|
|
student_id: { type: integer }
|
|
class_section_id: { type: integer }
|
|
score: { type: number }
|
|
comment: { type: string }
|
|
responses:
|
|
"201": { description: Final saved }
|
|
|
|
/finals/student/{id}:
|
|
get:
|
|
tags: [Finals]
|
|
summary: Get final by student
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
schema: { type: integer }
|
|
responses:
|
|
"200": { description: Final }
|
|
|
|
/finals/{id}:
|
|
put:
|
|
tags: [Finals]
|
|
summary: Update final row
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
schema: { type: integer }
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
score: { type: number }
|
|
comment: { type: string }
|
|
responses:
|
|
"200": { description: Final updated }
|
|
|