PHPackages                             cdyun/thinkphp-swagger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. cdyun/thinkphp-swagger

ActiveLibrary[API Development](/categories/api)

cdyun/thinkphp-swagger
======================

TP plugin cdyun/thinkphp-swagger

v1.0.2(3mo ago)04MITPHP

Since Jan 29Pushed 3mo agoCompare

[ Source](https://github.com/cdyun303/thinkphp-swagger)[ Packagist](https://packagist.org/packages/cdyun/thinkphp-swagger)[ RSS](/packages/cdyun-thinkphp-swagger/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Thinkphp Swagger 扩展
===================

[](#thinkphp-swagger-扩展)

### 安装

[](#安装)

```
composer require cdyun/thinkphp-swagger

```

### - 服务注入

[](#--服务注入)

在扩展的composer.json文件中增加如下定义：

```
"extra": {
    "think": {
        "services": [
            "Cdyun\\ThinkphpSwagger\\SwaggerService"
        ]
    }
},

```

实现系统初始化过程中自动注册SwaggerService服务：

```
