{ "openapi": "3.0.0", "info": { "title": "Sustainable Construction Management API", "version": "1.0.0", "description": "RESTful API for the Sustainable Construction Project Management System — SE3040 Application Frameworks. Materials, equipment, and suppliers are mounted at `/api/{resource}` and again under `/api/resources/{resource}` with identical routes.", "contact": { "name": "SustainSite Team" } }, "servers": [ { "url": "http://localhost:5000", "description": "Development server" } ], "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "parameters": { "IdPath": { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }, "MilestoneIdPath": { "name": "milestoneId", "in": "path", "required": true, "schema": { "type": "string" } }, "ProjectIdPath": { "name": "projectId", "in": "path", "required": true, "schema": { "type": "string" } }, "StatusPath": { "name": "status", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Project status filter" } }, "schemas": { "RegisterRequest": { "type": "object", "required": [ "fullName", "email", "password", "role" ], "properties": { "fullName": { "type": "string", "minLength": 2, "maxLength": 100 }, "email": { "type": "string", "format": "email" }, "password": { "type": "string", "minLength": 8, "description": "Upper, lower, digit" }, "role": { "type": "string", "enum": [ "ADMIN", "PROJECT_MANAGER", "INSPECTOR", "SUPPLIER", "VIEWER" ] } } }, "LoginRequest": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string", "format": "email" }, "password": { "type": "string" } } }, "UpdateProfileRequest": { "type": "object", "required": [ "fullName", "email" ], "properties": { "fullName": { "type": "string" }, "email": { "type": "string", "format": "email" }, "jobTitle": { "type": "string", "maxLength": 100 } } }, "ChangePasswordRequest": { "type": "object", "required": [ "currentPassword", "newPassword" ], "properties": { "currentPassword": { "type": "string" }, "newPassword": { "type": "string", "minLength": 8 } } } } }, "security": [ { "bearerAuth": [] } ], "paths": { "/api": { "get": { "tags": [ "Health" ], "summary": "API index (lists major route groups)", "security": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/health": { "get": { "tags": [ "Health" ], "summary": "Health check", "security": [], "responses": { "200": { "description": "Service is running", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "example": "ok" }, "timestamp": { "type": "string", "format": "date-time" } } } } } } } } }, "/api/auth/register": { "post": { "tags": [ "Auth" ], "summary": "Register user", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/auth/login": { "post": { "tags": [ "Auth" ], "summary": "Login", "security": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/auth/me": { "get": { "tags": [ "Auth" ], "summary": "Current user profile", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/auth/profile": { "patch": { "tags": [ "Auth" ], "summary": "Update profile", "security": [ { "bearerAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateProfileRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/auth/change-password": { "patch": { "tags": [ "Auth" ], "summary": "Change password", "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordRequest" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/projects": { "get": { "tags": [ "Projects" ], "summary": "List projects", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Projects" ], "summary": "Create project", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/projects/status/{status}": { "get": { "tags": [ "Projects" ], "summary": "List projects filtered by status", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/StatusPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/projects/{id}": { "get": { "tags": [ "Projects" ], "summary": "Get project by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Projects" ], "summary": "Update project", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Projects" ], "summary": "Delete project (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/projects/{id}/milestones": { "post": { "tags": [ "Milestones" ], "summary": "Add milestone", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/projects/{id}/milestones/{milestoneId}": { "put": { "tags": [ "Milestones" ], "summary": "Update milestone", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" }, { "$ref": "#/components/parameters/MilestoneIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/projects/{id}/timeline": { "get": { "tags": [ "Projects" ], "summary": "Project timeline", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/projects/{id}/financial-summary": { "get": { "tags": [ "Projects" ], "summary": "Financial summary", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/users": { "get": { "tags": [ "Users" ], "summary": "List users (admin)", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/users/{id}": { "get": { "tags": [ "Users" ], "summary": "Get user (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "patch": { "tags": [ "Users" ], "summary": "Update user (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Users" ], "summary": "Deactivate user (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents": { "get": { "tags": [ "Documents" ], "summary": "List documents", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Documents" ], "summary": "Upload document (multipart file field `file`)", "security": [ { "bearerAuth": [] } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents/search": { "get": { "tags": [ "Documents" ], "summary": "Search documents", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents/{id}": { "get": { "tags": [ "Documents" ], "summary": "Get document", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Documents" ], "summary": "Update document metadata", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Documents" ], "summary": "Delete document", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents/{id}/approve": { "put": { "tags": [ "Documents" ], "summary": "Approve document", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents/{id}/reject": { "put": { "tags": [ "Documents" ], "summary": "Reject document", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents/{id}/version": { "post": { "tags": [ "Documents" ], "summary": "Create new version (multipart `file`)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents/{id}/download": { "get": { "tags": [ "Documents" ], "summary": "Download document file", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "File stream or redirect" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/documents/{id}/status": { "put": { "tags": [ "Documents" ], "summary": "Update document status (validated transitions)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability": { "get": { "tags": [ "Sustainability" ], "summary": "List sustainability metrics", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Sustainability" ], "summary": "Create metric", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/metrics": { "post": { "tags": [ "Sustainability" ], "summary": "Create metric (alias path)", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/{id}": { "get": { "tags": [ "Sustainability" ], "summary": "Get metric by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Sustainability" ], "summary": "Update metric", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Sustainability" ], "summary": "Delete metric (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/projects/{projectId}/metrics": { "get": { "tags": [ "Sustainability" ], "summary": "Metrics for a project", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/projects/{projectId}/metrics/latest": { "get": { "tags": [ "Sustainability" ], "summary": "Latest metric for a project", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/projects/{projectId}/score": { "get": { "tags": [ "Sustainability" ], "summary": "Sustainability score", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/projects/{projectId}/trends": { "get": { "tags": [ "Sustainability" ], "summary": "Trend aggregates (period/interval query params)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/projects/{projectId}/compare": { "get": { "tags": [ "Sustainability" ], "summary": "Compare with industry", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/sustainability/calculate-impact": { "post": { "tags": [ "Sustainability" ], "summary": "Impact calculator", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/compliance/checklists": { "get": { "tags": [ "Compliance" ], "summary": "List checklists", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Compliance" ], "summary": "Create checklist", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/compliance/checklists/{id}": { "get": { "tags": [ "Compliance" ], "summary": "Get checklist", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Compliance" ], "summary": "Update checklist", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Compliance" ], "summary": "Delete checklist (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/compliance/checklists/{id}/items/{itemId}": { "put": { "tags": [ "Compliance" ], "summary": "Update checklist item", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" }, { "name": "itemId", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/compliance/score/{projectId}": { "get": { "tags": [ "Compliance" ], "summary": "Project compliance score", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/compliance/inspections": { "get": { "tags": [ "Compliance" ], "summary": "List inspections", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Compliance" ], "summary": "Create inspection", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/compliance/inspections/{id}": { "get": { "tags": [ "Compliance" ], "summary": "Get inspection", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Compliance" ], "summary": "Update inspection", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Compliance" ], "summary": "Delete inspection (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/safety/inspection": { "post": { "tags": [ "Safety" ], "summary": "Create safety inspection", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/safety/{projectId}": { "get": { "tags": [ "Safety" ], "summary": "List inspections for project", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/safety/{projectId}/high-risk": { "get": { "tags": [ "Safety" ], "summary": "High/critical unresolved inspections", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/safety/inspection/{id}": { "get": { "tags": [ "Safety" ], "summary": "Get inspection by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Safety" ], "summary": "Update inspection", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Safety" ], "summary": "Delete inspection (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/materials": { "get": { "tags": [ "Materials" ], "summary": "List materials", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Materials" ], "summary": "Create material", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/materials/list/low-stock": { "get": { "tags": [ "Materials" ], "summary": "List low-stock materials", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/materials/{id}": { "get": { "tags": [ "Materials" ], "summary": "Get material by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Materials" ], "summary": "Update material", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Materials" ], "summary": "Delete material (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/materials/{id}/status": { "put": { "tags": [ "Materials" ], "summary": "Update material status", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/materials/{id}/usage": { "post": { "tags": [ "Materials" ], "summary": "Record material usage", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/materials/{projectId}/cost-summary": { "get": { "tags": [ "Materials" ], "summary": "Cost summary for a project", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/materials": { "get": { "tags": [ "Materials" ], "summary": "List materials", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Materials" ], "summary": "Create material", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/materials/list/low-stock": { "get": { "tags": [ "Materials" ], "summary": "List low-stock materials", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/materials/{id}": { "get": { "tags": [ "Materials" ], "summary": "Get material by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Materials" ], "summary": "Update material", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Materials" ], "summary": "Delete material (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/materials/{id}/status": { "put": { "tags": [ "Materials" ], "summary": "Update material status", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/materials/{id}/usage": { "post": { "tags": [ "Materials" ], "summary": "Record material usage", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/materials/{projectId}/cost-summary": { "get": { "tags": [ "Materials" ], "summary": "Cost summary for a project", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/ProjectIdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/equipment": { "get": { "tags": [ "Equipment" ], "summary": "List equipment", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Equipment" ], "summary": "Create equipment", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/equipment/list/available": { "get": { "tags": [ "Equipment" ], "summary": "List available equipment", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/equipment/{id}": { "get": { "tags": [ "Equipment" ], "summary": "Get equipment by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Equipment" ], "summary": "Update equipment", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Equipment" ], "summary": "Delete equipment (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/equipment/{id}/assign": { "post": { "tags": [ "Equipment" ], "summary": "Assign equipment", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/equipment/{id}/maintenance": { "post": { "tags": [ "Equipment" ], "summary": "Schedule maintenance", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/equipment/{id}/status": { "put": { "tags": [ "Equipment" ], "summary": "Update equipment status", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/equipment": { "get": { "tags": [ "Equipment" ], "summary": "List equipment", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Equipment" ], "summary": "Create equipment", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/equipment/list/available": { "get": { "tags": [ "Equipment" ], "summary": "List available equipment", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/equipment/{id}": { "get": { "tags": [ "Equipment" ], "summary": "Get equipment by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Equipment" ], "summary": "Update equipment", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Equipment" ], "summary": "Delete equipment (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/equipment/{id}/assign": { "post": { "tags": [ "Equipment" ], "summary": "Assign equipment", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/equipment/{id}/maintenance": { "post": { "tags": [ "Equipment" ], "summary": "Schedule maintenance", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/equipment/{id}/status": { "put": { "tags": [ "Equipment" ], "summary": "Update equipment status", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/suppliers": { "get": { "tags": [ "Suppliers" ], "summary": "List suppliers", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Suppliers" ], "summary": "Create supplier", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/suppliers/{id}": { "get": { "tags": [ "Suppliers" ], "summary": "Get supplier by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Suppliers" ], "summary": "Update supplier", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Suppliers" ], "summary": "Delete supplier (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/suppliers/{id}/rating": { "post": { "tags": [ "Suppliers" ], "summary": "Rate supplier", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/suppliers/{id}/performance": { "get": { "tags": [ "Suppliers" ], "summary": "Supplier performance metrics", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/suppliers": { "get": { "tags": [ "Suppliers" ], "summary": "List suppliers", "security": [ { "bearerAuth": [] } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "post": { "tags": [ "Suppliers" ], "summary": "Create supplier", "security": [ { "bearerAuth": [] } ], "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/suppliers/{id}": { "get": { "tags": [ "Suppliers" ], "summary": "Get supplier by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "put": { "tags": [ "Suppliers" ], "summary": "Update supplier", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "Suppliers" ], "summary": "Delete supplier (admin)", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "204": { "description": "No content" }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/suppliers/{id}/rating": { "post": { "tags": [ "Suppliers" ], "summary": "Rate supplier", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } }, "/api/resources/suppliers/{id}/performance": { "get": { "tags": [ "Suppliers" ], "summary": "Supplier performance metrics", "security": [ { "bearerAuth": [] } ], "parameters": [ { "$ref": "#/components/parameters/IdPath" } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": true } } } }, "400": { "description": "Bad request / validation error" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not found" } } } } }, "tags": [ { "name": "Health", "description": "Service health" }, { "name": "Auth", "description": "Authentication & user session" }, { "name": "Projects", "description": "Construction project management" }, { "name": "Milestones", "description": "Project milestones" }, { "name": "Sustainability", "description": "Environmental metrics & scoring" }, { "name": "Documents", "description": "Document upload & compliance workflow" }, { "name": "Compliance", "description": "Compliance checklists" }, { "name": "Safety", "description": "Safety inspections" }, { "name": "Materials", "description": "Material inventory management" }, { "name": "Equipment", "description": "Equipment registry & maintenance" }, { "name": "Suppliers", "description": "Supplier management" }, { "name": "Users", "description": "User management (ADMIN only)" } ] }