Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support tags per operation #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liemle3893
Copy link

  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
Copy link
Author

liemle3893 commented Aug 29, 2024

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

…bug message

Refactoring the `swaggerMapTypes` in `entities.go` to include slices of `bool`, `float32`, and `float64` enhances the type support for the Swagger documentation generation, allowing for a more comprehensive and accurate API spec. Additionally, commenting out the debug message in `parser.go` cleans up the console output, making it less cluttered and more professional for production environments. This change is aimed at improving the maintainability and functionality of the codebase.
@kevwan
Copy link
Contributor

kevwan commented Sep 11, 2024

@kesonan PTAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants