Coder Social home page Coder Social logo

swagger-php-annotation's Introduction

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_

参考文档

swagger-php-annotation's People

Contributors

chunhei2008 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.