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

Can not generate Request Param swagger config #29

Open
cuteQ opened this issue Sep 18, 2023 · 3 comments
Open

Can not generate Request Param swagger config #29

cuteQ opened this issue Sep 18, 2023 · 3 comments

Comments

@cuteQ
Copy link

cuteQ commented Sep 18, 2023

In Param config, if we pass {in} as query, path, it won't generate Request Param Config in oas.yml.
It also doesn't have {required} information in the oas.yml.
Does someone know how to generate it or it's a bug?

@cuteQ
Copy link
Author

cuteQ commented Sep 19, 2023

This happened to the Params which are objects in request

@qequ
Copy link
Collaborator

qequ commented Oct 9, 2023

Hi @cuteQ thanks for the report, can you pass an example to replicate it?

@cuteQ
Copy link
Author

cuteQ commented Jan 11, 2024

Yes, when the Params is an object, then this request params won't be generated:

type SwaggerTestRequestSchema struct {
AppId string query:"app_id,required"
}

type SwaggerTestResponseSchema struct {
ResponseMessage string json:"response_message,omitempty"
}

// @title Get hello world information
// @description Description content
// @id user-info
// @param swaggerRequest query SwaggerTestRequestSchema true "SwaggerTestRequestSchema JSON"
// @success 200 object SwaggerTestResponseSchema "SwaggerTestResponseSchema JSON"
// @failure 500 object SwaggerTestResponseSchema "SwaggerTestResponseSchema JSON"
// @router /open_api/v1.3/swagger/test/ [post]
func SwaggerTestViewHandler(ctx context.Context, reqCtx *app.RequestContext) {
}

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

No branches or pull requests

2 participants