Open ttktatakai opened 9 months ago
for example I have a struct as input parameter
type Account struct { AccountType int `json:"account_type"` }
Then I start swagger by using https://github.com/swaggo/gin-swagger. The paramters example value shows as
{ "accountType": "string" }
I expected the field name is used json tag like
{ "account_type": "string" }
Is there anyway to config this? Thanks in advance.
You could use option -p snakecase
--propertyStrategy value, -p value Property Naming Strategy like snakecase,camelcase,pascalcase (default: "camelcase")
for example I have a struct as input parameter
Then I start swagger by using https://github.com/swaggo/gin-swagger. The paramters example value shows as
I expected the field name is used json tag like
Is there anyway to config this? Thanks in advance.