bobitluo / php-swagger-ui
基于php-swagger的web网站
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:project
Requires
- bobitluo/php-swagger: ~0.1
- hassankhan/config: ^2.0
- phpdocumentor/reflection: ^4@alpha
- phpdocumentor/reflection-docblock: ^5@alpha
- symfony/yaml: ^4.3.3
This package is auto-updated.
Last update: 2025-03-10 20:08:58 UTC
README
Introduction
一个基于 php-swagger 生成PHP API在线文档的UI项目
Installation
composer create-project --prefer-dist bobitluo/php-swagger yourproject
Usage
修改 config.yaml
projects: your_first_project: # 定义项目KEY。可配置多个项目 type: directory dir: /your/project/controller/dir # 配置成项目controller的目录(建议部署在开发或测试环境) swagger: title: project name description: project description version: project version host: your_project_host.com # 配置成项目的主机名(建议配置开发或测试环境的主机) schemes: - https securityDefinitions: # 认证相关配置。请参考 https://swagger.io/docs/specification/2-0/authentication/ ApiKeyAuth: type: apiKey in: header name: Authorization security: - ApiKeyAuth: [] controller_prefix: controller_postfix: Controller action_prefix: action_postfix: Action