I'm trying to use Swagger-ui for my json-rpc server which was written by php. I use Swagger-PHP to generate json complaint container for Swagger-ui. So, I'm very new to Swagger and I use annotation for methods like that:
/**
* @SWG\Resource(
* apiVersion="0.2",
* swaggerVersion="0.8",
* basePath="http://mydomain.com",
* @SWG\Api(
* path="/rpc/json/server.php",
* description="Operations about Devices",
* @SWG\Operations(
* @SWG\Operation(
* method="POST",
* summary="Get device by ID",
* nickname="getDevice",
* @SWG\Parameters(
* @SWG\Parameter(
* name="deviceID",
* description="device id",
* required="true",
* type="string"
* )
* ),
* @SWG\ResponseMessages(
* @SWG\ResponseMessage(code=404, message="Device not found")
* )
* )
* )
* )
* )
*/
In SWG\Operation I need to add one more "method" in correspondence with json-rpc spec. As a result all requests will use POST method as part of http and json container will have its own "method" for each one.
The question - where should I start searching to solve this issue?
Sorry for my English. Not native.