* path="/session/{session}/{resName}/references.{type}", * operationId="EnumerateResourceReferences", * summary="Lists the resources that reference 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="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}), * @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->get("/session/:sessionId/:resName/references.:format", function ($sessionId, $resName, $format) use($app) { $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}"); $ctrl = new MgResourceServiceController($app); $ctrl->EnumerateResourceReferences($resId, $format); }); /** * @SWG\Delete( * path="/session/{session}/{resName}", * operationId="DeleteResource", * summary="Deletes 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\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", function ($sessionId, $resName) use($app) {