dedoc/scramble

Defined tags would not replace default tag

Closed this issue · 11 comments

Context Info

Scramble Version: 0.9.0

Issue

Occurred maybe from yesterday or today, the defined tags would not replace default tag. For example, a default tag for a controller with name ExampleController would be Example.

Before yesterday, after defining a PHPDoc @tags, the defined tag did replace the default tag, but now default tag would show no matter if @tags is defined as the photo below:

image

@tn710617 there were no changes to Scramble 0.9.0. Can you double check the version?

@tn710617 there were no changes to Scramble 0.9.0. Can you double check the version?

@romalytvynenko
Yes. The version is '0.9.0'. I understand there is no change, and I am also confused. I did git checkout to previous commit and delete the vendor & reinstall, and the result is the same.

I'm not sure what's going on. It did work properly, and suddenly it broke.

@tn710617 there were no changes to Scramble 0.9.0. Can you double check the version?

@romalytvynenko Yes. The version is '0.9.0'. I understand there is no change, and I am also confused. I did git checkout to previous commit and delete the vendor & reinstall, and the result is the same.

I'm not sure what's going on. It did work properly, and suddenly it broke.

@romalytvynenko

I would like to add more information

  • I use Sail as my local environment, and build my own image in Staging server, and both have this issue. I assume that the environment does not matter for this issue.
  • As mentioned, I checked out to previous commit that was made about 1 month ago. Actually I'm sure it was fine a few days ago, but just to be more sure I used the commit made 1 month ago, and the issue was still there. I assume that the issue is not caused by my code.
  • I also understand that if the code does not change, it's not quite possible to cause this issue. I checked the API that produced JSON data, and it does show two tags for each path, which I attach a photo below
  • According to the aforementioned, maybe the package used some external source to parse directory and generate tags? If so, could you check it?
image

@tn710617 please show your real code examples so we're on the same page

@tn710617 please show your real code examples so we're on the same page

@romalytvynenko

What code would you need me to provide?

Scramble is simple. I only set up the config and put PHPDoc, and that's it

@tn710617 the sample of how exactly you use @tags annotation

@tn710617 the sample of how exactly you use @tags annotation

@romalytvynenko

Sure. I would provide the info below
route

Route::get('example', [ExampleController::class, 'makeExample'])->name('example');

Controller

/**
 * @tags 範例 - 範例
 */
class ExampleController extends Controller
{

    public function makeExample()
    {
        return response()->json([
            'message' => 'This is an example',
        ]);
    }
}

Result
image

Feel free to let me know what info you would need for this issue.

@tn710617 nice, thanks! Seems like may be related to characters. Will check

@tn710617 nice, thanks! Seems like may be related to characters. Will check

@romalytvynenko

Hi Roma,
For some unaccountable reason, I use artisan optimize:clear, and it works again. However, I upgraded the version from '0.9.0' to the latest

I will close this issue, and many thanks for your great work.

Hello, i seem to be experience this issue as well. I am using the same name for every controller, but i separate it by tag for each Subject (in this case Bendahara Pengeluaran (BPP)). But right now it also shows in the default tag. Can you help?

EDIT:
Seems to be fixed by upgrading to latest version.

image

artisan optimize:clear

@shokme

Hey. As mentioned, I did two things to fix it.

  • For some unaccountable reason, it seems to be cached. You could try artisan optimize:clear. I did fix it by this command.
  • I also upgraded to the latest version.