1 line
59 KiB
JSON
1 line
59 KiB
JSON
|
|
{"openapi":"3.0.0","paths":{"/api/v1/auth/department/login":{"post":{"operationId":"AuthController_departmentLogin","summary":"Department login with API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}},"401":{"description":"Invalid credentials"}},"tags":["Auth"]}},"/api/v1/auth/digilocker/login":{"post":{"operationId":"AuthController_digiLockerLogin","summary":"Applicant login via DigiLocker (Mock)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigiLockerLoginDto"}}}},"responses":{"200":{"description":"Login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigiLockerLoginResponseDto"}}}},"401":{"description":"Authentication failed"}},"tags":["Auth"]}},"/api/v1/departments":{"post":{"operationId":"DepartmentsController_create","summary":"Create a new department","description":"Register a new department in the system (admin only)","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDepartmentDto"}}}},"responses":{"201":{"description":"Department created successfully with API credentials","content":{"application/json":{"schema":{"properties":{"apiKey":{"type":"string"},"apiSecret":{"type":"string"},"department":{"$ref":"#/components/schemas/DepartmentResponseDto"}}}}}},"400":{"description":"Invalid input data"},"401":{"description":"Unauthorized"},"409":{"description":"Department with this code already exists"}},"tags":["Departments"],"security":[{"bearer":[]}]},"get":{"operationId":"DepartmentsController_findAll","summary":"List all departments","description":"Retrieve a paginated list of all departments","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (default: 1)","example":1,"schema":{"minimum":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page (default: 10)","example":10,"schema":{"minimum":1,"maximum":100,"type":"number"}}],"responses":{"200":{"description":"List of departments retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse"}}}}},"tags":["Departments"]}},"/api/v1/departments/{code}":{"get":{"operationId":"DepartmentsController_findByCode","summary":"Get department by code","description":"Retrieve detailed information about a specific department","parameters":[{"name":"code","required":true,"in":"path","description":"Department code","example":"DEPT_001","schema":{"type":"string"}}],"responses":{"200":{"description":"Department retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentResponseDto"}}}},"404":{"description":"Department not found"}},"tags":["Departments"]},"patch":{"operationId":"DepartmentsController_update","summary":"Update department","description":"Update department information (admin only)","parameters":[{"name":"code","required":true,"in":"path","description":"Department code","example":"DEPT_001","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDepartmentDto"}}}},"responses":{"200":{"description":"Department updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentResponseDto"}}}},"400":{"description":"Invalid input data"},"401":{"description":"Unauthorized"},"404":{"description":"Department not found"}},"tags":["Departments"],"security":[{"bearer":[]}]}},"/api/v1/departments/{code}/regenerate-api-key":{"post":{"operationId":"DepartmentsController_regenerateApiKey","summary":"Regenerate API key","description":"Generate a new API key pair for the department (admin only). Old key will be invalidated.","parameters":[{"name":"code","required":true,"in":"path","description":"Departm
|