Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

chunhei2008/swagger-php-annotation

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Swagger-PHP Annotation

Install

安装插件: phpstrom: PHP Annotation

具体templates路径参考文档

git clone https://github.com/chunhei2008/swagger-php-annotation.git

cd swagger-php-annotation

# 将`swagger-php-annotation.xml`复制到`templates`目录
cp swagger-php-annotation.xml [phpstrom/templates/path]

# restart your phpstrom

Usage

上下文说明

swagger-php-annotationphpstrom中分为两种上下文

  1. 注释上下文:注释块中
  2. 非注释上下文:注释块之外的空白处

同一个注解分两种上下文使用场景,不同场景使用不同的标识符

如:

@Get@Get_ 都是HTTP GET 请求

@Get_ 为注释上下文使用 @Get 为非注释上下文使用

支持的注解列表

  • @Get @Get_
  • @Post @Post_
  • @Put @Put_
  • @Delete @Delete_
  • @Info @Info_
  • @Tag @Tag_
  • @Items_
  • @JsonContent_
  • @MediaType_
  • @Parameter_
  • @Property @Property_
  • @RequestBody @RequestBody_
  • @Response200_ @Response_
  • @Schema @Schema_
  • @SecurityScheme @SecurityScheme_

参考文档

About

Easy to use Swagger-PHP Annotation in PhpStrom

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.