* summary="Sets the resource header for the given resource", * tags={"library"}, * consumes={"application/json", "application/xml"}, * @SWG\Parameter(name="session", in="formData", 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\Parameter(name="body", in="body", required=true, type="string", description="The resource XML header"), * @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->post("/library/:resourcePath+/header.:format", function ($resourcePath, $format) use($app) { $resId = MgUtils::ParseLibraryResourceID($resourcePath); $ctrl = new MgResourceServiceController($app); $ctrl->SetResourceHeader($resId, $format); }); /** * @SWG\Get( * path="/library/{resourcePath}/header.{type}", * operationId="GetResourceHeader", * summary="Gets the specified resource header item for the given resource", * tags={"library"}, * consumes={"application/json", "application/xml"}, * @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") * )