Пример #1
0
 *        path="/session/{session}/{resName}/data/{dataName}",
 *        operationId="DeleteResourceData",
 *        summary="Delete the specified resource data item for the given resource",
 *        tags={"session"},
 *          @SWG\Parameter(name="session", in="path", required=true, type="string", description="Your MapGuide Session ID"),
 *          @SWG\Parameter(name="resName", in="path", required=true, type="string", description="The resource name (including extension)"),
 *          @SWG\Parameter(name="dataName", in="path", required=true, type="string", description="The name of the resource data to retrieve"),
 *        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
 *        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
 *        @SWG\Response(response=500, description="An error occurred during the operation")
 *     )
 */
$app->delete("/session/:sessionId/:resName/data/:dataName", function ($sessionId, $resName, $dataName) use($app) {
    $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}");
    $ctrl = new MgResourceServiceController($app);
    $ctrl->DeleteResourceData($resId, $dataName);
});
/*
//Need to confirm if like EnumerateResources, this is not permitted on session repos
$app->get("/session/:sessionId/:resName/header", function($sessionId, $resName) use ($app) {
    $resId = new MgResourceIdentifier("Session:$sessionId//$resName");
    $ctrl = new MgResourceServiceController($app);
    $ctrl->GetResourceHeader($resId, "xml");
});
$app->get("/session/:sessionId/:resName/header.:format", function($sessionId, $resName, $format) use ($app) {
    $resId = new MgResourceIdentifier("Session:$sessionId//$resName");
    $ctrl = new MgResourceServiceController($app);
    $ctrl->GetResourceHeader($resId, $format);
});
*/
/**