Hi, is it possible for me to change my Model name that is displayed in Swagger UI ?
for example:
// @Success 200 {array} model.Account <-- This is a user defined struct.
in the Swagger UI it would display model.Account, and personally i would like to change model.Account > User or Account instead of model.Account for a cleaner docs.
Thanks
Yes. You can change.
Account is struct name.
@welenlin
If you have problem reopen issue.
thanks for the reply !
Sorry for the wrong explanation above since i put the data type as {array}, what I mean is, if the data type is struct how do we rename the struct name in the doc
For example I have a
// @Param body body request.SomeStruct true "Request Body Comment"
after generated using ./swag init
and visit the swagger routes, i would have the API Doc generated but the request body in doc is written as request.SomeStruct and its property,
I would like to change the name from request.SomeStruct to AccountRequest or something
is it possible ?
thanks.
@pei0804
Most helpful comment
thanks for the reply !
Sorry for the wrong explanation above since i put the data type as {array}, what I mean is, if the data type is struct how do we rename the struct name in the doc
For example I have a
// @Param body body request.SomeStruct true "Request Body Comment"after generated using ./swag init
and visit the swagger routes, i would have the API Doc generated but the request body in doc is written as request.SomeStruct and its property,
I would like to change the name from request.SomeStruct to AccountRequest or something
is it possible ?
thanks.
@pei0804