* operationId="SetResourceContentOrHeader", * summary="Sets the resource content for the given resource. This API exists to provide consistency with the library-based version", * 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\Parameter(name="content", in="formData", required=true, type="file", description="The resource XML content"), * @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("/session/:sessionId/:resName/contentorheader.:format", function ($sessionId, $resName, $format) use($app) { $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}"); $ctrl = new MgResourceServiceController($app); $ctrl->SetResourceContentOrHeader($resId, $format); }); /** * @SWG\Post( * path="/session/{session}/{resName}/content.{type}", * operationId="SetResourceContent", * summary="Sets the resource content 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="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 content"), * @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") * )