zeromicro / goctl-swagger

MIT License
208 stars 133 forks source link

feat: support tags per operation #112

Open liemle3893 opened 2 weeks ago

liemle3893 commented 2 weeks ago
  1. Fixed: Unquote can return error in case of input string is not quoted, let's return to original value as fall back.
  2. Support tags per operation. Currently, operation inherit from group or swtags and their is no way to custom it. Example below.
info(
    title: "type title here"
    desc: "type desc here"
    author: "type author here"
    email: "type email here"
    version: "type version here"
)

import "sys/user.api"

@server(
  group: test
)
service user-api {
    @doc(
        summary: "注册"
        tags: "test,auth"
    )
    @handler register
    post /api/user/register (RegisterReq)
}

Before this commit

Screenshot 2024-08-29 at 01 01 39

After this commit

Screenshot 2024-08-29 at 01 03 58

This would be useful for grouping operation.

liemle3893 commented 2 weeks ago

@kevwan Can you please take a look at this PR?

kevwan commented 2 days ago

@kesonan PTAL