* @SWG\Get( * path="/session/{session}/{resName}.FeatureSource/status", * operationId="TestConnection", * summary="Tests the connection status of a feature source", * 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 feature source name"), * @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.FeatureSource/status", function ($sessionId, $resName) use($app) { $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}.FeatureSource"); $ctrl = new MgFeatureServiceController($app); $ctrl->TestConnection($resId); }); /** * @SWG\Get( * path="/session/{session}/{resName}.FeatureSource/spatialcontexts.{type}", * operationId="GetSpatialContexts", * summary="Gets spatial contexts of a feature source", * 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 feature source name"), * @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") * ) */
* @SWG\Parameter(name="session", in="query", required=false, type="string", description="Your MapGuide Session ID"), * @SWG\Parameter(name="resourcePath", in="path", required=true, type="string", description="The path of the resource ID"), * @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("/library/:resourcePath+.FeatureSource/status.:format", function ($resourcePath, $format) use($app) { $count = count($resourcePath); if ($count > 0) { $resourcePath[$count - 1] = $resourcePath[$count - 1] . ".FeatureSource"; } $resId = MgUtils::ParseLibraryResourceID($resourcePath); $ctrl = new MgFeatureServiceController($app); $ctrl->TestConnection($resId, $format); }); /** * @SWG\Get( * path="/library/{resourcePath}.FeatureSource/editcapabilities.{type}", * operationId="GetRestEditCapabilities", * summary="Gets the REST API edit capabilities of the given Feature Source", * tags={"library"}, * @SWG\Parameter(name="session", in="query", required=false, type="string", description="Your MapGuide Session ID"), * @SWG\Parameter(name="resourcePath", in="path", required=true, type="string", description="The path of the resource ID"), * @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}), * @SWG\Response(response=200, description="Successful operation", @SWG\Schema(ref="#/definitions/RestEditCapabilities")), * @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") * )