57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
openapi: 3.0.3
|
|
info: { title: Attendance Tracking API, version: 1.0.0 }
|
|
servers: [ { url: https://your-domain.com/api/v1 } ]
|
|
tags: [ { name: Attendance Tracking } ]
|
|
security: [ { bearerAuth: [] } ]
|
|
|
|
paths:
|
|
/attendance-tracking/record:
|
|
post:
|
|
tags: [Attendance Tracking]
|
|
summary: Record or update an attendance tracking entry
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema: { $ref: '#/components/schemas/TrackingCreate' }
|
|
responses:
|
|
"201": { description: Tracking record created }
|
|
"200": { description: Tracking record updated }
|
|
"422": { description: Validation error }
|
|
|
|
/attendance-tracking/violations:
|
|
get:
|
|
tags: [Attendance Tracking]
|
|
summary: Get students with attendance violations
|
|
parameters:
|
|
- in: query
|
|
name: threshold
|
|
schema: { type: integer, default: 3 }
|
|
description: Minimum number of violations
|
|
responses:
|
|
"200": { description: Violations retrieved successfully }
|
|
|
|
/attendance-tracking/student/{id}:
|
|
get:
|
|
tags: [Attendance Tracking]
|
|
summary: Get attendance tracking records for a student
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
schema: { type: integer }
|
|
responses:
|
|
"200": { description: Student tracking history }
|
|
|
|
components:
|
|
schemas:
|
|
TrackingCreate:
|
|
type: object
|
|
required: [student_id, date, status]
|
|
properties:
|
|
student_id: { type: integer }
|
|
date: { type: string, format: date }
|
|
status: { type: string, enum: [present, absent, late] }
|
|
type: { type: string, example: "late arrival" }
|
|
notes: { type: string }
|