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

@Param marked struct treat as mixed parameters, which can include header query body. etc. #1

Open
kirileec opened this issue Sep 23, 2024 · 0 comments

Comments

@kirileec
Copy link
Contributor

// ARequest
// @Param
type ARequest struct {
    A string `query:"a"`
    B string `json:"b"`
    C int `header:"c"`
}

func (a *Controller) GetAction(c *fw.Context, req *ARequest) {

}
  • field A will be parsed from query string
  • field B will be parsed from json body
  • field C will be parsed from HTTP HEADER
@kirileec kirileec moved this to Backlog in fw Sep 23, 2024
@kirileec kirileec added this to fw Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant