Commit Graph

251 Commits

Author SHA1 Message Date
anqiansong
50bc361430 feat(goctl): Add api parser (#2585) 2023-03-28 15:45:26 +00:00
Snake
a561048d59 Fix bug: replace int and float with num type in dart (#3042)
Co-authored-by: zhoumingji <zhoumingji@cmsr.chinamobile.com>
2023-03-18 14:49:22 +00:00
Snake
e136deb3a7 Update goclt dart gen: Add scheme config and content-type header (#2987)
Co-authored-by: zhoumingji <zhoumingji@cmsr.chinamobile.com>
2023-03-08 15:40:55 +00:00
zhoumingji
ba71964b16 Fix bug in dartgen: The property 'isEmpty' can't be unconditionally accessed because the receiver can be 'null' 2023-03-04 11:37:38 +00:00
zhoumingji
97ada59175 Fix bug in dartgen: Increase the processing logic when route.RequestType is empty 2023-03-04 04:31:27 +00:00
cui fliter
b41ccc5992 fix functiom name
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-03-04 04:29:19 +00:00
tanglihao
a40d8b0684 fix code format style use const config.DefaultFormat 2023-03-03 14:58:18 +00:00
anqiansong
0e040ec5b4 remove unused code 2023-03-03 07:11:13 +00:00
anqiansong
4bc1b78a91 Fix #2879 2023-03-03 07:11:13 +00:00
Kevin Wan
03fe036204 chore: reformat code (#2903) 2023-02-20 23:37:05 +08:00
anqiansong
03d073a884 feat: Add request.ts (#2901)
* Add request.ts

* Update comments

* Refactor request filename
2023-02-20 22:54:25 +08:00
fondoger
32e3116ee3 Fix bug in dart api gen: path parameter is not replaced 2023-02-16 15:24:51 +00:00
fondoger
5756627904 Fix Dart API generation bugs; Add ability to generate API for path parameters (#2887)
* Fix bug in dartgen: Import path should match the generated api filename

* Use Route.HandlerName as generated dart API function name

Reasons:
- There is bug when using url path name as function name, because it may have invalid characters such as ":"
- Switching to HandlerName aligns with other languages such as typescript generation

* [DartGen] Add ability to generate api for url path parameters such as /path/:param
2023-02-16 15:19:46 +08:00
Xiaoju Jiang
413ee919e6 support custom maxBytes in API file (#2822) 2023-01-29 10:43:00 +08:00
Kevin Wan
ae87114282 chore: change interface{} to any (#2818)
* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
2023-01-24 16:32:02 +08:00
chensy
8157e2118d fix: replace goctl ExactValidArgs to MatchAll (#2759)
Co-authored-by: chenjieping <chenjieping@kezaihui.com>
2023-01-07 17:07:40 +08:00
Kevin Wan
ec7ac43948 chore: reorg imports (#2745)
* chore: reorg imports

* chore: format code
2023-01-03 22:26:45 +08:00
chowyu12
c4f8eca459 Feat update rootpkg (#2718)
* add go-grpc_opt and go_opt for grpc new command

* feat: remove log when disable log

* feat: remove repeat code

Co-authored-by: zhouyy <zhouyy@ickey.cn>
2022-12-23 23:57:56 +08:00
heyehang
a644ec7edd feature : responses whit context (#2637) 2022-12-03 18:48:02 +08:00
chensy
20e659749a fix: fix conflict with the import package name (#2610)
Co-authored-by: chenjieping <chenjieping@kezaihui.com>
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2022-11-20 15:23:25 +08:00
王哈哈
dac3600b53 Modify comment syntax error (#2572) 2022-11-04 21:55:17 +08:00
foliet
799c118d95 feat(goctl): better generate the api code of typescript (#2483) 2022-10-11 22:19:22 +08:00
bensonfx
e7acadb15d fix #2435 (#2442)
* feat: add color to debug (#2433)

* fix header and path type ts gen

Co-authored-by: chen quan <chenquan.dev@gmail.com>
2022-09-24 22:28:25 +08:00
Kevin Wan
1a6d7b3ef6 chore: gofumpt (#2439) 2022-09-22 22:40:01 +08:00
MarkJoyMa
4c927624b0 fix goctl help message (#2414) 2022-09-19 14:05:46 +08:00
anqiansong
9581e8445a fix: issue #2359 (#2368)
* Revert changes

* Unrap nested structure for doc code generation

* Revert changes

* Remove useless code

* Remove useless code

* Format code
2022-09-11 22:56:53 +08:00
Kevin Wan
d935c83a54 feat: support baggage propagation in httpc (#2375)
* feat: support baggage propagation in httpc

* chore: use go 1.16

* chore: use go 1.16

* chore: use go ^1.16

* chore: remove deprecated
2022-09-10 15:18:52 +08:00
anqiansong
ce638d26d9 Hidden java (#2333) 2022-08-30 23:54:36 +08:00
Zlx
9d6c8f67f5 generates nested types in doc (#2201)
Co-authored-by: Link_Zhao <Link_Zhao@epam.com>
2022-08-28 21:51:27 +08:00
Kevin Wan
d20d8324e7 fix: #2216 (#2235) 2022-08-06 17:48:59 +08:00
fisnone
685d14e662 fix:duplicate route check (#2154)
Co-authored-by: 黄志荣 <huangzhirong@shuinfo.com>
2022-07-24 10:48:50 +08:00
anqiansong
1b51d0ce82 fix: fix #2102, #2108 (#2131)
* g4 code generation

* Update grammar

* g4 code generation

* fix #2108

* fix #2102

* Remove comments
2022-07-20 22:49:41 +08:00
anqiansong
9c448c64ef Update api template (#2172) 2022-07-19 23:49:20 +08:00
杨圆建
bc85eaa9b1 fix: goctl genhandler duplicate rest/httpx & goctl genhandler template support custom import httpx package (#2152) 2022-07-19 23:24:47 +08:00
Kevin Wan
1c09db6d5d chore: coding style (#2120) 2022-07-10 11:05:21 +08:00
Kevin Wan
97a171441d chore: remove blank lines (#2117)
* chore: remove blank lines

* chore: refactor
2022-07-09 15:59:25 +08:00
虫子樱桃
725e6056e1 feat:goctl model mongo add easy flag for easy declare. (#2073)
* fix:typo in readme.md

* feat:`goctl model mongo ` add `easy` flag to generate code with Auto generated CollectionName for easy declare.

* fix:`goctl api doc ` when referenced api file contains no route,will generate an empty markdown file.

* code: adjust code.

Co-authored-by: 虫子樱桃 <czyt@w.cn>
2022-07-09 15:34:01 +08:00
Kevin Wan
e0e3f97c7c chore: refactor (#2087) 2022-07-02 14:03:11 +08:00
taobig
6a2d6786c6 remove legacy code (#2086) 2022-07-02 00:22:42 +08:00
taobig
bfd0869ee2 remove legacy code (#2084) 2022-07-01 22:41:16 +08:00
Kevin Wan
555c4ecd1a fix: quickstart wrong package when go.mod exists in parent dir (#2048)
* chore: fix typo

* fix: quickstart in dir with go.mod

* fix: runner failed

* chore: refine code

* chore: simplify quickstart mono
2022-06-26 22:37:15 +08:00
anqiansong
93b3f5030f chore: Add command desc & color commands (#2013)
* Add link & Color sub-commands

* Color sub-commands for unix-like OS

* Remove useless code

* Remove redundant dependency
2022-06-21 20:21:38 +08:00
MarkJoyMa
f2caf9237a fix goctl api clone template fail (#1990) 2022-06-09 23:35:03 +08:00
Kevin Wan
c6e2b4a43a chore: coding style for quickstart (#1902) 2022-05-13 23:10:55 +08:00
过客龙门
3ae874d75d fix ts tpl (#1879) 2022-05-11 23:45:32 +08:00
anqiansong
5383e29ce6 feat: Replace cli to cobra (#1855)
* Replace cli

* Replace cli

* Replace cli

* Format code

* Add compare case

* Add compare case

* Add compare case

* Support go style flag

* Support go style flag

* Add test case
2022-05-07 15:40:11 +08:00
Kevin Wan
3bbc90ec24 refactor: move json related header vars to internal (#1840)
* refactor: move json related header vars to internal

* refactor: use header.ContentType
2022-04-28 15:12:04 +08:00
Kevin Wan
cef83efd4e fix #1838 (#1839) 2022-04-28 11:25:26 +08:00
anqiansong
16c61c6657 chore: Embed unit test data (#1812)
* Embed unit test data

* Add testdata

Co-authored-by: anqiansong <anqiansong@bytedance.com>
2022-04-21 21:49:09 +08:00
anqiansong
305587aa81 fix: Fix issue #1810 (#1811)
* Fix #1810

* Remove go embed

* Format code

* Remove useless code

Co-authored-by: anqiansong <anqiansong@bytedance.com>
2022-04-21 15:22:43 +08:00