Ejemplo n.º 1
0
 */
$app->POST('/user/createWithList', function ($request, $response, $args) {
    $body = $request->getParsedBody();
    $response->write('How about implementing createUsersWithListInput as a POST method ?');
    return $response;
});
/**
 * GET loginUser
 * Summary: Logs user into the system
 * Notes: 
 * Output-Formats: [application/xml, application/json]
 */
$app->GET('/user/login', function ($request, $response, $args) {
    $queryParams = $request->getQueryParams();
    $username = $queryParams['username'];
    $password = $queryParams['password'];
    $response->write('How about implementing loginUser as a GET method ?');
    return $response;
});
/**
 * GET logoutUser
 * Summary: Logs out current logged in user session
 * Notes: 
 * Output-Formats: [application/xml, application/json]
 */
$app->GET('/user/logout', function ($request, $response, $args) {
    $response->write('How about implementing logoutUser as a GET method ?');
    return $response;
});
/**
 * GET getUserByName
Ejemplo n.º 2
0
 * Output-Formats: [application/json]
 */
$app->POST('/execute?api-version=2.0&format=swagger', function ($request, $response, $args) {
    $body = $request->getParsedBody();
    $response->write('How about implementing execute as a POST method ?');
    return $response;
});
/**
 * GET getSwaggerDocument
 * Summary: Get swagger API document for the web service
 * Notes: 
 * Output-Formats: [application/json]
 */
$app->GET('/swagger.json', function ($request, $response, $args) {
    $queryParams = $request->getQueryParams();
    $apiVersion = $queryParams['apiVersion'];
    $response->write('How about implementing getSwaggerDocument as a GET method ?');
    return $response;
});
/**
 * GET getjobstatus
 * Summary: Get the status for a give job
 * Notes: 
 * Output-Formats: [application/json]
 */
$app->GET('/jobs/{jobId}?api-version=2.0', function ($request, $response, $args) {
    $response->write('How about implementing getjobstatus as a GET method ?');
    return $response;
});
/**
 * POST startjob
 * Summary: Start running a job