Hi,
when i try to generate the docs I got the exception
[ErrorException]
Field "schema" is required when @SWG\Parameter(name="body",in="body") is in
"body" in \App\Http\Controllers\AccessLogController->create_login_log() in
/Users/dev/Documents/others/winkerapp-api/app/Http/Controllers/AccessLogCo
ntroller.php on line 30
/**
* @SWG\Post(
* path="/api/access/login",
* consumes={"application/json"},
* description="Create a loggin log",
* operationId="logloggin",
* @SWG\Parameter(
* description="user id",
* in="body",
* name="user_id",
* required=true,
* type="integer"
* ),
* @SWG\Response(
* response="200",
* description="successful operation",
* @SWG\Schema(ref="#/definitions/AccessLog")
* ),
* summary="register a loggin log",
* tags={
* "log"
* }
* )
* */
If in is "body" a schema is required: http://swagger.io/specification/#parameterIn
Using type directly in parameter is only available when in is any value other than "body"
Just add a schema and specify the type like so:
* ...
* @SWG\Parameter(
* description="user id",
* in="body",
* name="user_id",
* required=true,
* @SWG\Schema(type="integer")
* ),
* ...
Most helpful comment
If in is "body" a schema is required: http://swagger.io/specification/#parameterIn
Using
typedirectly in parameter is only available when in is any value other than "body"Just add a schema and specify the type like so: