(goctl)fix parser issues (#3930)

This commit is contained in:
kesonan
2024-03-02 22:27:39 +08:00
committed by GitHub
parent a5d2b971a1
commit e08ba2fee8
13 changed files with 179 additions and 24 deletions

View File

@@ -299,6 +299,11 @@ func TestParser_Parse_atServerStmt(t *testing.T) {
"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"`,
}
p := New("foo.api", atServerTestAPI)
@@ -349,6 +354,8 @@ func TestParser_Parse_atServerStmt(t *testing.T) {
`@server(foo:/v1/v2`,
`@server(foo: m1,`,
`@server(foo: m1,)`,
`@server(foo: v1/v2-)`,
`@server(foo:"test")`,
}
for _, v := range testData {
p := New("foo.api", v)