Open gzhhong opened 3 years ago
I think that cookie
type is only support OAS 3.0, but swag
support only OAS 2.0 - https://github.com/swaggo/swag/issues/237
swagg
Support types - https://github.com/swaggo/swag#param-type
? no update?
i manually changed the json in docs.go parameters.in to "cookie" which works
any update on this? Would be very nice to have support on this!
You could use @Param
:
// @Param Cookie header string false "token" default(token=xxx)
You could use
@Param
:// @Param Cookie header string false "token" default(token=xxx)
I might be wrong, but I don't think this will yield the intended result. If you want to place a JWT token in a Cookie, then the swagger document that is generated by swag init
will have to be manually edited to include the specification of the cookie since swag only supports the Swagger 2.0 specification and cookie authentication is a Swagger 3.0 feature.
Hello all,
I can't find in the docs if I can define a parameter in this way:
// @Param some_id cookie string true "Some ID"
Can anyone confirm there are some way to do so?
Thanks,
James