0
api文件使用import 时导入的类型放入数组中会出错,比如
import "warehouse.api"
type Filters {
WareHouses []warehouse.WareHouse `json:"wareHouses"`
}
错误 :
error: objects.api line 16:34 extraneous input 'json:"wareHouses"
' expecting {'}', '*', ID}
不用作数组时是正常的,比如:
import "warehouse.api"
type Filters {
WareHouses warehouse.WareHouse `json:"wareHouses"` // 仓库信息
}