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
.swaggo not replacing null.Int #1208
Comments
Exactly the same issue for me. There is no way to specify a rule |
We release #1209 in 1.8.4 |
Not sure if I'm doing something wrong, but it still doesn't work for me with 1.8.4. Swagger still shows {
"title": {
"string": "string",
"valid": true
},
} What it should look like: {
"title": "string"
} I tried all variations listed above in the
The struct looks like this (other fields omitted): type Employee struct {
Title null.String `db:"title" json:"title"`
} |
I updated the module to 1.8.4 and running the command didn't work either. I had to recompile the executable:
Then running the following command worked for me:
My .swaggo file:
(The first line in yours looks fine.) My struct:
|
Interesting. I'll try this tomorrow! Thanks for sharing. |
Works just fine, thanks again. Makes sense you have to update the CLI as well, oversight on my part. |
I am unable to override
null.Int
in .swaggo file.handler.go:
I tried running swag init with any of the lines below in .swaggo and none of them worked (I also tried "integer" instead of "int"):
output:
Swag version: 1.8.1
Go version: go1.17.5 darwin/arm64
OS: macOS 12.3.1
The text was updated successfully, but these errors were encountered: