Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scribe Try It Out Base URL setting being ignored when generated with laravel setting #708

Closed
1 task done
Jamesking56 opened this issue Aug 15, 2023 · 5 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@Jamesking56
Copy link

Scribe version

4.2.2.0

PHP version

8.2.8

Framework

Laravel

Framework version

10.15.0

Scribe config

title => "<snip>"
base_url => "https://mysite.com/api"
type => "laravel"
laravel.docs_url => "/api/docs"
try_it_out.base_url => "http://google.com"
auth.enabled => true
auth.default => true
auth.name => "token"
auth.placeholder => "{YOUR_TOKEN}"

What happened?

When I run php artisan scribe:generate I am expecting the try it out base url to be http://google.com set by my config.

However, it is set to the site's app url instead.

Docs

@Jamesking56 Jamesking56 added bug Something isn't working triage labels Aug 15, 2023
@shalvah
Copy link
Contributor

shalvah commented Aug 16, 2023

What do you mean? Can you provide a screenshot?

@shalvah shalvah removed the triage label Aug 16, 2023
@shalvah
Copy link
Contributor

shalvah commented Aug 26, 2023

I suspect you may be mixing up the displayed URL with the one Tri It Out requests are sent to.

@jamessa
Copy link

jamessa commented Jan 18, 2025

In deed, I just bump into the same issue. I changed scribe.base_url and the display url is correct but Try it out is incorrect. I change both of

  • scribe.base_url
  • scribe.try_it_out.base_url

and it works perfectly. Maybe it's simpler to use just one base_url?

@shalvah
Copy link
Contributor

shalvah commented Jan 18, 2025

Maybe it's simpler to use just one base_url?

But we can't, because, for many people, the URL they want requests to be sent to (eg a testing server) is not necessarily the same they want displayed. That's why we added separate URLs.. Currently, it defaults to config('app.url'), but I guess it makes more sense to default to the base URL. I'll change that.

@shalvah
Copy link
Contributor

shalvah commented Feb 18, 2025

I'll change this in v5

@shalvah shalvah closed this as completed Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants