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

Support custom openapi url #11

Merged
merged 11 commits into from
Feb 25, 2022
Merged

Support custom openapi url #11

merged 11 commits into from
Feb 25, 2022

Conversation

dommer1
Copy link

@dommer1 dommer1 commented Feb 13, 2022

I tried to do according to your suggestion. What do you think about it?

Comment on lines 38 to 41
if(isset($json['servers'])) {
return $json;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(isset($json['servers'])) {
return $json;
}
if ((bool) config('swagger-ui.modify_file')) {
return $json;
}

can you add this instead? By adding the a modify_file boolean config variable, we still have the option to provide an external file where we do want to change the servers and the securitySchemes

This can be applied to configureOAuth method as well.

Can you also add a test for this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a beginner in testing, can you check it out?

src/Http/Controllers/OpenApiJsonController.php Outdated Show resolved Hide resolved
@gdebrauwer gdebrauwer merged commit e2667d8 into nextapps-be:master Feb 25, 2022
@gdebrauwer
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants