|
| 1 | +openapi: 3.0.0 |
| 2 | +info: |
| 3 | + title: Citium |
| 4 | + description: Citium's backend api |
| 5 | + version: 1.0.0 |
| 6 | +servers: |
| 7 | + - url: "https://localhost:8000/api" |
| 8 | + - description: "Localhost" |
| 9 | +paths: |
| 10 | + /test: |
| 11 | + get: |
| 12 | + summary: Test API |
| 13 | + responses: |
| 14 | + "200": |
| 15 | + description: Success |
| 16 | + /protected: |
| 17 | + get: |
| 18 | + summary: Protected API |
| 19 | + security: |
| 20 | + - jwtAuth: [] |
| 21 | + responses: |
| 22 | + "200": |
| 23 | + description: Success |
| 24 | + /register: |
| 25 | + post: |
| 26 | + summary: Register a new user |
| 27 | + responses: |
| 28 | + "201": |
| 29 | + description: User registered |
| 30 | + /login: |
| 31 | + post: |
| 32 | + summary: User login |
| 33 | + responses: |
| 34 | + "200": |
| 35 | + description: Login successful |
| 36 | + /refresh: |
| 37 | + post: |
| 38 | + summary: Refresh authentication token |
| 39 | + responses: |
| 40 | + "200": |
| 41 | + description: Token refreshed |
| 42 | + /logout: |
| 43 | + post: |
| 44 | + summary: User logout |
| 45 | + responses: |
| 46 | + "200": |
| 47 | + description: Logout successful |
| 48 | + /sites: |
| 49 | + get: |
| 50 | + summary: Get all construction sites |
| 51 | + security: |
| 52 | + - dashboardView: [] |
| 53 | + responses: |
| 54 | + "200": |
| 55 | + description: List of construction sites |
| 56 | + post: |
| 57 | + summary: Create a new construction site |
| 58 | + security: |
| 59 | + - jwtAuth: [] |
| 60 | + responses: |
| 61 | + "201": |
| 62 | + description: Construction site created |
| 63 | + /sites/{id}: |
| 64 | + get: |
| 65 | + summary: Get details of a construction site |
| 66 | + security: |
| 67 | + - dashboardView: [] |
| 68 | + parameters: |
| 69 | + - name: id |
| 70 | + in: path |
| 71 | + required: true |
| 72 | + schema: |
| 73 | + type: string |
| 74 | + responses: |
| 75 | + "200": |
| 76 | + description: Construction site details |
| 77 | + put: |
| 78 | + summary: Update a construction site |
| 79 | + security: |
| 80 | + - jwtAuth: [] |
| 81 | + parameters: |
| 82 | + - name: id |
| 83 | + in: path |
| 84 | + required: true |
| 85 | + schema: |
| 86 | + type: string |
| 87 | + responses: |
| 88 | + "200": |
| 89 | + description: Construction site updated |
| 90 | + delete: |
| 91 | + summary: Delete a construction site |
| 92 | + security: |
| 93 | + - jwtAuth: [] |
| 94 | + parameters: |
| 95 | + - name: id |
| 96 | + in: path |
| 97 | + required: true |
| 98 | + schema: |
| 99 | + type: string |
| 100 | + responses: |
| 101 | + "200": |
| 102 | + description: Construction site deleted |
| 103 | + /notifications/{user_id}: |
| 104 | + get: |
| 105 | + summary: Get user notifications |
| 106 | + parameters: |
| 107 | + - name: user_id |
| 108 | + in: path |
| 109 | + required: true |
| 110 | + schema: |
| 111 | + type: string |
| 112 | + responses: |
| 113 | + "200": |
| 114 | + description: List of notifications |
| 115 | + /notifications/read: |
| 116 | + post: |
| 117 | + summary: Mark notifications as read |
| 118 | + responses: |
| 119 | + "200": |
| 120 | + description: Notifications marked as read |
| 121 | + /subscriptions/subscribe: |
| 122 | + post: |
| 123 | + summary: Subscribe to notifications |
| 124 | + security: |
| 125 | + - jwtAuth: [] |
| 126 | + responses: |
| 127 | + "200": |
| 128 | + description: Subscribed successfully |
| 129 | + /subscriptions/unsubscribe/{id}: |
| 130 | + delete: |
| 131 | + summary: Unsubscribe from notifications |
| 132 | + security: |
| 133 | + - jwtAuth: [] |
| 134 | + parameters: |
| 135 | + - name: id |
| 136 | + in: path |
| 137 | + required: true |
| 138 | + schema: |
| 139 | + type: string |
| 140 | + responses: |
| 141 | + "200": |
| 142 | + description: Unsubscribed successfully |
| 143 | +components: |
| 144 | + securitySchemes: |
| 145 | + jwtAuth: |
| 146 | + type: http |
| 147 | + scheme: bearer |
| 148 | + bearerFormat: JWT |
0 commit comments