Hi, I have definition
/**
* @SWG\Definition(
* definition="validation_error",
* type="object",
* description="Validation error",
* properties={
* @SWG\Property(
* type="string",
* property="asdasd",
* ),
* }
* )
*/
and I have definition caller
/**
* Issue new JTW token
*
* @SWG\Post(
* produces={"application/json"},
* tags= {"Security"},
* @SWG\Parameter(
* name="Authentication ",
* in="body",
* description="Getting JWT token by sending email and password",
* type="json",
* @SWG\Items(type="string"),
* collectionFormat="multi",
* @SWG\Schema(
* @SWG\Property(property="email", type="string", ),
* @SWG\Property(property="password", type="string", ),
* ),
* ),
* @SWG\Response(
* response = Response::HTTP_OK,
* description ="Obtain new token",
* schema=@SWG\Schema(
* @SWG\Property(property="token", type="string",),
* ),
* ),
* @SWG\Response(
* response = Response::HTTP_BAD_REQUEST,
* description="Get Bad Request ",
* schema=@SWG\Schema(ref="#/definitions/validation_error"),
* ),
* )
*
*
* @Route("/token", methods={"POST"})
*/
somehow it's give me error
any thoughts about why I can not connect them ?
thanks =)
This bundle does only parse annotations in controllers. Instead of using @SWG\Definition, if you want to manually describe a model, you should add a definition in your config under nelmio_api_doc.documentation.
Very poor documentation. Can someone please provide a working Example of how to use defintions. Tried adding it in config.yml but with no success.
very poor comment. you can use something else if you don't like the bundle, its free and open source, after all.
The documentation is not good. That's all. Though, I am looking forward to it. Can someone provide some help using definition in schema object.
Most helpful comment
The documentation is not good. That's all. Though, I am looking forward to it. Can someone provide some help using definition in schema object.