Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mihailovskim's avatar

Scribe sets all parameters with application name instead of the param name

I am using knuckleswtf/scribe to document my API, and I am suddenly seeing all of my @queryParam and @bodyParam are written with name from my .ENV file... APP_NAME instead of the real param name (name, email, password etc.), so my docs page is useless. I tried to upgrade the version to the latest (I thought it's some v4 bug, but no results).

I am using the default config/scribe.php and here is my login controller comment block.

/**
 * Login
 *
 * @unauthenticated
 *
 * @bodyParam email string required The email of the user. Example: [email protected]
 * @bodyParam password string required The password of the user. Example: pa55w0rd
 *
 * @response status=200 {
 *      "status": "success",
 *      "code": 200,
 *      "message": "Token generated successfully.",
 *      "data": [
 *          "token": "1|FxGrKXTS0iLgonnQZtELC0dWu73xslzHjGjaBVef"
 *      ]
 *  }
 *
 * @response status=422 {
 *   "message": "The email field is required. (and 1 more error)",
 *   "errors": {
 *       "email": [
 *           "The email field is required.",
 *           "The email field is required to be a valid email."
 *       ]
 *   }
 *  }
 **/

Have anyone experience something similar to this? Any idea how to resolve this issue? Here is print screen of the docs page, clearly visible right side all great, left side instead of param name, it use the APP_NAME

https://imgur.com/a/5fYOCwk

1 like
3 replies
vincent15000's avatar

I don't understand : APP_NAME should be the real name, shoudn't it ?

vincent15000's avatar

I'm working on an application with another developer and I have notice that it's necessary to regenerate the scribe documentation so that it works with the right environment values (which can be slightly different according to the local environment).

For example I work with the php native server php artisan serve whereas the other developer works with a local webserver, so the URL to access to the application isn't the same.

So I have created a custom command to initialize the application and regenerate the scribe documentation.

php artisan myapp:init

Please or to participate in this conversation.