[2.1.10] Swagger not working for multistore installs? #13474
Labels
Fixed in 2.1.x
The issue has been fixed in 2.1 release line
Fixed in 2.2.x
The issue has been fixed in 2.2 release line
Fixed in 2.3.x
The issue has been fixed in 2.3 release line
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Reproduced on 2.1.x
The issue has been reproduced on latest 2.1 release
The default URL swagger attempts to fetch the details for the APIs is
The problem is, this doesn't work on our stores, Im not sure if magento's routing is expecting our default store's code to be
default
, or if it's a shortcut to the default store and not functioning for some other reasonFor example, our store code for our default view is
mxs
, so our URL should bebut swagger isn't picking up on the default store code.
Preconditions
Steps to reproduce
default
?)Expected result
Actual result
I wrote a small patch that i'm using in our local environment, that obviously isn't something i'd put in a PR because it uses the ObjectManager to get the current store code, but for anyone else that's having this issue, it can be fixed by doing the following
edit the magento-swagger module's file
view/frontend/templates/swagger-ui/index.phtml
Change the following line:
$schemaUrl = rtrim($block->getBaseUrl(), '/') . '/rest/default/schema?services=all';
To this:
and refresh the page / flush any caches and you should be set.
The text was updated successfully, but these errors were encountered: