nostop8 / yii2-rest-api-doc

Simple documentation generator for Yii2 REST applications based on defined API endpoints and actions annotations.
MIT License
21 stars 15 forks source link

Panels don't stay open. #10

Closed SirRegion closed 2 years ago

SirRegion commented 2 years ago

Hi everybody,

thanks for creating this tool, it's quite helpful.

Sadly I'm running into a bug that's really stopping me from using the application right now: Every time I click on one of the generated panels, the contents are visible for a split second and then get closed again.

I investigated this behaviour a bit and it seems like the css selector .collapse:not(.show) that got added from another bootstrap package is to blame.

I would be really grateful for any hints on how to resolve this conflict.

SirRegion commented 2 years ago

My composer.json is this:

{
    "name": "yiisoft/yii2-app-basic",
    "description": "Yii 2 Basic Project Template",
    "keywords": ["yii2", "framework", "basic", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.6.0",
        "yiisoft/yii2": "~2.0.14",
        "yiisoft/yii2-bootstrap4": "~2.0.0",
        "nostop8/rest-api-doc": "^1.1"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "~2.1.0",
        "yiisoft/yii2-gii": "~2.2.0",
        "yiisoft/yii2-faker": "~2.0.0",
        "codeception/codeception": "^4.0",
        "codeception/verify": "~0.5.0 || ~1.1.0",
        "codeception/specify": "~0.4.6",
        "symfony/browser-kit": ">=2.7 <=4.2.4",
        "codeception/module-filesystem": "^1.0.0",
        "codeception/module-yii2": "^1.0.0",
        "codeception/module-asserts": "^1.0.0"
    },
    "config": {
        "process-timeout": 1800,
        "fxp-asset": {
            "enabled": false
        },
        "allow-plugins": {
            "yiisoft/yii2-composer": true
        }
    },
    "scripts": {
        "post-install-cmd": [
            "yii\\composer\\Installer::postInstall"
        ],
        "post-create-project-cmd": [
            "yii\\composer\\Installer::postCreateProject",
            "yii\\composer\\Installer::postInstall"
        ]
    },
    "extra": {
        "yii\\composer\\Installer::postCreateProject": {
            "setPermission": [
                {
                    "runtime": "0777",
                    "web/assets": "0777",
                    "yii": "0755"
                }
            ]
        },
        "yii\\composer\\Installer::postInstall": {
            "generateCookieValidationKey": [
                "config/web.php"
            ]
        }
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
}
SirRegion commented 2 years ago

I found the issue in my project. Two projects (rest-doc and yiisoft/yii2-bootstrap4) where both including bootstrap, causing the dependency issue.

This could be solved by not directly including bootstrap in this project but mark it as a dependency of yii-bootstrap4. (instead of yii-bootstrap).

I'll close this issue because my problems are resolved.