Skip to content

Commit bb94e02

Browse files
author
luojianbo
committed
Add an array type to the README
1 parent 0222f79 commit bb94e02

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ class UserController {
6868
* @http-method post
6969
*
7070
* @param string $login_type* 登录类型(password,sms_code) password
71-
* @param string $cellphone* 手机号 13800138000
71+
* @param int $cellphone* 手机号 13800138000
7272
* @param string $password* 密码 123456
73+
* @param array $options[] 选项数组 10
74+
* @param array $ext[id][] 扩展ID数组
75+
* @param array $ext[name][] 扩展名称数组
7376
*
7477
* @return json 200 成功
7578
*

src/Builder/Class_.php

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ private function buildMethodParams( $docParams, $httpMethod ){
208208
if( strtolower($swaggerParam['type']) == 'array' ) {
209209
$swaggerParam['collectionFormat'] = 'multi';
210210
$swaggerParam['items'] = [ 'type'=>'string' ];
211+
$swaggerParam['default'] = [$default ?? ''];
211212
}
212213

213214
$swaggerParams[] = $swaggerParam;

0 commit comments

Comments
 (0)