50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
openapi: 3.0.3
|
|
info: { title: Notification API, version: 1.0.0 }
|
|
servers: [ { url: https://your-domain.com/api/v1 } ]
|
|
tags: [ { name: Notifications } ]
|
|
security: [ { bearerAuth: [] } ]
|
|
|
|
paths:
|
|
/notifications:
|
|
get:
|
|
tags: [Notifications]
|
|
summary: List notifications for current user
|
|
parameters:
|
|
- in: query
|
|
name: page
|
|
schema: { type: integer, default: 1 }
|
|
- in: query
|
|
name: per_page
|
|
schema: { type: integer, default: 20 }
|
|
- in: query
|
|
name: read
|
|
schema: { type: boolean }
|
|
responses:
|
|
"200": { description: Notifications retrieved }
|
|
|
|
/notifications/{id}:
|
|
get:
|
|
tags: [Notifications]
|
|
summary: Get a single notification
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
schema: { type: integer }
|
|
responses:
|
|
"200": { description: Notification }
|
|
"404": { description: Not found }
|
|
|
|
/notifications/{id}/read:
|
|
post:
|
|
tags: [Notifications]
|
|
summary: Mark a notification as read
|
|
parameters:
|
|
- in: path
|
|
name: id
|
|
required: true
|
|
schema: { type: integer }
|
|
responses:
|
|
"200": { description: Notification marked as read }
|
|
|