mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-22 06:08:21 +08:00
(goctl)fix parser issues (#3930)
This commit is contained in:
@@ -13,4 +13,9 @@
|
||||
timeout6: 10ns
|
||||
timeout7: 1h10m10s10ms10µs10ns
|
||||
maxBytes: 1024
|
||||
)
|
||||
prefix: /v1
|
||||
prefix1: /v1/v2_test/v2-beta
|
||||
prefix2: v1/v2_test/v2-beta
|
||||
prefix3: v1/v2_
|
||||
summary:"test"
|
||||
)
|
||||
|
||||
8
tools/goctl/pkg/parser/api/parser/testdata/duplicate_type.api
vendored
Normal file
8
tools/goctl/pkg/parser/api/parser/testdata/duplicate_type.api
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
syntax = "v1"
|
||||
|
||||
type Example{
|
||||
A string
|
||||
}
|
||||
type Example{
|
||||
B string
|
||||
}
|
||||
@@ -188,3 +188,17 @@ service example {
|
||||
post /example/nest2 (NestDemoReq2) returns (NestDemoResp2)
|
||||
}
|
||||
|
||||
@server (
|
||||
group: /g1/g2_test/g2_beta
|
||||
prefix: /v1/v2_test/v2-beta
|
||||
summary: "test"
|
||||
)
|
||||
service example {
|
||||
@handler nestDemo1
|
||||
post /a/b_c/d-e/:f/123/g (NestDemoReq1) returns (NestDemoResp1)
|
||||
|
||||
@handler nestDemo2
|
||||
post /example/nest2 (NestDemoReq2) returns (NestDemoResp2)
|
||||
}
|
||||
|
||||
|
||||
|
||||
3
tools/goctl/pkg/parser/api/parser/testdata/example_base.api
vendored
Normal file
3
tools/goctl/pkg/parser/api/parser/testdata/example_base.api
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
syntax = "v1"
|
||||
|
||||
type Base{}
|
||||
@@ -1,5 +1,7 @@
|
||||
syntax = "v1"
|
||||
|
||||
import "example_base.api"
|
||||
|
||||
info(
|
||||
title: "type title here"
|
||||
desc: "type desc here"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
syntax = "v1"
|
||||
|
||||
import "example_base.api"
|
||||
|
||||
info(
|
||||
title: "type title here"
|
||||
desc: "type desc here"
|
||||
|
||||
Reference in New Issue
Block a user