sisl-source / magento2-enable-swagger
Adds the option to re-enable Swagger via configuration. It's disabled in production mode sind Magento 2.4.4.
Package info
github.com/SISL-source/magento2-enable-swagger
Type:magento2-module
pkg:composer/sisl-source/magento2-enable-swagger
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
- magento/framework: ^102.0.0||^103.0.0
Requires (Dev)
- magento/magento-coding-standard: @dev
- pds/skeleton: ^1.0
- phpro/grumphp: ^v0.21.0
- phpstan/phpstan: ^0.12.0
- phpunit/phpunit: ^6.0|^9.0
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^3.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Re-enables the Swagger API documentation UI (/swagger) in Magento 2 production mode.
Magento disabled Swagger in production since 2.4.4, which is safe by default but a real
nuisance when you need to inspect or test the REST API on a staging or production-like
environment. This module adds a config flag to turn it back on where you want it.
Maintained fork of integer-net/magento2-enable-swagger, verified on Magento 2.4.9 / PHP 8.4.
What changed vs upstream
- Bumped the
phpconstraint from~7.1 … ~8.1to 8.1–8.5 — the original would not install on PHP 8.3/8.4, i.e. a hard block on Magento 2.4.9. - Kept
magento/framework ^102.0.0||^103.0.0; removed the post-install phpcs script.
Enable it deliberately. Exposing Swagger in production has a security trade-off.
Install
composer require sisl-source/magento2-enable-swagger bin/magento module:enable IntegerNet_EnableSwagger bin/magento setup:upgrade
Then enable it under Stores → Configuration → Services → Swagger and open /swagger.
License
MIT (upstream, by integer_net). Maintained by SISL.
Maintained by SISL
Maintained fork by SISL — Magento 2 development and modules. More self-hosted plugins: SISL Marketplace.