swaggo / swag

Automatically generate RESTful API documentation with Swagger 2.0 for Go.
MIT License
10.24k stars 1.17k forks source link

Add support for 'format' in response headers #1816

Closed tompson-wu closed 2 months ago

tompson-wu commented 2 months ago

We need to describe response header type for long/int64

I write code like:

// @Header 200 integer Content-Length "the content length" Format(int64)

But the result is:

"Content-Length": {
    "type": "integer",
    "description": "the content length\" Format(int64)"
}

This result is expected:

"Content-Length": {
    "type": "integer",
    "description": "the content length",
    "format": "int64"
}
tompson-wu commented 2 months ago

duplicated