knuckleswtf / scribe

Generate API documentation for humans from your Laravel codebase.✍
https://scribe.knuckles.wtf/laravel/
MIT License
1.59k stars 281 forks source link

Should stop add full stops on custom description #688

Closed ccec1t91077 closed 11 months ago

ccec1t91077 commented 1 year ago

Scribe version

4.21.1

Your question

The description support markdown format, so I think if you want it, it more easier to add yourself, but if you don't need the full stops, there will be a little issue on your document.

For example the situation what I met:

I'm trying to wrap the line of Example: after description, and also add a line Default: 1.

My code in request

/**
 * For scribe document.
 *
 * @return array
 */
public function queryParameters()
{
    return [
        'page' => [
            'description' => 'Current page.<br> Default: 1<br>'
        ]
    ];
}

The output document

image

You can see the full stops it added after description, but in my case, I'm trying to wrap line, the full stops will appear at the place I do not expect.

Docs

ccec1t91077 commented 11 months ago

In some of case, it will auto added a full stops after your parameter description, for example if you have a custom validation rule and there's a rule description for scribe.

If someone want to wrap line and face same issue as here, quick solution is add the wrap line mark to your custom rule description instead of parameter description.