03f2057eb0
Added PreRun phase to Command struct
...
Now each command has a PreRun function that will execute before calling
the Run() function. This allows to show the banner and do some pre-check
work. Also moved parsePackagesFromDir() to the main function to avoid
getting called each time 'bee' is invoked.
2016-11-20 22:28:52 +01:00
ab39926c41
Enhances the package dir parser
...
The function parsePackagesFromDir() was panicing when it encounter some
"invalid" Go files. Instead, this will allow it to display a warning and
continue the execution of the command.
2016-11-20 11:46:42 +01:00
63b5a81104
Update g_docs.go
2016-11-14 19:07:22 +08:00
cf7aef47f0
Implementing the new logging infrastructure
...
Moved logging to the new logging infrastructure by removing the use of
ColorLog() function. Added more documentation. Also fixed some typos in
comments and function names.
2016-11-13 15:14:48 +01:00
04c0f9d7b4
output error
2016-11-10 16:51:50 +08:00
3199a019d7
Swagger: support default value columns for @Param
...
This patch support default value after 'type' column if total
columns is six.
This enhancement also is compatiable with old five columns.
2016-11-03 23:18:05 +08:00
7c7e75435c
Update g_docs.go
2016-10-10 19:49:33 +03:00
e8f85a57c2
Add types error handler (log)
...
the usual warning not panic
2016-10-10 17:36:51 +03:00
31406ebe5a
Default values in structure
...
Swagger default value for golang stucture.
format:
doc:"default(my_defaul_value)"
type MyStruct struct {
Template string `json:"template" doc:"default(<h1>Hello, {{ name }}! </h1>)"`
Name string `json:"name"`
MyNumber int64 `json:"temp" doc:"default(10)"`
MyBool bool `json:"bl" doc:"default(true)"`
MyFloat float64 `json:"fl" doc:"default(12.1234)"`
}
2016-10-08 11:35:26 +03:00
d93e9a4271
Update g_docs.go
2016-09-27 18:20:01 +03:00
4ebf7eab65
add support multi package with gaoling way myPackage.struct
2016-09-25 01:34:26 +03:00
29c9e1bab7
fix the map type generate
2016-09-22 23:04:58 +08:00
205428abce
fix the licence issue
2016-09-22 22:26:39 +08:00
1b75ccb9fe
Improve swagger (Main params,yaml
2016-09-15 00:09:54 +03:00
eb64d25e4a
Merge pull request #264 from beego/master
...
Develop update
2016-08-30 00:15:44 +08:00
004778c662
swagger add embedded struct
2016-08-29 11:04:47 +02:00
7e60509231
Separate and add @Description with @Summary params
...
@Description -> is "descriptions" in swagger
@Summary -> is "summary" in swagger
this different options.
2016-08-25 19:32:39 +03:00
28f6abc3a0
merge master
2016-08-24 11:07:57 +08:00
f813e990c0
hotfix: schema init
2016-08-24 10:54:54 +08:00
07ca4481b0
add todo
2016-08-22 16:11:06 +08:00
c3ff72ae77
Add support for query param array format.
...
exmple:
// @Param app query []string true support multipil app params
Update support for responses object format.
exmple:
// @Success 200 success
// @Success 200 {object} int64 success count
// @Success 200 {object} []int64 success ids
// @Success 200 {array} int64 success ids
2016-08-20 15:12:15 +08:00
df9f5a77da
Merge commit '5309c72ef751bd4edb45d1702996eb279033b281' into develop
2016-08-20 11:18:46 +08:00
ca2f60c72d
add array type support in comment param
2016-08-20 11:17:30 +08:00
5309c72ef7
support success response array objects
2016-08-20 00:14:39 +08:00
55fc8e535c
Merge pull request #245 from tnextday/develop
...
Use first NewNamespace prefix as swagger `BasePath`
2016-08-19 00:13:23 +08:00
b160eb35b5
Use first NewNamespace prefix as swagger BasePath
2016-08-18 23:31:09 +08:00
42f8892a81
Merge pull request #243 from tnextday/develop
...
fix swagger array items crash bug
2016-08-18 23:30:34 +08:00
1e247452ff
update swagger
2016-08-18 22:29:38 +08:00
3ccffe087e
update swagger array items define
2016-08-18 21:30:57 +08:00
2f85185bcc
Print warnning only if param location is wrong
2016-08-18 21:03:27 +08:00
07df26c7b6
add param location checker in generate gocs
2016-08-18 18:21:23 +08:00
c08afc129e
Update g_docs.go
...
Only you pass the model name, but do not pass the location.
Although getModel() function again trying to split ( strs := strings.Split(str, ".") ) the parameter to the location and name.
2016-08-18 12:58:36 +03:00
985c18a314
go format
2016-08-18 17:40:59 +08:00
ac1bf161fc
generate gocs support go buildin type in comment param
2016-08-18 17:38:26 +08:00
11571b4af2
fix beego#2016
2016-08-17 23:48:38 +08:00
fd7742863d
urlReplace all the paths
2016-08-17 08:02:21 +08:00
525d2b0901
support object ref model
2016-08-16 23:32:13 +08:00
0e240214ad
generator models
2016-08-13 14:45:12 +08:00
743348ae1e
init the maps
2016-08-08 20:48:51 +08:00
d9f182c84f
bee support swagger2.0
2016-08-08 16:44:49 +08:00
adb346811d
Merge branch 'develop' of https://github.com/beego/bee into develop
2016-08-01 14:40:46 +08:00
083fa9fd4b
swagger 2
2016-08-01 14:40:43 +08:00
bc963e0070
go lint
2016-07-23 02:05:01 +03:00
76eb064e69
Merge pull request #128 from itcbx/patch-1
...
修改生成文档时,@Success 第三个参数解析错误的问题
2016-03-03 10:00:56 +08:00
0acdf2e816
fix the rename in beego
2016-01-15 14:45:56 +08:00
0ee483de97
fix the typo
2016-01-06 13:59:49 +08:00
807c3de8a7
fix issue with new version
2016-01-06 11:55:56 +08:00
faaa3320bc
Update to match changes in beego develop branch
...
Mainly changes casing: Api > API and Url > URL
2015-09-22 14:53:43 +02:00
d7b23aa54f
修改生成文档时,@Sucess 第三个参数解析错误的问题
...
原来的代码,当第三个参数有多个空格时,比如
// @Success 200 {string} delete success!
第三个参数会解析成success!,即会忽略第一个空格前的单词,修改后,可以正常解析。
2015-08-29 15:14:21 +08:00
f50dce1d52
make docs works when EnableDocs = false
2015-07-01 23:55:13 +08:00