|
| | $modelName = 'App\Models\UserModel' |
| |
| | $format = 'json' |
| |
| path | : "/api/users" |
| | HTTP-spezifischer Kontext.
|
| |
| path | tags: ["Users"] |
| |
| path | summary: "Retrieve all users with role and department information" |
| |
| path | responses: [ new OA\Response( response: 200 |
| |
| path | description: "List of users retrieved successfully" |
| |
| path | content: new OA\JsonContent( properties: [ new OA\Property(property: "status" |
| |
| path | type: "string" |
| |
| path | example: "success") |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers() | path: "/api/users/{userID}" |
| | HTTP-spezifischer Kontext.
|
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | tags: ["Users"] |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | summary: "Retrieve a single user with role and department information" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | parameters: [ new OA\Parameter( name: "userID" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | in: "path" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | required: true |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | description: "ID of the user" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | schema: new OA\Schema(type: "integer" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | example: 1) ) ] |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | responses: [ new OA\Response( response: 200 |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | content: new OA\JsonContent( properties: [ new OA\Property(property: "status" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public function getAllUsers | type: "string" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID) | path: "/api/users/department" |
| | HTTP-spezifischer Kontext.
|
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID | tags: ["Users"] |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID | summary: "Retrieve users by department of the logged-in user" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID | responses: [ new OA\Response( response: 200 |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID | description: "Users retrieved successfully" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID | content: new OA\JsonContent( properties: [ new OA\Property(property: "status" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID | type: "string" |
| |
| path new OA Property(property:"data", type:"array", items:new OA\Items(properties:[new OA\Property(property:"user_id", type:"integer", example:1), new OA\Property(property:"first_name", type:"string", example:"John"), new OA\Property(property:"last_name", type:"string", example:"Doe"), new OA\Property(property:"role", type:"string", example:"Admin"), new OA\Property(property:"department", type:"string", example:"IT")]))])) new OA Response(response:404, description:"No users found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Benutzer gefunden.")]))])] public getAllUsers new OA new OA Response(response:404, description:"User not found", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Benutzer nicht gefunden.")]))])] public function getUser($userID | example: "success") |
| |