Download the PHP package laravel-toolbox/swagger-notes without Composer
On this page you can find all versions of the php package laravel-toolbox/swagger-notes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download laravel-toolbox/swagger-notes
More information about laravel-toolbox/swagger-notes
Files in laravel-toolbox/swagger-notes
Download laravel-toolbox/swagger-notes
More information about laravel-toolbox/swagger-notes
Files in laravel-toolbox/swagger-notes
Vendor laravel-toolbox
Package swagger-notes
Short Description PHP Laravel ToolBox工具箱之SwaggerPHP生成注释
License Apache-2.0
Homepage https://github.com/mikeah2011/swagger-notes
Package swagger-notes
Short Description PHP Laravel ToolBox工具箱之SwaggerPHP生成注释
License Apache-2.0
Homepage https://github.com/mikeah2011/swagger-notes
Please rate this library. Is it a good library?
Informations about the package swagger-notes
Laravel 開發工具箱之 SwaggerNotes
生成工具
註:該工具僅生成注釋內容,依賴
swagger-php
包才能生成.yaml
接口文件
-
本地開發環境安裝依賴包
-
請在
Controller
類中對應的方法return
前,加入如下代碼: -
新增可支持擴展字段的備註信息,在調用類中新增&修改如下代碼即可:
-
默認生成路徑在
swagger/SwaggerNotes
目錄下,層級結構如下: -
附表
方法 釋義 可选 備註 setRequest
設置請求體,可解析出當前接口的 method
、parameter
、url
、pathInfo
等✔️ 第二個形參可选,支持被改造的Request請求體,如: new GetAffiliateParameter($request)
setResponse
設置返回體,可直接給返回的數組結構 setComments
設置字段的備註、規則等 ✔️ 接口字段涉及的表集合;驗證規則,不設置則取 ->rules()
setApiInfo
設置 API_INFO 的相關參數 summary 設置當前接口文檔的 summary
概述信息✔️ 不設置則取 ->name()
description 設置當前接口文檔的 description
描述信息✔️ operation_id 設置當前接口文檔的操作 ID
標識建議 __FUNCTION__
tags 設置當前接口文檔的標籤分類 建議 __CLASS__
generate
生成文檔 僅本地、測試環境或開啟 debug 模式時生效
All versions of swagger-notes with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.1||^8.0.2||^8.2
The package laravel-toolbox/swagger-notes contains the following files
Loading the files please wait ....